Jump to content

peteravu

Members
  • Content count

    321
  • Joined

  • Last visited

  • Days Won

    1

peteravu last won the day on September 12 2011

peteravu had the most liked content!

1 Follower

Profile Information

  • Real Name
    peter avu
  • Gender
    Male

Recent Profile Visitors

7,063 profile views
  1. peteravu

    Seperate Pricing Per Customer v3.5

    I have modified the product_listing.php as below. but I now have the problem when I want attribute price to add 12USD retail and 10USD on group "1", then for every attribute price changes I add on groupe"1" some attribute disappears and finally non of the attributes shows in group"1". What is wrong in the code below? // BOF SPPC Hide attributes from customer groups $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 "); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <p><?php echo TEXT_PRODUCT_OPTIONS; ?></p> <p> <!-- // Code segment includes/modified for Multiple product option lines. // maintainance and Qns : Harishyam :> feenix_666@yahoo.com --> <?php if ($products_options_total['total'] == 1) { for($i=0;$i<$products_attributes['total'];$i++) { $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($n = 0 ; $n < count($products_options); $n++) { for ($i = 0; $i < count($cg_attr_prices) ; $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$n]['products_attributes_id']) { $products_options[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices) ; $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($n = 0 ; $n < count($products_options); $n++) { $products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']); if ($products_options[$n]['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } // EOF SPPC attributes mod if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <?php $count = 1; $maxPerList = 20; $total = $products_attributes['total']; if ($products_options_total['total'] == 1) { echo "<ul style='float:left;'>"; //Start list for($i=0;$i<$products_attributes['total'];$i++) { $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($n = 0 ; $n < count($products_options); $n++) { for ($i = 0; $i < count($cg_attr_prices) ; $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$n]['products_attributes_id']) { $products_options[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices) ; $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($n = 0 ; $n < count($products_options); $n++) { $products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']); if ($products_options[$n]['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } echo '<li><input type="text" name='.$i.'_quantity value="" style="text-align:right;" size="3">'; echo tep_draw_hidden_field($i.'_id[' . $products_options_name['products_options_id'] . ']', $products_options_array[$i]['id']) . $products_options_array[$i]['text']; echo "</li>"; if ($count % $maxPerList == 0 && $count != $total) { //Check if remainder is 0 or if it is the last product echo "</ul><ul style='float:left; padding-left: 10px;'>"; ///Close list and start a new one } $count++; } } // End of loop echo "</ul>"; //Close any left open tag } } }} else { //do your regular thing
  2. Today I uploaded Sort Order, in Shopping cart, Shopping cart box, checkout and order. In 2.3.1 v 1.0 By default the Sort Order is after how the customers add the product to the cart. This will Sort Order first after the product name than after attributes name. See example here http://www.oscommerc...showtopic=69260 Thanks to Laurent “foxp2” for make this working and also thanks to Monika “Monika in Germany” Find it here: http://addons.oscommerce.com/info/8274
  3. Today I uploaded Multiple Attribute entry boxes in product info page v1.0 for 2.3.1 This contribution provides replacement for the dropdown in product info to attribute entry boxes. It allows the customer to submit Multiple attributes and Multiple quantities per product. 1) Now can have more up to 99 attributes per product changes it if you need. 2) Now after each 15 attributes it splits up in a new column. Use this thread for upgrades, comments etc. Hope somebody can clean up the code. As I think that there is some code that is not needed here from separate_price_per_customers_4.2.2_for_2.3.1. find it here Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
  4. Today I uploaded the Add Multiple Product in Product Listing for 2.3.1 v.1.0 This contribution provide another replacement for the standard product listing module. It allows the customer to submit multiple products, with multiple quantities per product. It will give you input field for every item with plus/minus button Use this thread for upgrades, comments etc. I hope somebody will make the attributes work as the first upgrade. find it here Add Multiple Product in Product Listing for 2.3.1
  5. I am working on the same thing. What I have left is the product with attributes now don’t work, that need to be a dropdown to select the attributes. I need help on this. But what I did to now so it works on 2.3.1 is. I used Add Multiple Products with plus/minus buttons made a new product_listing_multi.php that now look like this, with good help from Jim kymation. <?php echo tep_draw_form('cart_multi', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_multi'));?> <script language=javascript> function changeValue(textObject,delta){ var myVal = parseInt(textObject.value); if (myVal == NaN) { myVal = 0; } else { myVal = myVal + delta; } /* check that it is not negetive */ if (myVal < 0) { myVal = 0; } textObject.value = myVal; return; } </script> <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); ?> <div class="contentText"> <?php if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <span id="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span> </tr> </table> <br> <div> <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <br /> <?php } $prod_list_contents = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingHeader">' . ' <tr>'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_MIN_ORDER_QTY': $lc_align = 'center'; $lc_text = ' ' . TABLE_HEADING_MIN_ORDER_QTY . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $prod_list_contents .= ' <td' . (tep_not_null($lc_align) ? ' align="' . $lc_align . '"' : '') . '>' . $lc_text . '</td>'; } $prod_list_contents .= ' </tr>' . ' </table>' . ' </div>'; if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); $prod_list_contents .= ' <div class="ui-widget-content ui-corner-bottom productListTable">' . ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingData">'; while ($listing = tep_db_fetch_array($listing_query)) { $rows++; $prod_list_contents .= ' <tr>'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $prod_list_contents .= ' <td>' . $listing['products_model'] . '</td>'; break; case 'PRODUCT_LIST_NAME': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></td>'; } else { $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></td>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a></td>'; break; case 'PRODUCT_LIST_PRICE': if (tep_not_null($listing['specials_new_products_price'])) { $prod_list_contents .= ' <td align="right"><del>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></td>'; } else { $prod_list_contents .= ' <td align="right">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>'; } break; case 'PRODUCT_LIST_QUANTITY': $prod_list_contents .= ' <td align="right">' . $listing['products_quantity'] . '</td>'; break; case 'PRODUCT_LIST_MIN_ORDER_QTY': $prod_list_contents .= ' <td align="right">' . $lc_text = ' ' . $listing['products_min_order_qty'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $prod_list_contents .= ' <td align="right">' . $listing['products_weight'] . '</td>'; break; case 'PRODUCT_LIST_IMAGE': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } else { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } break; case 'PRODUCT_LIST_BUY_NOW': $prod_list_contents .= ' <td align="center"><input type=button value=" -1" onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),-1);return false;"><input type="text" name="add_id['.$number_of_products.']" id="add_id_'.$listing['products_id'].'" value="0" size="3"><input type=button value="+1" onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing['products_id'].'\'),1);return false;">'; $prod_list_contents .= ' <input type="hidden" name="products_id[' . $number_of_products . ']" value="' . $listing['products_id'] . '"></td>'; break; } } $prod_list_contents .= ' </tr>'; } $prod_list_contents .= ' </table>' . ' </div>' . '</div>'; echo $prod_list_contents; } else { ?> <p><?php echo TEXT_NO_PRODUCTS; ?></p> <?php } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <br /> <div> <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="right" class="main"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></td> </tr> </table> </form> <?php } ?> </div> Installation ------------ catalog/includes/modules/products_listing_multi.php can be simply copied to the directory. catalog/includes/application_top.php First in application_top.php find the lines if (isset($HTTP_GET_VARS['action'])) { if (DISPLAY_CART == 'true') { $goto = FILENAME_SHOPPING_CART; $parameters = array('action', 'cPath', 'products_id', 'pid'); } else { $goto = basename($PHP_SELF); if ($HTTP_GET_VARS['action'] == 'buy_now') { $parameters = array('action', 'pid', 'products_id'); } else { $parameters = array('action', 'pid'); } } and add immediately after add these lines ///////////////////////////////////////// Products Multi ////////////////////// if ($HTTP_GET_VARS['action'] == 'add_multi') { $parameters = array('action', 'pid', 'products_id'); }# ///////////////////////////////////////// Products Multi ////////////////////// then just below this find the line switch ($HTTP_GET_VARS['action']) { and add the lines ///////////////////////////////////////// Products Multi ////////////////////// // multi_product_add case 'add_multi': for ($i=0; $i<=sizeof($HTTP_POST_VARS['products_id']);$i++) { if($_POST['add_id'][$i] >= 1) $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['id'] [$i]))+($HTTP_POST_VARS['add_id'][$i]), $HTTP_POST_VARS['id'][$i]); } tep_redirect(tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params($parameters), 'NONSSL')); break; ///////////////////////////////////////// Products Multi ////////////////////// change the following define in catalog/includes/filenames.php define('FILENAME_PRODUCT_LISTING', 'product_listing.php'); change to define('FILENAME_PRODUCT_LISTING', 'product_listing_multi.php')
  6. How to get this button to add to cart? now it dont add anything This is in line 26 and near the end at line 251 <td align="right" class="main"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></td> <form name="cart_multi" method="post" action="<?php echo tep_href_link(FILENAME_SHOPPING_CART, tep_get_all_get_params(array('action')) . 'action=add_multi', 'NONSSL'); ?>"> <script language=javascript> function changeValue(textObject,delta){ var myVal = parseInt(textObject.value); if (myVal == NaN) { myVal = 0; } else { myVal = myVal + delta; } /* check that it is not negetive */ if (myVal < 0) { myVal = 0; } textObject.value = myVal; return; } </script> <?php /* $Id$ adapted for Separate Pricing Per Customer v4.2 2007/08/23 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); ?> <div class="contentText"> <?php if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="right" class="main"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></td> </tr> </table> <br> <div> <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <br /> <?php } $prod_list_contents = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingHeader">' . ' <tr>'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_MIN_ORDER_QTY': $lc_align = 'center'; $lc_text = ' ' . TABLE_HEADING_MIN_ORDER_QTY . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $prod_list_contents .= ' <td' . (tep_not_null($lc_align) ? ' align="' . $lc_align . '"' : '') . '>' . $lc_text . '</td>'; } $prod_list_contents .= ' </tr>' . ' </table>' . ' </div>'; if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); // BOF Separate Pricing per Customer $no_of_listings = tep_db_num_rows($listing_query); // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } while ($_listing = tep_db_fetch_array($listing_query)) { $listing[] = $_listing; $list_of_prdct_ids[] = $_listing['products_id']; } // next part is a debug feature, when uncommented it will print the info that this module receives /* echo '<pre>'; print_r($listing); echo '</pre>'; */ // get all product prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where products_id in (" . implode(',', $list_of_prdct_ids) . ") and pg.customers_group_id = '" . $customer_group_id . "'"); // $no_of_pg_products = tep_db_num_rows($pg_query) ; while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => '', 'final_price' => $pg_array['price']); } for ($x = 0; $x < $no_of_listings; $x++) { // replace products prices with those from customers_group table if(!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if( $listing[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $listing[$x]['products_price'] = $new_prices[$i]['products_price']; $listing[$x]['final_price'] = $new_prices[$i]['final_price']; } } } // end if(!empty($new_prices) $listing[$x]['specials_new_products_price'] = ''; // makes sure that a retail specials price doesn't carry over to another customer group $listing[$x]['final_price'] = $listing[$x]['products_price']; // final price should not be the retail special price } // end for ($x = 0; $x < $no_of_listings; $x++) } // end if ($customer_group_id != '0') // an extra query is needed for all the specials $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where products_id in (" . implode(',', $list_of_prdct_ids) . ") and status = '1' and customers_group_id = '" . $customer_group_id . "'"); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price'] , 'final_price' => $specials_array['specials_new_products_price']); } // add the correct specials_new_products_price and replace final_price for ($x = 0; $x < $no_of_listings; $x++) { if(!empty($new_s_prices)) { for ($i = 0; $i < count($new_s_prices); $i++) { if( $listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_s_prices[$i]['final_price']; } } } // end if(!empty($new_s_prices) } // end for ($x = 0; $x < $no_of_listings; $x++) $prod_list_contents .= ' <div class="ui-widget-content ui-corner-bottom productListTable">' . ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingData">'; // while ($listing = tep_db_fetch_array($listing_query)) { (was original code) for ($x = 0; $x < $no_of_listings; $x++) { $rows++; $prod_list_contents .= ' <tr>'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $prod_list_contents .= ' <td>' . $listing[$x]['products_model'] . '</td>'; break; case 'PRODUCT_LIST_NAME': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a></td>'; } else { $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a></td>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a></td>'; break; case 'PRODUCT_LIST_PRICE': if (tep_not_null($listing[$x]['specials_new_products_price'])) { $prod_list_contents .= ' <td align="right"><del>' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span></td>'; } else { $prod_list_contents .= ' <td align="right">' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</td>'; } break; case 'PRODUCT_LIST_QUANTITY': $prod_list_contents .= ' <td align="right">' . $listing[$x]['products_quantity'] . '</td>'; break; case 'PRODUCT_LIST_MIN_ORDER_QTY': $prod_list_contents .= ' <td align="right">' . $lc_text = ' ' . $listing[$x]['products_min_order_qty'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $prod_list_contents .= ' <td align="right">' . $listing[$x]['products_weight'] . '</td>'; break; case 'PRODUCT_LIST_IMAGE': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } else { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } break; case 'PRODUCT_LIST_BUY_NOW': $prod_list_contents .= ' <td align="center">' . $lc_text = '<input type=button value=" -1" onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing[$x]['products_id'].'\'),-1);return false;"><input type="text" name="add_id['.$number_of_products.']" id="add_id_'.$listing[$x]['products_id'].'" value="0" size="3"><input type=button value="+1" onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing[$x]['products_id'].'\'),1);return false;">'; $lc_text .= '<input type="hidden" name="products_id['.$number_of_products.']" value="'.$listing[$x]['products_id'].'">'; break; } } $prod_list_contents .= ' </tr>'; } $prod_list_contents .= ' </table>' . ' </div>' . '</div>'; echo $prod_list_contents; } else { ?> <p><?php echo TEXT_NO_PRODUCTS; ?></p> <?php } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <br /> <div> <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="right" class="main"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></td> </tr> </table> </form> <?php } ?> </div>
  7. peteravu

    One Page Checkout Support

    Funny I found out the error "There was an error setting payment method, please inform (shop name) about this error." don't come if I remove the payment method so that there are non payment method. But also if I add one more payment method so there are 2 payment method than the error also don't come. but if only 1 payment method than the error comes and I tried with different payment method but same result. how to do?
  8. peteravu

    One Page Checkout Support

    For the error "There was an error setting payment method, please inform (shop name) about this error." This is the HTML output <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>shop Lamp</title> <base href="http://xxxxxxxx.com/" /> <link rel="stylesheet" type="text/css" href="ext/jquery/ui/peterdesign/jquery-ui-1.8.6.css" /> <script type="text/javascript" src="ext/jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.16.custom.js"></script> <script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" /> <script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script> <link rel="stylesheet" type="text/css" href="ext/960gs/960_24_col.css" /> <link rel="stylesheet" type="text/css" href="stylesheet.css" /> <!-- ONE PAGE START --> <script type="text/javascript" language="javascript" src="ext/jquery/jquery.ajaxq-0.0.1.js"></script> <script type="text/javascript" language="javascript" src="ext/jquery/jQuery.pstrength.js"></script> <script type="text/javascript" language="javascript" src="includes/checkout/checkout.js"></script> <!-- ONE PAGE END --> <!-- ONE PAGE START --> <style> .pstrength-minchar { font-size : 10px; } .fieldRed{ background:#F00;} .buttonP { margin:0 0 0 -6px; text-indent: -9999px; cursor: pointer; width: 16px; height: 16px; float: right; text-align: center; background: url(ext/jquery/ui/redmond/images/ui-icons_2e83ff_256x240.png) 0 -190px no-repeat; } .dec { background-position: -16px -190px; float:left; } </style> <script language="javascript"><!-- function CVVPopUpWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=233,screenX=150,screenY=150,top=150,left=150') } function CVVPopUpWindowEx(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=510,screenX=150,screenY=150,top=150,left=150') } var onePage = checkout; onePage.initializing = true; onePage.ajaxCharset = 'utf-8'; onePage.storeName = 'shop Lamp'; onePage.loggedIn = true; onePage.autoshow = true; onePage.stateEnabled = false; onePage.showAddressInFields = true; onePage.showMessagesPopUp = false; onePage.ccgvInstalled = false; //BOF KGT onePage.kgtInstalled = false; //EOF KGT //BOF POINTS onePage.pointsInstalled = false; //EOF POINTS onePage.shippingEnabled = true; onePage.pageLinks = { checkout: 'http://xxxxxxxx.com/checkout.php?osCsid=1e718f41dae1918eee709997b88f075d&rType=ajax', shoppingCart: 'http://xxxxxxxx.com/shopping_cart.php' } function getFieldErrorCheck($element){ var rObj = {}; switch($element.attr('name')){ case 'billing_firstname': case 'shipping_firstname': rObj.minLength = 2; rObj.errMsg = 'Your First Name must contain a minimum of 2 characters.'; break; case 'billing_lastname': case 'shipping_lastname': rObj.minLength = 2; rObj.errMsg = 'Your Last Name must contain a minimum of 2 characters.'; break; case 'billing_email_address': rObj.minLength = 6; rObj.errMsg = 'Your E-Mail Address must contain a minimum of 6 characters.'; break; case 'billing_street_address': case 'shipping_street_address': rObj.minLength = 3; rObj.errMsg = 'Your Street Address must contain a minimum of 3 characters.'; break; case 'billing_zipcode': case 'shipping_zipcode': rObj.minLength = 4; rObj.errMsg = 'Your Post Code must contain a minimum of 4 characters.'; break; case 'billing_city': case 'shipping_city': rObj.minLength = 3; rObj.errMsg = 'Your City must contain a minimum of 3 characters.'; break; case 'billing_dob': rObj.minLength = 10; rObj.errMsg = 'Your Date of Birth must be in this format: DD/MM/YYYY (eg 29/03/1970)'; break; case 'billing_telephone': rObj.minLength = 3; rObj.errMsg = 'Your Telephone Number must contain a minimum of 3 characters.'; break; case 'billing_country': case 'shipping_country': rObj.errMsg = 'You must select a country from the Countries pull down menu.'; break; case 'billing_state': case 'delivery_state': rObj.minLength = 2; rObj.errMsg = 'Your State must contain a minimum of 2 characters.'; break; case 'password': case 'confirmation': rObj.minLength = 3; rObj.errMsg = 'Your Password must contain a minimum of 3 characters.'; break; } return rObj; } $(document).ready(function (){ $('#pageContentContainer').show(); $('#confirmationBox').dialog({ autoOpen: false, resizable: false, shadow: false, height:300, modal:true, width:430, open: function (){ } }); var loginBoxOpened = false; $('#loginButton').click(function (){ if (loginBoxOpened){ $('#loginBox').dialog('open'); return false; } $('#loginBox').dialog({ resizable: false, shadow: false, height:175, width:250, open: function (){ var $dialog = this; $('input', $dialog).keypress(function (e){ if (e.which == 13){ $('#loginWindowSubmit', $dialog).click(); } }); $('#loginWindowSubmit', $dialog).hover(function (){ this.style.cursor = 'pointer'; }, function (){ this.style.cursor = 'default'; }).click(function (){ var $this = $(this); $this.hide(); var email = $('input[name="email_address"]', $dialog).val(); var pass = $('input[name="password"]', $dialog).val(); onePage.queueAjaxRequest({ url: onePage.pageLinks.checkout, data: 'action=processLogin&email=' + email + '&pass=' + pass, //dataType: 'json', type: 'post', beforeSend: function (){ onePage.showAjaxMessage('Refreshing Shopping Cart'); if ($('#loginStatus', $this.parent()).size() <= 0){ $('<div>') .attr('id', 'loginStatus') .html('Processing Login') .attr('align', 'center') .insertAfter($this); } }, success: function (data){ var txt = jQuery.parseJSON(data); if (txt.success === "true"){ onePage.loggedIn = true; $('#loginStatus', $dialog).html(txt.msg); $('#logInRow').hide(); $('#changeBillingAddressTable').show(); $('#changeShippingAddressTable').show(); $('#newAccountEmail').remove(); $('#diffShipping').parent().parent().parent().remove(); onePage.updateAddressHTML('billing'); onePage.updateAddressHTML('shipping'); $('#shippingAddress').show(); var updateTotals = true; onePage.updateCartView(); onePage.updateFinalProductListing(); onePage.updatePaymentMethods(); if ($(':radio[name="payment"]:checked').size() > 0){ onePage.setPaymentMethod($(':radio[name="payment"]:checked')); updateTotals = false; } onePage.updateShippingMethods(); if ($(':radio[name="shipping"]:checked').size() > 0){ //onePage.setShippingMethod($(':radio[name="shipping"]:checked').val()); onePage.setShippingMethod($(':radio[name="shipping"]:checked')); updateTotals = false; } if (updateTotals == true){ onePage.updateOrderTotals(); } $('#loginBox').dialog('destroy'); }else{ $('#logInRow').show(); $('#loggedInRow').hide(); $('#loginStatus', $dialog).html(txt.msg); setTimeout(function (){ $('#loginStatus').remove(); $('#loginWindowSubmit').show(); }, 6000); setTimeout(function (){ $('#loginStatus').html('Try again in 3'); }, 3000); setTimeout(function (){ $('#loginStatus').html('Try again in 2'); }, 4000); setTimeout(function (){ $('#loginStatus').html('Try again in 1'); }, 5000); } }, errorMsg: 'There was an error logging in, please inform shop Lamp about this error.' }); }); } }); loginBoxOpened = true; return false; }); $('#changeBillingAddress, #changeShippingAddress').click(function (){ var addressType = 'billing'; if ($(this).attr('id') == 'changeShippingAddress'){ addressType = 'shipping'; } $('#addressBook').clone().show().appendTo(document.body).dialog({ shadow: false, width: 550, minWidth: 550, open: function (){ onePage.loadAddressBook($(this), addressType); }, buttons: { 'Cancel': function (){ var $this = $(this); var action = $('input[name="action"]', $this).val(); //alert($(':input, :select, :radio, :checkbox', this).serialize()); if (action == 'selectAddress'){ $this.dialog('close'); }else if (action == 'addNewAddress' || action == 'saveAddress'){ onePage.loadAddressBook($this, addressType); } }, 'Confirm': function (){ var $this = $(this); var action = $('input[name="action"]', $this).val(); if (action == 'selectAddress'){ onePage.queueAjaxRequest({ url: onePage.pageLinks.checkout, beforeSendMsg: 'Setting Address', dataType: 'json', data: $(':input, :radio', this).serialize(), type: 'post', success: function (data){ $this.dialog('close'); if (addressType == 'shipping'){ onePage.updateAddressHTML('shipping'); onePage.updateShippingMethods(); }else{ onePage.updateAddressHTML('billing'); onePage.updatePaymentMethods(); } }, errorMsg: 'There was an error saving your address, please inform shop Lamp about this error.' }); }else if (action == 'addNewAddress'){ onePage.queueAjaxRequest({ url: onePage.pageLinks.checkout, beforeSendMsg: 'Saving New Address', dataType: 'json', data: $(":input", this).serialize(), type: 'post', success: function (data){ onePage.loadAddressBook($this, addressType); }, errorMsg: 'There was an error saving your address, please inform shop Lamp about this error.' }); }else if (action == 'saveAddress'){ var errors = false; $('input[name="firstname"],input[name="lastname"],input[name="street_address"],input[name="city"],*[name="state"],input[name="postcode"],select[name="country"]', this).each( function(){ if($(this).val() == '') errors = true; }); if(errors == false) { onePage.queueAjaxRequest({ url: onePage.pageLinks.checkout, beforeSendMsg: 'Updating Address', dataType: 'json', data: $(":input", this).serialize(), type: 'post', success: function (data){ onePage.loadAddressBook($this, addressType); }, errorMsg: 'There was an error saving your address, please inform shop Lamp about this error.' }); }else { alert('Please fill all the required fields to save this address'); } } }, 'New Address': function (){ var $this = $(this); onePage.queueAjaxRequest({ url: onePage.pageLinks.checkout, data: 'action=getNewAddressForm', type: 'post', beforeSendMsg: 'Loading New Address Form', success: function (data){ $this.html(data); if(onePage.stateEnabled == true) { onePage.addCountryAjax($('select[name="country"]', $this), 'state', 'stateCol') } }, errorMsg: 'There was an error loading new address form, please inform shop Lamp about this error.' }); }, 'Edit Address': function (){ var $this = $(this); onePage.queueAjaxRequest({ url: onePage.pageLinks.checkout, data: 'action=getEditAddressForm&addressID=' + $(':radio[name="address"]:checked', $this).val(), type: 'post', beforeSendMsg: 'Loading Edit Address Form', success: function (data){ $this.html(data); if(onePage.stateEnabled == true) { onePage.addCountryAjax($('select[name="country"]', $this), 'state', 'stateCol') } }, errorMsg: 'There was an error loading edit address form, please inform shop Lamp about this error.' }); } } }); return false; }); onePage.initCheckout(); }); function clearRadeos(){ return true; } //--> </script> <!-- ONE PAGE END --> </head> <body> <div id="bodyWrapper" class="container_24"> <div id="header" class="grid_24"> <div id="storeLogo"><a href="http://xxxxxxxx.com/index.php"><img src="images/store_logo.png" alt="shop Lamp" title=" shop Lamp " /></a></div> <div id="headerShortcuts"> <span class="tdbLink"><a id="tdb1" href="http://xxxxxxxx.com/shopping_cart.php">Cart Contents (15)</a></span><script type="text/javascript">$("#tdb1").button({icons:{primary:"ui-icon-cart"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script><span class="tdbLink"><a id="tdb2" href="http://xxxxxxxx.com/checkout_shipping.php">Checkout</a></span><script type="text/javascript">$("#tdb2").button({icons:{primary:"ui-icon-triangle-1-e"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script><span class="tdbLink"><a id="tdb3" href="http://xxxxxxxx.com/account.php">My Account</a></span><script type="text/javascript">$("#tdb3").button({icons:{primary:"ui-icon-person"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script><span class="tdbLink"><a id="tdb4" href="http://xxxxxxxx.com/logoff.php">Log Off</a></span><script type="text/javascript">$("#tdb4").button().addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script> </div> <script type="text/javascript"> $("#headerShortcuts").buttonset(); </script> </div> <div class="grid_24 ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading"> <a href="http://xxxxxxxx.com" class="headerNavigation">Top</a> » <a href="http://xxxxxxxx.com/index.php" class="headerNavigation">Catalog</a> » <a href="http://xxxxxxxx.com/checkout.php" class="headerNavigation">Checkout</a></div> </div> <div id="bodyContent" class="grid_16 push_4"> <noscript> <p>Please follow the instructions for your web browser:<br /><br />Internet Explorer</p> <ol> <li>On the <strong>Tools</strong> menu, click <strong>Internet Options</strong>, and then click the <strong>Security</strong> tab.</li> <li>Click the <strong>Internet</strong> zone.</li> <li>If you do not have to customize your Internet security settings, click <strong>Default Level</strong>. Then do step 4<blockquote>If you have to customize your Internet security settings, follow these steps:<br /> a. Click <strong>Custom Level</strong>.<br /> b. In the <strong>Security Settings – Internet Zone</strong> dialog box, click <strong>Enable</strong> for <strong>Active Scripting</strong> in the <strong>Scripting</strong>section.</blockquote></li> <li>Click the <strong>Back</strong> button to return to the previous page, and then click the <strong>Refresh</strong> button to run scripts.</li> </ol> <p><br />Firefox</p> <ol> <li>On the <strong>Tools</strong> menu, click <strong>Options</strong>.</li> <li>On the <strong>Content</strong> tab, click to select the <strong>Enable JavaScript</strong> check box.</li> <li>Click the <strong>Go back one page</strong> button to return to the previous page, and then click the <strong>Reload current page</strong> button to run scripts.</li> </ol> <p> </p> </noscript> <!-- ship date --> <script> $(document).ready(function(){ $('#delivery_date').datepicker({ dateFormat: 'yy-mm-dd', minDate: '0d', beforeShowDay: $.datepicker.Weekends }); }); </script> <!-- eof ship date --> <h1>Checkout</h1> <div class="contentContainer"> <form name="checkout" action="http://xxxxxxxx.com/checkout.php" method="post" id=onePageCheckoutForm><input type="hidden" name="action" value="process" /><table width="100%"> <tr> <td> <!--<table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" height="14" class="infoBoxHeading">Shopping Cart</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" alt="" width="11" height="14" /></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> <tr> <td class="boxText"><div id="shoppingCart"><table width="100%"> <tr> <td class="smallText"><b>Products Name</b></td> <td class="smallText"><b>Quantity</b></td> <td class="smallText" align="right"><b>Price Each</b></td> <td class="smallText" align="right"><b>Total Price</b></td> <td class="smallText" align="right"></td> </tr> <tr> <td class="main" valign="top">Round Ball 18.5 cm (100 balls)<br><nobr><small> <i> - Color: 01 Red</i></small></nobr><input type="hidden" name="id[29{1}1][1]" value="1" /></td> <td class="main" valign="top"><input type="text" name="qty[29{1}1]" value="1" size="3" onkeyup="$('input[name^=qty]').attr('readonly', true); $('#updateCartButton').trigger('click')" /></td> <td class="main" align="right" valign="top">300.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top">300.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top"><a href="Javascript:void();" linkData="action=removeProduct&pID=29{1}1" class="removeFromCart"><img src="images/icons/cross.gif"></a></td> </tr> <tr> <td class="main" valign="top">Round Ball 18.5 cm (100 balls)<br><nobr><small> <i> - Color: 02 Orange Yellow</i></small></nobr><input type="hidden" name="id[29{1}2][1]" value="2" /></td> <td class="main" valign="top"><input type="text" name="qty[29{1}2]" value="2" size="3" onkeyup="$('input[name^=qty]').attr('readonly', true); $('#updateCartButton').trigger('click')" /></td> <td class="main" align="right" valign="top">300.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top">600.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top"><a href="Javascript:void();" linkData="action=removeProduct&pID=29{1}2" class="removeFromCart"><img src="images/icons/cross.gif"></a></td> </tr> <tr> <td class="main" valign="top">Round Ball 18.5 cm (100 balls)<br><nobr><small> <i> - Color: 03 Orange</i></small></nobr><input type="hidden" name="id[29{1}3][1]" value="3" /></td> <td class="main" valign="top"><input type="text" name="qty[29{1}3]" value="3" size="3" onkeyup="$('input[name^=qty]').attr('readonly', true); $('#updateCartButton').trigger('click')" /></td> <td class="main" align="right" valign="top">300.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top">900.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top"><a href="Javascript:void();" linkData="action=removeProduct&pID=29{1}3" class="removeFromCart"><img src="images/icons/cross.gif"></a></td> </tr> <tr> <td class="main" valign="top">Round Ball 18.5 cm (100 balls)<br><nobr><small> <i> - Color: 04 Parstel Pink</i></small></nobr><input type="hidden" name="id[29{1}4][1]" value="4" /></td> <td class="main" valign="top"><input type="text" name="qty[29{1}4]" value="4" size="3" onkeyup="$('input[name^=qty]').attr('readonly', true); $('#updateCartButton').trigger('click')" /></td> <td class="main" align="right" valign="top">300.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top">1,200.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top"><a href="Javascript:void();" linkData="action=removeProduct&pID=29{1}4" class="removeFromCart"><img src="images/icons/cross.gif"></a></td> </tr> <tr> <td class="main" valign="top">Round Ball 18.5 cm (100 balls)<br><nobr><small> <i> - Color: 05 Light Burgundy</i></small></nobr><input type="hidden" name="id[29{1}5][1]" value="5" /></td> <td class="main" valign="top"><input type="text" name="qty[29{1}5]" value="5" size="3" onkeyup="$('input[name^=qty]').attr('readonly', true); $('#updateCartButton').trigger('click')" /></td> <td class="main" align="right" valign="top">300.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top">1,500.00 [font="Tahoma"]฿[/font]</td> <td class="main" align="right" valign="top"><a href="Javascript:void();" linkData="action=removeProduct&pID=29{1}5" class="removeFromCart"><img src="images/icons/cross.gif"></a></td> </tr> </table></div> <br><div style="float:right" class="orderTotals"><table cellpadding="2" cellspacing="0" border="0"> <tr> <td align="right" class="main">Sub-Total:</td> <td align="right" class="main">4,500.00 [font="Tahoma"]฿[/font]</td> </tr> <tr> <td align="right" class="main">Total:</td> <td align="right" class="main"><strong>4,500.00 [font="Tahoma"]฿[/font]</strong></td> </tr></table></div><div style="float:left"><span name="updateQuantities" id="updateCartButton"></span></div></td> </tr> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> </table> </td> </tr> </table> --> <div style="width:100%; margin:auto;"><span> </span></div> <div style="float:right; width:50%; margin:auto;"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" height="14" class="infoBoxHeading">Billing Address</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" alt="" width="11" height="14" /></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> <tr> <td class="boxText"><table width="100%"> <tr id="logInRow" style="display:none"> <td class="mainContent"> Already have an account? <a href="http://xxxxxxxx.com/login.php" id="loginButton"><img src="includes/languages/english/images/buttons/Login" alt="" /></a></td> </tr> </table><div id="billingAddress"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" width="30%">First Name: </td> <td class="main" width="70%"><input type="text" name="billing_firstname" value="peter" class="required" style="width:80%;float:left;" /></td> </tr> <tr> <td class="main" width="30%">Last Name: </td> <td class="main" width="70%"><input type="text" name="billing_lastname" value="jespersen" class="required" style="width:80%;float:left;" /></td> </tr> <tr> <td class="main" nowrap>Country:</td> <td class="main"><select name="billing_country" class="required" style="float:left;width:80%"><option value="">Please Select</option><option value="1">Afghanistan</option><option value="2">Albania</option><option value="3">Algeria</option><option value="4">American Samoa</option><option value="5">Andorra</option><option value="6">Angola</option><option value="7">Anguilla</option><option value="8">Antarctica</option><option value="9">Antigua and Barbuda</option><option value="10">Argentina</option><option value="11">Armenia</option><option value="12">Aruba</option><option value="13">Australia</option><option value="14">Austria</option><option value="15">Azerbaijan</option><option value="16">Bahamas</option><option value="17">Bahrain</option><option value="18">Bangladesh</option><option value="19">Barbados</option><option value="20">Belarus</option><option value="21">Belgium</option><option value="22">Belize</option><option value="23">Benin</option><option value="24">Bermuda</option><option value="25">Bhutan</option><option value="26">Bolivia</option><option value="27">Bosnia and Herzegowina</option><option value="28">Botswana</option><option value="29">Bouvet Island</option><option value="30">Brazil</option><option value="31">British Indian Ocean Territory</option><option value="32">Brunei Darussalam</option><option value="33">Bulgaria</option><option value="34">Burkina Faso</option><option value="35">Burundi</option><option value="36">Cambodia</option><option value="37">Cameroon</option><option value="38">Canada</option><option value="39">Cape Verde</option><option value="40">Cayman Islands</option><option value="41">Central African Republic</option><option value="42">Chad</option><option value="43">Chile</option><option value="44">China</option><option value="45">Christmas Island</option><option value="46">Cocos (Keeling) Islands</option><option value="47">Colombia</option><option value="48">Comoros</option><option value="49">Congo</option><option value="50">Cook Islands</option><option value="51">Costa Rica</option><option value="52">Cote D'Ivoire</option><option value="53">Croatia</option><option value="54">Cuba</option><option value="55">Cyprus</option><option value="56">Czech Republic</option><option value="57">Denmark</option><option value="58">Djibouti</option><option value="59">Dominica</option><option value="60">Dominican Republic</option><option value="61">East Timor</option><option value="62">Ecuador</option><option value="63">Egypt</option><option value="64">El Salvador</option><option value="65">Equatorial Guinea</option><option value="66">Eritrea</option><option value="67">Estonia</option><option value="68">Ethiopia</option><option value="69">Falkland Islands (Malvinas)</option><option value="70">Faroe Islands</option><option value="71">Fiji</option><option value="72">Finland</option><option value="73">France</option><option value="74">France, Metropolitan</option><option value="75">French Guiana</option><option value="76">French Polynesia</option><option value="77">French Southern Territories</option><option value="78">Gabon</option><option value="79">Gambia</option><option value="80">Georgia</option><option value="81">Germany</option><option value="82">Ghana</option><option value="83">Gibraltar</option><option value="84">Greece</option><option value="85">Greenland</option><option value="86">Grenada</option><option value="87">Guadeloupe</option><option value="88">Guam</option><option value="89">Guatemala</option><option value="90">Guinea</option><option value="91">Guinea-bissau</option><option value="92">Guyana</option><option value="93">Haiti</option><option value="94">Heard and Mc Donald Islands</option><option value="95">Honduras</option><option value="96">Hong Kong</option><option value="97">Hungary</option><option value="98">Iceland</option><option value="99">India</option><option value="100">Indonesia</option><option value="101">Iran (Islamic Republic of)</option><option value="102">Iraq</option><option value="103">Ireland</option><option value="104">Israel</option><option value="105">Italy</option><option value="106">Jamaica</option><option value="107">Japan</option><option value="108">Jordan</option><option value="109">Kazakhstan</option><option value="110">Kenya</option><option value="111">Kiribati</option><option value="112">Korea, Democratic People's Republic of</option><option value="113">Korea, Republic of</option><option value="114">Kuwait</option><option value="115">Kyrgyzstan</option><option value="116">Lao People's Democratic Republic</option><option value="117">Latvia</option><option value="118">Lebanon</option><option value="119">Lesotho</option><option value="120">Liberia</option><option value="121">Libyan Arab Jamahiriya</option><option value="122">Liechtenstein</option><option value="123">Lithuania</option><option value="124">Luxembourg</option><option value="125">Macau</option><option value="126">Macedonia, The Former Yugoslav Republic of</option><option value="127">Madagascar</option><option value="128">Malawi</option><option value="129">Malaysia</option><option value="130">Maldives</option><option value="131">Mali</option><option value="132">Malta</option><option value="133">Marshall Islands</option><option value="134">Martinique</option><option value="135">Mauritania</option><option value="136">Mauritius</option><option value="137">Mayotte</option><option value="138">Mexico</option><option value="139">Micronesia, Federated States of</option><option value="140">Moldova, Republic of</option><option value="141">Monaco</option><option value="142">Mongolia</option><option value="143">Montserrat</option><option value="144">Morocco</option><option value="145">Mozambique</option><option value="146">Myanmar</option><option value="147">Namibia</option><option value="148">Nauru</option><option value="149">Nepal</option><option value="150">Netherlands</option><option value="151">Netherlands Antilles</option><option value="152">New Caledonia</option><option value="153">New Zealand</option><option value="154">Nicaragua</option><option value="155">Niger</option><option value="156">Nigeria</option><option value="157">Niue</option><option value="158">Norfolk Island</option><option value="159">Northern Mariana Islands</option><option value="160">Norway</option><option value="161">Oman</option><option value="162">Pakistan</option><option value="163">Palau</option><option value="164">Panama</option><option value="165">Papua New Guinea</option><option value="166">Paraguay</option><option value="167">Peru</option><option value="168">Philippines</option><option value="169">Pitcairn</option><option value="170">Poland</option><option value="171">Portugal</option><option value="172">Puerto Rico</option><option value="173">Qatar</option><option value="174">Reunion</option><option value="175">Romania</option><option value="176">Russian Federation</option><option value="177">Rwanda</option><option value="178">Saint Kitts and Nevis</option><option value="179">Saint Lucia</option><option value="180">Saint Vincent and the Grenadines</option><option value="181">Samoa</option><option value="182">San Marino</option><option value="183">Sao Tome and Principe</option><option value="184">Saudi Arabia</option><option value="185">Senegal</option><option value="186">Seychelles</option><option value="187">Sierra Leone</option><option value="188">Singapore</option><option value="189">Slovakia (Slovak Republic)</option><option value="190">Slovenia</option><option value="191">Solomon Islands</option><option value="192">Somalia</option><option value="193">South Africa</option><option value="194">South Georgia and the South Sandwich Islands</option><option value="195">Spain</option><option value="196">Sri Lanka</option><option value="197">St. Helena</option><option value="198">St. Pierre and Miquelon</option><option value="199">Sudan</option><option value="200">Suriname</option><option value="201">Svalbard and Jan Mayen Islands</option><option value="202">Swaziland</option><option value="203">Sweden</option><option value="204">Switzerland</option><option value="205">Syrian Arab Republic</option><option value="206">Taiwan</option><option value="207">Tajikistan</option><option value="208">Tanzania, United Republic of</option><option value="209" selected="selected">Thailand</option><option value="210">Togo</option><option value="211">Tokelau</option><option value="212">Tonga</option><option value="213">Trinidad and Tobago</option><option value="214">Tunisia</option><option value="215">Turkey</option><option value="216">Turkmenistan</option><option value="217">Turks and Caicos Islands</option><option value="218">Tuvalu</option><option value="219">Uganda</option><option value="220">Ukraine</option><option value="221">United Arab Emirates</option><option value="222">United Kingdom</option><option value="223">United States</option><option value="224">United States Minor Outlying Islands</option><option value="225">Uruguay</option><option value="226">Uzbekistan</option><option value="227">Vanuatu</option><option value="228">Vatican City State (Holy See)</option><option value="229">Venezuela</option><option value="230">Viet Nam</option><option value="231">Virgin Islands (British)</option><option value="232">Virgin Islands (U.S.)</option><option value="233">Wallis and Futuna Islands</option><option value="234">Western Sahara</option><option value="235">Yemen</option><option value="236">Yugoslavia</option><option value="237">Zaire</option><option value="238">Zambia</option><option value="239">Zimbabwe</option></select><div class="success_icon ui-icon-green ui-icon-circle-check" style="margin-left: 3px; margin-top: 1px; float: left;" title="false" /></td> </tr> <tr> <td class="main" nowrap>Company Name:</td> <td class="main"><input type="text" name="billing_company" style="width:80%;float:left;" /></td> </tr> <tr> <td class="main" nowrap>Street Address:</td> <td class="main"><input type="text" name="billing_street_address" value="fisk" class="required" style="width:80%;float:left;" /></td> </tr> <tr> <td colspan="2"> <table cellpadding="0" cellspacing="0" border="0" width="92%"> <tr> <td class="main" width="33%">City:</td> <td class="main" width="33%">Post Code:</td> </tr> <tr> <td class="main" ><input type="text" name="billing_city" value="cmai ny" class="required" style="width:80%;float:left;" /></td> <td class="main"><input type="text" name="billing_zipcode" value="50000" class="required" style="width:80%;float:left;" /></td> </tr> </table> </td> </tr> </table></div><div style="float:right;"><span class=""><a href="http://xxxxxxxx.com/checkout_payment_address.php" id="changeBillingAddress" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-home"></span><span class="ui-button-text">Change Address</span></a></span></div></td> </tr> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> </table> </td> </tr> </table> </div> <div style="float:right; width:50%; margin:auto;"> <!-- ship date --> <h2>Preferred Delivery Date</h2> <div class="contentText"> Please choose your preferred delivery date.<br /><br /><input type="text" name="delivery_date" id="delivery_date" /> </div> <!-- eof ship date --> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" height="14" class="infoBoxHeading">Shipping Address</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" alt="" width="11" height="14" /></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> <tr> <td class="boxText"><div id="shippingAddress"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" width="30%">First Name:</td> <td class="main" width="70%"><input type="text" name="shipping_firstname" value="peter" class="required" style="width:80%;float:left;" /></td> </tr> <tr> <td class="main" width="30%">Last Name:</td> <td class="main" width="70%"><input type="text" name="shipping_lastname" value="jespersen" class="required" style="width:80%;float:left;" /></td> </tr> <tr> <td class="main" nowrap>Country:</td> <td class="main" ><select name="shipping_country" class="required" style="width:80%;float:left;"><option value="">Please Select</option><option value="1">Afghanistan</option><option value="2">Albania</option><option value="3">Algeria</option><option value="4">American Samoa</option><option value="5">Andorra</option><option value="6">Angola</option><option value="7">Anguilla</option><option value="8">Antarctica</option><option value="9">Antigua and Barbuda</option><option value="10">Argentina</option><option value="11">Armenia</option><option value="12">Aruba</option><option value="13">Australia</option><option value="14">Austria</option><option value="15">Azerbaijan</option><option value="16">Bahamas</option><option value="17">Bahrain</option><option value="18">Bangladesh</option><option value="19">Barbados</option><option value="20">Belarus</option><option value="21">Belgium</option><option value="22">Belize</option><option value="23">Benin</option><option value="24">Bermuda</option><option value="25">Bhutan</option><option value="26">Bolivia</option><option value="27">Bosnia and Herzegowina</option><option value="28">Botswana</option><option value="29">Bouvet Island</option><option value="30">Brazil</option><option value="31">British Indian Ocean Territory</option><option value="32">Brunei Darussalam</option><option value="33">Bulgaria</option><option value="34">Burkina Faso</option><option value="35">Burundi</option><option value="36">Cambodia</option><option value="37">Cameroon</option><option value="38">Canada</option><option value="39">Cape Verde</option><option value="40">Cayman Islands</option><option value="41">Central African Republic</option><option value="42">Chad</option><option value="43">Chile</option><option value="44">China</option><option value="45">Christmas Island</option><option value="46">Cocos (Keeling) Islands</option><option value="47">Colombia</option><option value="48">Comoros</option><option value="49">Congo</option><option value="50">Cook Islands</option><option value="51">Costa Rica</option><option value="52">Cote D'Ivoire</option><option value="53">Croatia</option><option value="54">Cuba</option><option value="55">Cyprus</option><option value="56">Czech Republic</option><option value="57">Denmark</option><option value="58">Djibouti</option><option value="59">Dominica</option><option value="60">Dominican Republic</option><option value="61">East Timor</option><option value="62">Ecuador</option><option value="63">Egypt</option><option value="64">El Salvador</option><option value="65">Equatorial Guinea</option><option value="66">Eritrea</option><option value="67">Estonia</option><option value="68">Ethiopia</option><option value="69">Falkland Islands (Malvinas)</option><option value="70">Faroe Islands</option><option value="71">Fiji</option><option value="72">Finland</option><option value="73">France</option><option value="74">France, Metropolitan</option><option value="75">French Guiana</option><option value="76">French Polynesia</option><option value="77">French Southern Territories</option><option value="78">Gabon</option><option value="79">Gambia</option><option value="80">Georgia</option><option value="81">Germany</option><option value="82">Ghana</option><option value="83">Gibraltar</option><option value="84">Greece</option><option value="85">Greenland</option><option value="86">Grenada</option><option value="87">Guadeloupe</option><option value="88">Guam</option><option value="89">Guatemala</option><option value="90">Guinea</option><option value="91">Guinea-bissau</option><option value="92">Guyana</option><option value="93">Haiti</option><option value="94">Heard and Mc Donald Islands</option><option value="95">Honduras</option><option value="96">Hong Kong</option><option value="97">Hungary</option><option value="98">Iceland</option><option value="99">India</option><option value="100">Indonesia</option><option value="101">Iran (Islamic Republic of)</option><option value="102">Iraq</option><option value="103">Ireland</option><option value="104">Israel</option><option value="105">Italy</option><option value="106">Jamaica</option><option value="107">Japan</option><option value="108">Jordan</option><option value="109">Kazakhstan</option><option value="110">Kenya</option><option value="111">Kiribati</option><option value="112">Korea, Democratic People's Republic of</option><option value="113">Korea, Republic of</option><option value="114">Kuwait</option><option value="115">Kyrgyzstan</option><option value="116">Lao People's Democratic Republic</option><option value="117">Latvia</option><option value="118">Lebanon</option><option value="119">Lesotho</option><option value="120">Liberia</option><option value="121">Libyan Arab Jamahiriya</option><option value="122">Liechtenstein</option><option value="123">Lithuania</option><option value="124">Luxembourg</option><option value="125">Macau</option><option value="126">Macedonia, The Former Yugoslav Republic of</option><option value="127">Madagascar</option><option value="128">Malawi</option><option value="129">Malaysia</option><option value="130">Maldives</option><option value="131">Mali</option><option value="132">Malta</option><option value="133">Marshall Islands</option><option value="134">Martinique</option><option value="135">Mauritania</option><option value="136">Mauritius</option><option value="137">Mayotte</option><option value="138">Mexico</option><option value="139">Micronesia, Federated States of</option><option value="140">Moldova, Republic of</option><option value="141">Monaco</option><option value="142">Mongolia</option><option value="143">Montserrat</option><option value="144">Morocco</option><option value="145">Mozambique</option><option value="146">Myanmar</option><option value="147">Namibia</option><option value="148">Nauru</option><option value="149">Nepal</option><option value="150">Netherlands</option><option value="151">Netherlands Antilles</option><option value="152">New Caledonia</option><option value="153">New Zealand</option><option value="154">Nicaragua</option><option value="155">Niger</option><option value="156">Nigeria</option><option value="157">Niue</option><option value="158">Norfolk Island</option><option value="159">Northern Mariana Islands</option><option value="160">Norway</option><option value="161">Oman</option><option value="162">Pakistan</option><option value="163">Palau</option><option value="164">Panama</option><option value="165">Papua New Guinea</option><option value="166">Paraguay</option><option value="167">Peru</option><option value="168">Philippines</option><option value="169">Pitcairn</option><option value="170">Poland</option><option value="171">Portugal</option><option value="172">Puerto Rico</option><option value="173">Qatar</option><option value="174">Reunion</option><option value="175">Romania</option><option value="176">Russian Federation</option><option value="177">Rwanda</option><option value="178">Saint Kitts and Nevis</option><option value="179">Saint Lucia</option><option value="180">Saint Vincent and the Grenadines</option><option value="181">Samoa</option><option value="182">San Marino</option><option value="183">Sao Tome and Principe</option><option value="184">Saudi Arabia</option><option value="185">Senegal</option><option value="186">Seychelles</option><option value="187">Sierra Leone</option><option value="188">Singapore</option><option value="189">Slovakia (Slovak Republic)</option><option value="190">Slovenia</option><option value="191">Solomon Islands</option><option value="192">Somalia</option><option value="193">South Africa</option><option value="194">South Georgia and the South Sandwich Islands</option><option value="195">Spain</option><option value="196">Sri Lanka</option><option value="197">St. Helena</option><option value="198">St. Pierre and Miquelon</option><option value="199">Sudan</option><option value="200">Suriname</option><option value="201">Svalbard and Jan Mayen Islands</option><option value="202">Swaziland</option><option value="203">Sweden</option><option value="204">Switzerland</option><option value="205">Syrian Arab Republic</option><option value="206">Taiwan</option><option value="207">Tajikistan</option><option value="208">Tanzania, United Republic of</option><option value="209" selected="selected">Thailand</option><option value="210">Togo</option><option value="211">Tokelau</option><option value="212">Tonga</option><option value="213">Trinidad and Tobago</option><option value="214">Tunisia</option><option value="215">Turkey</option><option value="216">Turkmenistan</option><option value="217">Turks and Caicos Islands</option><option value="218">Tuvalu</option><option value="219">Uganda</option><option value="220">Ukraine</option><option value="221">United Arab Emirates</option><option value="222">United Kingdom</option><option value="223">United States</option><option value="224">United States Minor Outlying Islands</option><option value="225">Uruguay</option><option value="226">Uzbekistan</option><option value="227">Vanuatu</option><option value="228">Vatican City State (Holy See)</option><option value="229">Venezuela</option><option value="230">Viet Nam</option><option value="231">Virgin Islands (British)</option><option value="232">Virgin Islands (U.S.)</option><option value="233">Wallis and Futuna Islands</option><option value="234">Western Sahara</option><option value="235">Yemen</option><option value="236">Yugoslavia</option><option value="237">Zaire</option><option value="238">Zambia</option><option value="239">Zimbabwe</option></select><div class="success_icon ui-icon-green ui-icon-circle-check" style="margin-left: 3px; margin-top: 1px; float: left;" title="false" /></td> </tr> <tr> <td class="main" nowrap>Company Name:</td> <td class="main" ><input type="text" name="shipping_company" style="width:80%;float:left;" /></td> </tr> <tr> <td class="main" >Street Address:</td> <td class="main" ><input type="text" name="shipping_street_address" value="fisk" class="required" style="width:80%;float:left;" /></td> </tr> <tr> <td colspan="2"> <table cellpadding="0" cellspacing="0" border="0" width="92%"> <tr> <td class="main" width="33%">City:</td> <td class="main" width="33%">Post Code:</td> </tr> <tr> <td class="main" width="33%"><input type="text" name="shipping_city" value="cmai ny" class="required" style="width:80%;float:left;" /></td> <td class="main" width="33%"><input type="text" name="shipping_zipcode" value="50000" class="required" style="width:80%;float:left;" /></td> </tr> </table> </td> </tr> <tr> <td class="main" colspan="2" align="right"><span class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ui-state-focus" style="padding:5px;" id="updateAddressShipping">Update</span></td> </tr> </table></div><div style="float:right;"><span class=""><a href="http://xxxxxxxx.com/checkout_shipping_address.php" id="changeShippingAddress" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-home"></span><span class="ui-button-text">Change Address</span></a></span></div></td> </tr> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> </table> </td> </tr> </table> </div> <div style="width:100%; margin:auto;"><span><font size="1pt"> </font></span></div> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" height="14" class="infoBoxHeading">Payment Method</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" alt="" width="11" height="14" /></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> <tr> <td class="boxText"><div id="noPaymentAddress" class="noAddress" align="center" style="font-size:15px;display:none;">Please fill in your <b>billing address</b> for payment options</div><div id="paymentMethods"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> <td class="main" width="100%" colspan="2">This is currently the only payment method available to use on this order.</td> <td><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> </tr> <tr> <td><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="moduleRow paymentRow"> <td width="10"><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> <td class="main" width="10"><input type="hidden" name="payment" value="cod" /></td> <td class="main" width="100%"><b>Cash on Delivery</b></td> <td width="10"><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> </tr> </table></td> <td><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> </tr> </table></div></td> </tr> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> </table> </td> </tr> </table> <div style="width:100%; margin:auto;"><span><font size="1pt"> </font></span></div> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" height="14" class="infoBoxHeading">Shipping Method</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" alt="" width="11" height="14" /></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> <tr> <td class="boxText"><div id="noShippingAddress" class="main noAddress" align="center" style="font-size:15px;display:none;">Please fill in <b>at least</b> your billing address to get shipping quotes.</div><div id="shippingMethods"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> <td class="main" width="100%" colspan="2">This is currently the only shipping method available to use on this order.</td> <td><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> </tr> <tr> <td><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> <td class="main" colspan="3"><b>Flat Rate</b> </td> <td width="10"><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> </tr> <tr class="moduleRow shippingRow moduleRowSelected"> <td width="10"><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> <td class="main" width="75%">Best Way</td> <td class="main" align="right" colspan="2">0.00 [font="Tahoma"]฿[/font]<input type="hidden" name="shipping" value="flat_flat" /></td> <td width="10"><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> </tr> </table></td> <td><img src="images/pixel_trans.gif" alt="" width="10" height="1" /></td> </tr> </table></div></td> </tr> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> </table> </td> </tr> </table> <div style="width:100%; margin:auto;"><span><font size="1pt"> </font></span></div> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" height="14" class="infoBoxHeading">Add Comments About Your Order</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" alt="" width="11" height="14" /></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> <tr> <td class="boxText"><table width="100%"> <tr> <td width="50%"><div class="finalProducts"></div><br><div style="float:right" class="orderTotals"><table> <tr> <td align="right" class="main">Sub-Total:</td> <td align="right" class="main">4,500.00 [font="Tahoma"]฿[/font]</td> </tr> <tr> <td align="right" class="main">Total:</td> <td align="right" class="main"><strong>4,500.00 [font="Tahoma"]฿[/font]</strong></td> </tr></table></div><br><br></td> </tr> <tr> <td width="50%" align=center><br><textarea name="comments" cols="60" rows="5"></textarea><br> </td> </tr> </table> </td> </tr> <tr> <td><img src="images/pixel_trans.gif" alt="" width="100%" height="1" /></td> </tr> </table> </td> </tr> </table> <div style="width:100%; margin:auto;"><span><font size="1pt"> </font></span></div> <br> <table width="100%"> <tr id="checkoutYesScript" style="display:none;"> <td id="checkoutMessage"><b>Continue Checkout Procedure</b><br>to confirm this order.</td> <td align="right"><div id="ajaxMessages" style="display:none;"></div><div id="checkoutButtonContainer"><input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ui-state-focus" style="padding:5px;" id="checkoutButton" formUrl="http://xxxxxxxx.com/checkout_process.php" value="Continue" /><input type="hidden" name="formUrl" id="formUrl" value=""></div><div id="paymentHiddenFields" style="display:none;"></div></td> </tr> <tr id="checkoutNoScript"> <td><b>Continue Checkout Procedure</b><br>to update/view your order.</td> <td align="right"><input type="image" src="includes/languages/english/images/buttons/button_update.gif" alt="Update" title=" Update " /></td> </tr> </table> <table width="100%"> <tr> <td width="25%"> <table width="100%"> <tr> <td width="50%" align="right"><img src="images/checkout_bullet.gif" alt="" /></td> <td width="50%"><img src="images/pixel_silver.gif" alt="" width="100%" height="1" /></td> </tr> </table> </td> <td width="25%"> <table width="100%"> <tr> <td width="50%"><img src="images/pixel_silver.gif" alt="" width="100%" height="1" /></td> <td width="50%"><img src="images/pixel_silver.gif" alt="" width="1" height="5" /></td> </tr> </table> </td> </tr> <tr> <td align="center" width="25%" class="checkoutBarTo">Confirmation</td> <td align="center" width="25%" class="checkoutBarTo">Finished!</td> </tr> </table> </td> </tr> </table> </form> </div> <!-- body_eof //--> <!-- dialogs_bof //--> <div id="loginBox" title="Log Into My Account" style="display:none;"> <table cellpadding="2" cellspacing="0" border="0"> <tr> <td>E-Mail Address:</td> <td><input type="text" name="email_address" /></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password" maxlength="40" /></td> </tr> <tr> <td colspan="2" align="right"><a href="http://xxxxxxxx.com/password_forgotten.php">Password forgotten? Click here.</a></td> </tr> <tr> <td colspan="2" align="right"><span class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ui-state-focus" style="padding:5px;" id="loginWindowSubmit">Sign In</span></td> </tr> </table> </div> <div id="confirmationBox" title="Order Confirmation" style="display:none"> <center> <br>Please review your order to make sure it's accurate and click Confirm Order after loading is complete<br> <img id="imgDlgLgr" src="ext/jquery/ui/peterdesign/images/ajax_load.gif"><br> </center> </div> <div id="addressBook" title="Address Book" style="display:none"></div> <div id="newAddress" title="New Address" style="display:none"></div> <!-- dialogs_eof//--> </div> <!-- bodyContent //--> <div id="columnLeft" class="grid_4 pull_16"> <div class="ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading">Categories</div> <div class="ui-widget-content infoBoxContents"><a href="http://xxxxxxxx.com/index.php?cPath=22">Ball</a> (4)<br /><a href="http://xxxxxxxx.com/index.php?cPath=23">Light</a> (1)<br /></div></div> <div class="ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading">Information</div> <div class="ui-widget-content infoBoxContents"> <a href="http://xxxxxxxx.com/shipping.php">Shipping & Returns</a><br /> <a href="http://xxxxxxxx.com/privacy.php">Privacy Notice</a><br /> <a href="http://xxxxxxxx.com/conditions.php">Conditions of Use</a><br /> <a href="http://xxxxxxxx.com/contact_us.php">Contact Us</a> </div></div> <div class="ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading">Quick Find</div> <div class="ui-widget-content infoBoxContents" style="text-align: center;"> <form name="quick_find" action="http://xxxxxxxx.com/advanced_search_result.php" method="get"> <input type="text" name="keywords" size="10" maxlength="30" style="width: 75%" /> <input type="hidden" name="search_in_description" value="1" /><input type="image" src="includes/languages/english/images/buttons/button_quick_find.gif" alt="Quick Find" title=" Quick Find " /><br />Use keywords to find the product you are looking for.<br /><a href="http://xxxxxxxx.com/advanced_search.php"><strong>Advanced Search</strong></a> </form> </div></div></div> <div id="columnRight" class="grid_4"> <div class="ui-widget infoBoxContainer"> <div class="ui-widget-header infoBoxHeading"><a href="http://xxxxxxxx.com/shopping_cart.php">Shopping Cart</a></div> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="ui-widget-content infoBoxContents"><tr><td align="right" valign="top">1 x </td><td valign="top"><a href="http://xxxxxxxx.com/product_info.php?products_id=29{1}1">Round Ball 18.5 cm (100 balls)</a></td></tr><tr><td align="right" valign="top">2 x </td><td valign="top"><a href="http://xxxxxxxx.com/product_info.php?products_id=29{1}2">Round Ball 18.5 cm (100 balls)</a></td></tr><tr><td align="right" valign="top">3 x </td><td valign="top"><a href="http://xxxxxxxx.com/product_info.php?products_id=29{1}3">Round Ball 18.5 cm (100 balls)</a></td></tr><tr><td align="right" valign="top">4 x </td><td valign="top"><a href="http://xxxxxxxx.com/product_info.php?products_id=29{1}4">Round Ball 18.5 cm (100 balls)</a></td></tr><tr><td align="right" valign="top">5 x </td><td valign="top"><a href="http://xxxxxxxx.com/product_info.php?products_id=29{1}5">Round Ball 18.5 cm (100 balls)</a></td></tr><tr><td colspan="2" style="padding-top: 5px; padding-bottom: 2px;"><img src="images/pixel_black.gif" alt="" width="100%" height="1" /></td></tr><tr><td colspan="2" align="right">4,500.00 [font="Tahoma"]฿[/font]</td></tr></table></div></div> <div class="grid_24 footer"> <p align="center">Copyright © 2011 <a href="http://xxxxxxxx.com/index.php">shop Lamp</a><br />Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></p> </div> <div class="grid_24" style="text-align: center; padding-bottom: 20px;"> <a href="http://xxxxxxxx.com/redirect.php?action=banner&goto=2" target="_blank"><img src="images/Foot_logo.png" alt="." title=" . " /></a></div> <script type="text/javascript"> $('.productListTable tr:nth-child(even)').addClass('alt'); </script> <div class="clear"> </div></div> <!-- bodyWrapper //--> </body> </html>
  9. peteravu

    [Contrib] Quick Price Updates for SPPC

    Are you going to share the changes for 2.3.1 in the contribution?
  10. peteravu

    One Page Checkout Support

    I use 2.3.1 After updating with the below code I can now edit and select in the popup window. But if I want a new address nothing get saved after click confirm. And sins the update button don’t work how to remove the update button, and then also change so it is only text and not a text felt on the checkout page? Also I still get this error popping up "There was an error setting payment method, please inform (shop name) about this error." contribution [url="http://addons.oscommerce.com/info/7993"]http://addons.oscommerce.com/info/7993[/url] Fixed Bug in Change Addess linish 11 Oct 2011 There is a bug in the change address section [ both billing and shipping ] such that it always show the primary address . After applying this you can change the billing and shipping address ******ALWAYS TAKE BACKUP OF FILE BEFORE YOU CHANGE****** Uploaded File -------------- checkout.php Replace with the old file only if you have fresh installation else follow these steps 1. Find $billingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')).'</div>'; - Line 361 Replace that with //$billingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')).'</div>'; $billingAddress .= '<div style="float:right;"><span class=""><a href="'.tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL').'" id="changeBillingAddress" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-home"></span><span class="ui-button-text">'.IMAGE_BUTTON_CHANGE_ADDRESS.'</span></a></span></div>'; 2. Find $shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>'; - Line 382 Replace that with //$shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>'; $shippingAddress .= '<div style="float:right;"><span class=""><a href="'.tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL').'" id="changeShippingAddress" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-home"></span><span class="ui-button-text">'.IMAGE_BUTTON_CHANGE_ADDRESS.'</span></a></span></div>'; 3. Find $shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>'; - Line 390 Replace it with //$shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>'; $shippingAddress .= '<div style="float:right;"><span class=""><a href="'.tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL').'" id="changeShippingAddress" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-home"></span><span class="ui-button-text">'.IMAGE_BUTTON_CHANGE_ADDRESS.'</span></a></span></div>'; Hope this helps some
  11. peteravu

    Seperate Pricing Per Customer v3.5

    I change the file bacause the product_listing_multi.php is a 2003. So I change the curent product_listing.php to make a new product_listing_multi.php Not sure if I changed other things so please compare witht your old product_listing.php this is my product_listing_multi.php now <form name="cart_multi" method="post" action="<?php echo tep_href_link(FILENAME_SHOPPING_CART, tep_get_all_get_params(array('action')) . 'action=add_multi', 'NONSSL'); ?>"> <script language=javascript> function changeValue(textObject,delta){ var myVal = parseInt(textObject.value); if (myVal == NaN) { myVal = 0; } else { myVal = myVal + delta; } /* check that it is not negetive */ if (myVal < 0) { myVal = 0; } textObject.value = myVal; return; } </script> <?php /* $Id$ adapted for Separate Pricing Per Customer v4.2 2007/08/23 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); ?> <div class="contentText"> <?php if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="right" class="main"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></td> </tr> </table> <br> <div> <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <br /> <?php } $prod_list_contents = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingHeader">' . ' <tr>'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_MIN_ORDER_QTY': $lc_align = 'center'; $lc_text = ' ' . TABLE_HEADING_MIN_ORDER_QTY . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $prod_list_contents .= ' <td' . (tep_not_null($lc_align) ? ' align="' . $lc_align . '"' : '') . '>' . $lc_text . '</td>'; } $prod_list_contents .= ' </tr>' . ' </table>' . ' </div>'; if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); // BOF Separate Pricing per Customer $no_of_listings = tep_db_num_rows($listing_query); // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } while ($_listing = tep_db_fetch_array($listing_query)) { $listing[] = $_listing; $list_of_prdct_ids[] = $_listing['products_id']; } // next part is a debug feature, when uncommented it will print the info that this module receives /* echo '<pre>'; print_r($listing); echo '</pre>'; */ // get all product prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where products_id in (" . implode(',', $list_of_prdct_ids) . ") and pg.customers_group_id = '" . $customer_group_id . "'"); // $no_of_pg_products = tep_db_num_rows($pg_query) ; while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => '', 'final_price' => $pg_array['price']); } for ($x = 0; $x < $no_of_listings; $x++) { // replace products prices with those from customers_group table if(!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if( $listing[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $listing[$x]['products_price'] = $new_prices[$i]['products_price']; $listing[$x]['final_price'] = $new_prices[$i]['final_price']; } } } // end if(!empty($new_prices) $listing[$x]['specials_new_products_price'] = ''; // makes sure that a retail specials price doesn't carry over to another customer group $listing[$x]['final_price'] = $listing[$x]['products_price']; // final price should not be the retail special price } // end for ($x = 0; $x < $no_of_listings; $x++) } // end if ($customer_group_id != '0') // an extra query is needed for all the specials $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where products_id in (" . implode(',', $list_of_prdct_ids) . ") and status = '1' and customers_group_id = '" . $customer_group_id . "'"); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price'] , 'final_price' => $specials_array['specials_new_products_price']); } // add the correct specials_new_products_price and replace final_price for ($x = 0; $x < $no_of_listings; $x++) { if(!empty($new_s_prices)) { for ($i = 0; $i < count($new_s_prices); $i++) { if( $listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_s_prices[$i]['final_price']; } } } // end if(!empty($new_s_prices) } // end for ($x = 0; $x < $no_of_listings; $x++) $prod_list_contents .= ' <div class="ui-widget-content ui-corner-bottom productListTable">' . ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingData">'; // while ($listing = tep_db_fetch_array($listing_query)) { (was original code) for ($x = 0; $x < $no_of_listings; $x++) { $rows++; $prod_list_contents .= ' <tr>'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $prod_list_contents .= ' <td>' . $listing[$x]['products_model'] . '</td>'; break; case 'PRODUCT_LIST_NAME': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a></td>'; } else { $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a></td>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a></td>'; break; case 'PRODUCT_LIST_PRICE': if (tep_not_null($listing[$x]['specials_new_products_price'])) { $prod_list_contents .= ' <td align="right"><del>' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span></td>'; } else { $prod_list_contents .= ' <td align="right">' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</td>'; } break; case 'PRODUCT_LIST_QUANTITY': $prod_list_contents .= ' <td align="right">' . $listing[$x]['products_quantity'] . '</td>'; break; case 'PRODUCT_LIST_MIN_ORDER_QTY': $prod_list_contents .= ' <td align="right">' . $lc_text = ' ' . $listing[$x]['products_min_order_qty'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $prod_list_contents .= ' <td align="right">' . $listing[$x]['products_weight'] . '</td>'; break; case 'PRODUCT_LIST_IMAGE': if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } else { $prod_list_contents .= ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; } break; case 'PRODUCT_LIST_BUY_NOW': $prod_list_contents .= ' <td align="center">' . $lc_text = '<input type=button value=" -1" onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing[$x]['products_id'].'\'),-1);return false;"><input type="text" name="add_id['.$number_of_products.']" id="add_id_'.$listing[$x]['products_id'].'" value="0" size="3"><input type=button value="+1" onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing[$x]['products_id'].'\'),1);return false;">'; $lc_text .= '<input type="hidden" name="products_id['.$number_of_products.']" value="'.$listing[$x]['products_id'].'">'; break; } } $prod_list_contents .= ' </tr>'; } $prod_list_contents .= ' </table>' . ' </div>' . '</div>'; echo $prod_list_contents; } else { ?> <p><?php echo TEXT_NO_PRODUCTS; ?></p> <?php } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <br /> <div> <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="right" class="main"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></td> </tr> </table> </form> <?php } ?> </div>
  12. now the plus and minus buttons works But the add to card button do not add anything to the shopping cart, how to get it work? case 'PRODUCT_LIST_BUY_NOW': $prod_list_contents .= ' <td align="center">' . $lc_text = '<input type=button value=" -1" onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing[$x]['products_id'].'\'),-1);return false;"><input type="text" name="add_id['.$number_of_products.']" id="add_id_'.$listing[$x]['products_id'].'" value="0" size="3"><input type=button value="+1" onclick="javascript:changeValue(document.getElementById(\'add_id_'.$listing[$x]['products_id'].'\'),1);return false;">'; $lc_text .= '<input type="hidden" name="products_id['.$number_of_products.']" value="'.$listing[$x]['products_id'].'">'; break; } } $prod_list_contents .= ' </tr>'; } $prod_list_contents .= ' </table>' . ' </div>' . '</div>'; echo $prod_list_contents; } else { ?> <p><?php echo TEXT_NO_PRODUCTS; ?></p> <?php } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <br /> <div> <span style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span> <span><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span> </div> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="right" class="main"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></td> </tr> </table> </form> <?php } ?> </div>
  13. Did you find a controbution for 2.3.1? or other ways to get the all product page on 2.3.1, I like to add that to my site also
  14. peteravu

    Seperate Pricing Per Customer v3.5

    How do I know I've seen all sorts of places where the group name could appear? osCommerce has many options where the group name could be visible. with a Contribution has been used by so many uses and has been discussed in so many pages that I think there will be many who have knowledge about this.
×