osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Quantity Discounts + Customer Groups

This is a discussion on Quantity Discounts + Customer Groups within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; Hi, I have very little knowledge about php... I'm having a slight problem with installing a Quantity Discount contribution to ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 10-27-2004, 07:20 AM
New Member
 
Join Date: Oct 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
mat123slade
Default Quantity Discounts + Customer Groups

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 :

Code:
$pf->loadProduct((int)$HTTP_GET_VARS['products_id'], (int)$languages_id);
    $products_price=$pf->getPriceString();
Any idea?

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']));
  }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
customer groups jschafer52 osCMax v2 Customization/Mods 0 11-28-2006 06:13 PM
customer groups joanstead osCMax v2 Features Discussion 3 02-20-2006 03:44 AM
Easy Populate - Customer Pricing/groups RoyceK osCMax v1.7 General Mods Discussion 1 02-08-2006 07:24 PM
Separate pricing per customer No groups in Products zel osCMax v1.7 General Mods Discussion 6 02-20-2005 01:49 PM
Setting up quantity discounts FSUddin osCommerce 2.2 Modification Help 2 12-11-2004 09:17 AM


All times are GMT -8. The time now is 11:54 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax