Zen Cart Logo
Forums / General Questions / quantity discounts for attributes

quantity discounts for attributes

Views: 20,174

Results 1 to 2 of 2
10 Oct 2014, 2:09 PM
#1
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

quantity discounts for attributes

I am trying to get the actual price of the product displaying when the price is determined by an attribute.

The site sells products that can be color or black and white. The attribute of black & white subtracts pricing - $34.95 for color (base product) $24.95 or -$10 for black & white (attribute).

I have used the Attributes Qty Price Discount to set up pricing for the attributes - as minus numbers.

I need to be able to show the attributes actual pricing in the quantity discounts table - not the minus numbers which show now. Since this is actually a mathematical equation of product price minus attribute discount, I thought that I could combine the two scripts to make that happen.

Well, it's definitely more complicated than that.

The attribute quantity pricing has a number of cases that aren't described in the code so that I can see what's what:

switch (true) {
                  case ($i+2==$n):
                    $zc_disp_qty = $attribute_table_cost[$i-2]+1 . '+';
                    break;
                  case ($i <= 1 and $attribute_table_cost[$i] == 1):
                    $zc_disp_qty = '1';
                    break;
                  case ($i <= 1 and $attribute_table_cost[$i] != 1):
                    $zc_disp_qty = '1-' . $attribute_table_cost[$i];
                    break;
                  case ($i > 1 and $attribute_table_cost[$i-2]+1 != $attribute_table_cost[$i]):
                    $zc_disp_qty = $attribute_table_cost[$i-2]+1 . '-' . $attribute_table_cost[$i];
                    break;
                  case ($i > 1 and $attribute_table_cost[$i-2]+1 == $attribute_table_cost[$i]):
                    $zc_disp_qty = $attribute_table_cost[$i];
                    break;
                }

I would like to at least identify which case is at work here.

Where the pricing for the attributes actually show it has this.

.  $currencies->display_price($attribute_table_cost[$i+1], zen_get_tax_rate($_GET['products_tax_class_id'])) .

So I figured on sticking in the code from the quantity discounts for the product into this but I obviously missed the boat as the numbers show are 6 for each level.

So the question - finally - is there a way to do this that I haven't thought of? Having the attributes quantity pricing display as -7 or -8 etc simply makes no sense to the buyer.

You can see what I'm talking about here: http://www.picpads.com/zencart/index.php?main_page=product_info&cPath=1&products_id=9

14 Oct 2014, 1:34 PM
#2
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: quantity discounts for attributes

so since I got no answer, we actually went back to basics rather than use this advanced method. We created different products instead of having products with attributes. Ridiculous but true.