Hi, I have very little knowledge about php...
I'm having a slight problem with installing a Quantity Discount contribution to the osmax 1.7. It works perfectly well for my public (retailer) customers but as soon as I have customers from other groups the discount does not function. I wish the discounts to be the same for each group... Here is the coding on that page... Does somebody have an idea... I imagine I should be able to change it just by playing on the position of the code concerning the quantity discounts :
Any idea?Code:$pf->loadProduct((int)$HTTP_GET_VARS['products_id'], (int)$languages_id); $products_price=$pf->getPriceString();
Thanx in advance
Code:if ($new_price = tep_get_products_special_price($product_info['products_id'])) { // ***** Begin Separate price per customer mod ***** global $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) $product_info['products_price']= $scustomer_group_price['customers_group_price']; // ***** Begin Separate price per customer mod ***** $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { //************Begin Separate Price per Customer mod ************** $pf->loadProduct((int)$HTTP_GET_VARS['products_id'], (int)$languages_id); $products_price=$pf->getPriceString(); global $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'"); if ( $customer_group['customers_group_id'] != 0) { if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $products_price = $currencies->display_price($customer_group_price['customers_group_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); }




LinkBack URL
About LinkBacks






Bookmarks