There is an error in the install instructions for catalogincludesclassesshopping_cart.php:
Find (around line 110 [around line 119 in edited file]):
if ($this->in_cart($products_id_string)) {
$this->update_quantity($products_id_string, $qty, $attributes);
} else {
$this->contents[$products_id_string] = array('qty' => (int)$qty);
Replace with:
// BOF qpbpp
$products_query = tep_db_query("select cb.products_id, ptdc.discount_categories_id, customers_basket_quantity from " . TABLE_CUSTOMERS_BASKET . " cb left join " . TABLE_PRODUCTS_TO_DISCOUNT_CATEGORIES . " ptdc using(products_id) where customers_id = '" . (int)$customer_id . "'");
while ($products = tep_db_fetch_array($products_query)) {
$this->contents[$products['products_id']] = array('qty' => $products['customers_basket_quantity'], 'discount_categories_id' => $products['discount_categories_id']);
// EOF qpbpp
This is wrong, it SHOULD BE:
// BOF qpbpp
if ($this->in_cart($products_id_string)) {
$this->update_quantity($products_id_string, $qty, $attributes, $discount_categories_id);
} else {
$this->contents[$products_id_string] = array('qty' => (int)$qty, 'discount_categories_id' => $discount_categories_id);
// EOF qpbpp
The change: $products['discount_categories_id'] => $discount_categories_id
This caused different items in same categories not to qualify for quantity price breaks.
The premodified catalogincludesclassesshopping_cart.php (for fresh installs) in the full package is correct and is modified as above--just the instructions file was incorrect.
Nothing attached, just blank file
Sorry for double post, somehow my post was truncated.
More...




LinkBack URL
About LinkBacks









Bookmarks