Hi! I am trying to use quantity discounts. This is the quantity discount feature that comes with Zen Cart, not any sort of add-on module. I am using version 1.3.8a with php 5.2.9. The basic problem is that although the proper discounts show up as a table at the bottom of the product page, they are not appropriately reflected in the shopping cart when the products are added.
I have read through several of the existing posts on quantity discounts and found the "known bug" fix in which you edit the shoping_cart.php file. I have done that. The affected parts of that file, as they currently stand for my shop are pasted in below. I really hope I did something wrong with that -- please let me know!
and// reset($this->contents); // breaks cart
$check_contents = $this->contents;
reset($check_contents);
while (list($products_id, ) = each($check_contents)) {
$test_id = zen_get_prid($products_id);
if ($test_id == $chk_products_id) {
$in_cart_mixed_qty_discount_quantity += $check_contents[$products_id]['qty'];
}
}
return $in_cart_mixed_qty_discount_quantity;
}
/**
* Method to calculate the number of items in a cart based on an abitrary property
The specific quantity discount settings that I have, for a representative product, are listed below. This is intended to give a 7 cent discount for 300 or more, and 14 cents for 600 or more. Base price is $1.40.// reset($this->contents); // breaks cart
$check_contents = $this->contents;
reset($check_contents);
while (list($products_id, ) = each($check_contents)) {
$test_id = zen_get_prid($products_id);
if ($test_id == $chk_products_id) {
$in_cart_mixed_qty += $check_contents[$products_id]['qty'];
}
}
return $in_cart_mixed_qty;
}
/**
* Method to calculate item quantity, bounded the mixed/min units settings
Discount Qty Applies to Mixed Attributes: No
Discount Type: Amount off Discount Priced from: Price
Level Min Qty DiscVal CalcPrice ExtendedPrice
Discount 1 300 0.0700 $1.33 x 300 = $399.00
Discount 2 600 0.1400 $1.26 x 600 = $756.00
If you want to see this in action, you can look at the following product page. Before adding anything to the cart, be sure you put something in the space provided for "Enter File URL" since that is a required text attribute.
http://www.podscriptgenie.com/index....&products_id=6
I feel like I must be missing something really obvious with this. I would appreciate any help or suggestions anyone can offer!!
Thanks, and best wishes,
Kate



