Daffodil Posted August 1, 2006 Share Posted August 1, 2006 (edited) I want a discount of 10% to be calculated on an entire order when someone buys 2 or more products. I added the Discount Per Quantity sort order contribution (thanks!) and it works fine. However, I have 3 customer groups set up - retail, wholesale and dropship. I want the discount not to be applied for wholesale and dropship customers. Is it possible to put in some code to effectively 'hide' the quantity discount for those groups? Any help or advice would be very much appreciated! Thanks :) Edited August 1, 2006 by Daffodil Quote Link to comment Share on other sites More sharing options...
Guest Posted August 1, 2006 Share Posted August 1, 2006 perhaps you should try this module instead http://www.oscommerce.com/community/contributions,716 Quote Link to comment Share on other sites More sharing options...
Daffodil Posted August 2, 2006 Author Share Posted August 2, 2006 perhaps you should try this module insteadhttp://www.oscommerce.com/community/contributions,716 Thanks, that is what I have, sorry I didn't explain enough. I need something extra that will discount order total based on the quantity of products ordered by one customer group only. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted August 3, 2006 Share Posted August 3, 2006 I need something extra that will discount order total based on the quantity of products ordered by one customer group only. I think there is often something like a check on whether a order total module is enabled or not. Like in ot_total.php: function ot_total() { $this->code = 'ot_total'; $this->title = MODULE_ORDER_TOTAL_TOTAL_TITLE; $this->description = MODULE_ORDER_TOTAL_TOTAL_DESCRIPTION; $this->enabled = ((MODULE_ORDER_TOTAL_TOTAL_STATUS == 'true') ? true : false); Can't you use that to disable that module based on $_SESSION['sppc_customer_group_id'] (0 for retail) ? Quote Link to comment Share on other sites More sharing options...
Daffodil Posted August 8, 2006 Author Share Posted August 8, 2006 I think there is often something like a check on whether a order total module is enabled or not. Like in ot_total.php: function ot_total() { $this->code = 'ot_total'; $this->title = MODULE_ORDER_TOTAL_TOTAL_TITLE; $this->description = MODULE_ORDER_TOTAL_TOTAL_DESCRIPTION; $this->enabled = ((MODULE_ORDER_TOTAL_TOTAL_STATUS == 'true') ? true : false); Can't you use that to disable that module based on $_SESSION['sppc_customer_group_id'] (0 for retail) ? Thanks Jan. I see what you are saying and have found the relevant bit of code in the mod I installed but have no idea how to do what you suggest (not a coder :( ) Thanks for your help, I really appreciate it :) Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted August 8, 2006 Share Posted August 8, 2006 I see what you are saying and have found the relevant bit of code in the mod I installed but have no idea how to do what you suggest How about: // BOF Separate Pricing Per Customer global $sppc_customer_group_id; if(!tep_session_is_registered('sppc_customer_group_id')) { $this->cg_id = '0'; } else { $this->cg_id = $sppc_customer_group_id; } // EOF Separate Pricing Per Customer $this->enabled = ((MODULE_ORDER_TOTAL_TOTAL_STATUS == 'true' && ($this->cg_id == '0')) ? true : false); Quote Link to comment Share on other sites More sharing options...
Daffodil Posted August 11, 2006 Author Share Posted August 11, 2006 (edited) How about: // BOF Separate Pricing Per Customer global $sppc_customer_group_id; if(!tep_session_is_registered('sppc_customer_group_id')) { $this->cg_id = '0'; } else { $this->cg_id = $sppc_customer_group_id; } // EOF Separate Pricing Per Customer $this->enabled = ((MODULE_ORDER_TOTAL_TOTAL_STATUS == 'true' && ($this->cg_id == '0')) ? true : false); Thank you so much for that Jan. I have it working now and really appreciate your help! :D Edited August 11, 2006 by Daffodil Quote Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2006 Share Posted November 28, 2006 Thank you so much for that Jan. I have it working now and really appreciate your help! :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.