Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Quantity Discounts with Variants Rate Topic   - - - - -

 
  • plinkplink
  • Member
  • Members
  • Join Date: 25-Apr 10
  • 156 posts

Posted 02 November 2011 - 02:20 PM #1

Some of my product variants (size for example) have price modifiers. I need to be able to apply quantity discounts and variants on the same product.

This has been done already for previous versions of CS Cart here:
http://forum.cs-cart...__1#entry108593

...but I can't get it to work with v2.2.2.

This Cs Cart installation shows it in action:
http://www.thebutter...rfly-decor.html

...notice that when you change the size of the product, the quantity discounts also change.

This seems like a fairly simple mod that should be included out-of-the-box.

If anyone has done this mod and gotten it working with v2.2.2 please let me know!
My site: 3-Ring Binders and Organization at UniKeep.com.

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12044 posts

Posted 10 January 2012 - 07:24 PM #2

You might want to look at this addon to see if it meets your needs: http://forum.cs-cart...discount-plans/

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • plinkplink
  • Member
  • Members
  • Join Date: 25-Apr 10
  • 156 posts

Posted 10 January 2012 - 07:28 PM #3

Nice. I'll keep it in mind. Thanks.
My site: 3-Ring Binders and Organization at UniKeep.com.

 
  • cmroanirgo
  • Newbie
  • Trial users
  • Join Date: 16-Feb 12
  • 10 posts

Posted 10 March 2012 - 07:05 AM #4

Like you, I was dumbfounded when I noticed the quantity discount prices NOT updating when you change the options. I'm not sure how good a solution this is, but it may just work for you.

PS cs-cart: This really should be part of the standard install.

Make these changes to your [csart]/addons/my_changes folder (as documented in kb, somewhere).
init.php:
<?php

if ( !defined('AREA') ) { die('Access denied'); }

fn_register_hooks(
  'get_additional_product_data'
);
?>

And in funcs.php:

<?php

if ( !defined('AREA') ) { die('Access denied'); }

function fn_my_changes_get_additional_product_data(&$product, $auth, $options, $params)
{
  foreach ($product['prices'] as $id=>$price_data)
  {
	$price_data['price'] = fn_apply_options_modifiers($product['selected_options'], $price_data['price'], 'P');
	$product['prices'][$id] = $price_data;
  }
}

I haven't extensively tested it....perhaps one of the more senior members of these forums (or cs cart themselves) can verify it...?

I've looked through the code and the only place that the prices collection is actually used (ie 'read') seems to be in "views\products\components\products_qty_discount.tpl", so the changes should be pretty safe, without affecting any cart calculations at all.

 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4915 posts

Posted 10 March 2012 - 08:46 AM #5

this is now as std in the new Ultimate release, makes sense.

John

Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2