count_contents() > 0) { include(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment; } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART)); ?> >
count_contents() > 0) {
?>
'center',
'params' => ' class="s_cart_head s_cart_head_padd remove"',
'text' => ''.TABLE_HEADING_REMOVE.'');
$info_box_contents[0][] = array('align' => 'center',
'params' => ' class="s_cart_head s_cart_head_padd products"',
'text' => ''.TABLE_HEADING_PRODUCTS.'');
$info_box_contents[0][] = array('align' => 'center',
'params' => ' class="s_cart_head s_cart_head_padd quantity"',
'text' => ''.TABLE_HEADING_QUANTITY.'');
$info_box_contents[0][] = array('align' => 'center',
'params' => ' class="s_cart_head s_cart_head_padd total"',
'text' => ''.TABLE_HEADING_TOTAL.'');
$any_out_of_stock = 0;
$products = $cart->get_products();
// $total_fee_without_printing = $cart->show_total() - get_printing_fee_all();
if (sessread('currency') == 'USD') {
$SQL = "select value from currencies where code='USD'";
$currencies_query = tep_db_query($SQL);
$currencies_row = tep_db_fetch_array($currencies_query);
$exchange_rate = $currencies_row['value'];
}
else {
$exchange_rate = 1.0;
}
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
// Push all attributes information in an array
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
while (list($option, $value) = each($products[$i]['attributes'])) {
echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
where pa.products_id = '" . (int)$products[$i]['id'] . "'
and pa.options_id = '" . (int)$option . "'
and pa.options_id = popt.products_options_id
and pa.options_values_id = '" . (int)$value . "'
and pa.options_values_id = poval.products_options_values_id
and popt.language_id = '" . (int)$languages_id . "'
and poval.language_id = '" . (int)$languages_id . "'");
$attributes_values = tep_db_fetch_array($attributes);
$attributes_values['options_values_price'] = $attributes_values['options_values_price'] * $exchange_rate;
$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
$products[$i][$option]['options_values_id'] = $value;
$products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
}
}
$categories_path = get_categories_path($products[$i]['id']);
$products_type[$i] = get_products_type($categories_path);
$categories_path_list[$i] = $categories_path;
}
$row_num = 0;
$is_quantity_qualified = true;
$printing_fee_count = 0;
// Scan for each product type
for ($k=0; $k ' . $products_type_description . ''); $first_product = false; } $i = $j; $quantity = $quantity + $products[$i]['quantity']; if (($row_num/2) == floor($row_num/2)) { $info_box_contents[] = array('params' => 'class="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $row_num ++; $cur_row = sizeof($info_box_contents) - 1; $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => 'Remove ' . tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'])); // check minimum quantity $min_quantity = get_min_quantity($categories_path_list[$i]); if ($products[$i]['quantity'] < $min_quantity) { $is_quantity_qualified = false; $error_message = " The quantity does not meet minimum quantity " . $min_quantity . "."; } else { $error_message = ""; if ($k == PRODUCT_TYPE_KIPPOT_ISRAEL) { $is_printing_available_for_kippot_israel = true; } } // quantity of satin kippot from Israel if ($k == PRODUCT_TYPE_KIPPOT_ISRAEL && is_on_path(CAT_ID_KIPPOT_ISRAEL_SATIN, $categories_path_list[$i]) && $products[$i]['quantity'] >= $min_quantity) { $quantity_satin_kippot += $products[$i]['quantity']; } $products_name = '
This product can be combined with other similar products in the same category for printing. See: [' . get_products_type_desc($k) . '] '; if ($k == PRODUCT_TYPE_KIPPOT_USCANADA) { $text_printing .= " (Lines of Hebrew text will incur a surcharge. Hebrew font is standard.)"; } else if ($k == PRODUCT_TYPE_BENCHERS_USCANADA || $k == PRODUCT_TYPE_BENCHERS_ISRAEL || $k == PRODUCT_TYPE_BENCHERS_ELITE) { $text_printing .= " (Printing will be on the front cover unless otherwise specified.)"; } } else { if ($printing_fee > 0) { $text_printing = $printing_head_word . " is available for " . $currencies->display_price($printing_fee, 0.0, 1) . '.'; } else { $text_printing = $printing_head_word . " is available for free"; } $text_printing .= ' This product can be combined with other similar products in the same category for printing. See: [' . get_products_type_desc($k) . '] '; $text_printing .= ' '; } // show check box for remove if printing, empty if not if ($is_printing == "true") { $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => 'Remove ' . tep_draw_checkbox_field('chk_printing_' . $k, '', false, 'onclick="check_printing_text(' . $k . ')"')); } else { $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => ' '); } // show printing title $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => $text_printing); // empty column $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => ' '); // show price if printing, empty if not if ($is_printing == "true") { $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => '' . $currencies->display_price($printing_fee, 0.0, 1) . ''); } else { $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => ' '); } // // show printing text input field when printing is selected // if ($is_printing == "true") { if (($row_num/2) == floor($row_num/2)) { $info_box_contents[] = array('params' => 'class="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $row_num ++; $cur_row = sizeof($info_box_contents) - 1; // empty column $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => " "); // // printing text fields // if ($k == PRODUCT_TYPE_KETUBOTS_USCANADA || $k == PRODUCT_TYPE_KETUBOTS_ISRAEL) { $ketubo_type = sessread('ketubo_type'); $ketubot_html = ''; $ketubot_html .= " "; $ketubot_html .= "(Please note: We cannot be held liable for errors due to incorrectly entered details. Please review personalization details with the wedding officiant prior to submitting your order. We cannot be held liable for any mistakes in transcribing Hebrew words where entered in English characters.) "; print ''; for ($m=0; $m '; } else if ($ketubo_post_var[$m][0] == 'field') { $ketubot_html .= $ketubo_post_var[$m][2] . ' '; if ($ketubo_post_var[$m][1] == 'textbox') { $ketubot_html .= ' '; if ($ketubo_post_var[$m][4] == 'yes') { $ketubot_html .= ' '; } $ketubot_html .= ' '; } else if ($ketubo_post_var[$m][1] == 'dropdownlist') { $ketubot_html .= ' '; } } } $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => $ketubot_html); // empty column $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => ' '); // empty column $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => ' '); $ketubot_html = ''; $detail_on_click = '"change_ketubo_type(\'detail\');return true;"'; if (sessread('ketubo_type_option') == 'rabbi') { $detail_checked = ''; $rabbi_checked = ' checked="true" '; } else if (sessread('ketubo_type_option') == 'detail') { $detail_checked = ' checked="true" '; $rabbi_checked = ''; } else { $detail_checked = ''; $rabbi_checked = ''; $detail_on_click = ''; } $ketubot_html .= ''; $ketubot_html .= 'I have all the personalization details confirmed. Please process my order with the details as listed above.'; $ketubot_html .= ' '; $ketubot_html .= ''; $ketubot_html .= 'Have the Simcha Centre confirm all personalization details with the wedding officiant. (PLEASE NOTE: Simcha Centre cannot be held responsible for incorrect information given by the wedding officiant.) [' . $currencies->display_price(FEE_KETUBO_RABBI, 0.0, 1) . ']'; if (($row_num/2) == floor($row_num/2)) { $info_box_contents[] = array('params' => 'class="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $row_num ++; $cur_row = sizeof($info_box_contents) - 1; // empty column $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => " "); $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => $ketubot_html); // empty column $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => ' '); if ($ketubo_type == 'rabbi') { $ketupo_rabbi_fee = '' . $currencies->display_price(FEE_KETUBO_RABBI, 0.0, 1) . ''; } else { $ketupo_rabbi_fee = ''; } // empty column $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => $ketupo_rabbi_fee); $ketubot_html = ''; if ($ketubo_type == 'rabbi') { for ($m=0; $m '; } else if ($ketubo_post_var[$m][0] == 'field') { $ketubot_html .= $ketubo_post_var[$m][2] . ' '; if ($ketubo_post_var[$m][1] == 'textbox') { $ketubot_html .= ' '; if ($ketubo_post_var[$m][4] == 'yes') { $ketubot_html .= ' '; } $ketubot_html .= ' '; } else if ($ketubo_post_var[$m][1] == 'dropdownlist') { $ketubot_html .= ' '; } } } } if (($row_num/2) == floor($row_num/2)) { $info_box_contents[] = array('params' => 'class="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $row_num ++; $cur_row = sizeof($info_box_contents) - 1; // empty column $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => " "); $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => $ketubot_html); // empty column $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => ' '); // empty column $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => ' '); } else if ($k == PRODUCT_TYPE_BENCHERS_USCANADA || $k == PRODUCT_TYPE_BENCHERS_ISRAEL || $k == PRODUCT_TYPE_BENCHERS_ELITE) { $font_select[1] = ''; $font_select[2] = ''; $fonts_sample[1] = ''; $fonts_sample[2] = ''; $font_title[1] = ""; $font_title[2] = ""; $total_lines = 3; $maxlength = 25; $total_lines = 5; for ($m=0; $m<5; $m++) { $font_select[$m] = ''; $fonts_sample[$m] = ''; $font_title[$m] = ""; } $font_select[0] = gen_font_list('printing_colour_' . $k, $colour_list_benchers, get_printing_colour($k)); $fonts_sample[0] = ''; $font_title[0] = "Colour: "; // output three lines for ($p=0; $p<$total_lines; $p++) { if ($p != 0) { // title if (($row_num/2) == floor($row_num/2)) { $info_box_contents[] = array('params' => 'class="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $row_num ++; $cur_row = sizeof($info_box_contents) - 1; // empty column $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => " "); } $para_fee_value1 = 'printing_fee_value_' . $printing_fee_count; $para_fee_value2 = 'printing_fee_value_' . $k . '_line' . $p; $para_span_id = 'printing_fee_display_' . $k . '_line' . $p; $para_printing_text = 'printing_text_' . $k . '_line' . $p; $change_text_function = 'adjust_printing_fee(\'' . $para_fee_value1 . '\', \'' . $para_fee_value2 . '\', \'' . $para_span_id . '\', \'' . $para_printing_text . '\')'; if ($k == PRODUCT_TYPE_KIPPOT_USCANADA) { $change_text_function_http_para = 'hebrew2.php?var=' . $para_printing_text; } else { $change_text_function_http_para = 'hebrew.php?var=' . $para_printing_text; } $set_before_hebrew = 'document.cart_quantity[\'before_hebrew_para1\'].value=\'' . $para_fee_value1 . '\';'; $set_before_hebrew .= 'document.cart_quantity[\'before_hebrew_para2\'].value=\'' . $para_fee_value2 . '\';'; $set_before_hebrew .= 'document.cart_quantity[\'before_hebrew_para3\'].value=\'' . $para_span_id . '\';'; $set_before_hebrew .= 'document.cart_quantity[\'before_hebrew_para4\'].value=\'' . $para_printing_text . '\';'; $hebrew[$p] = ''; $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data" colspan=2', 'text' => '' . " " . $hebrew[$p] . " " . $font_title[$p] . $font_select[$p] . " " . $fonts_sample[$p] . '' . '' ); $printing_fee_count ++; // empty column $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => ' '); } } else if ($k == PRODUCT_TYPE_KIPPOT_USCANADA || $k == PRODUCT_TYPE_KIPPOT_ISRAEL) { $font_select[1] = ''; $font_select[2] = ''; $fonts_sample[1] = ''; $fonts_sample[2] = ''; $font_title[1] = ""; $font_title[2] = ""; $total_lines = 3; $maxlength = 25; if ($k == PRODUCT_TYPE_KIPPOT_USCANADA) { $font_select[0] = gen_font_list('printing_font_' . $k . '_line0', $font_list_kippot_uscanada, get_printing_font($k, 0)); $fonts_sample[0] = ''; $font_title[0] = "Font: "; $font_select[1] = gen_font_list('printing_colour_' . $k, $colour_list_kippot_uscanada, get_printing_colour($k)); $fonts_sample[1] = ''; $font_title[1] = "Colour: "; $maxlength = 21; // font and colour if (($row_num/2) == floor($row_num/2)) { $info_box_contents[] = array('params' => 'class="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $row_num ++; $cur_row = sizeof($info_box_contents) - 1; $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => " "); $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'params' => 'class="productListing-data" valign="top" colspan=2', 'text' => '
' . tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'])); $products_name = '
'; $info_box_contents[$cur_row][] = array('params' => ' class="s_cart_td2"', 'text' => $products_name); $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="s_cart_td"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2" class="input"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="s_cart_td"', 'text' => '' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ''); } new productListingBox($info_box_contents); ?> |
||||||||||||||||||||||||||||||||
format($cart->show_total()); ?> |
format($cart->show_total()); ?> |
path)-2; if (isset($navigation->path[$back])) { echo '' . tep_image_button('button_continue_shopping.png', IMAGE_BUTTON_CONTINUE_SHOPPING) . ''; } ?> ' . tep_image_button('button_checkout1.png', IMAGE_BUTTON_CHECKOUT) . ''; echo tep_image_submit('button_checkout1.png', IMAGE_BUTTON_CHECKOUT, 'onclick="document.cart_quantity[\'goto_shipping\'].value=\'1\';"'); } ?> |
' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . ''; ?> |