Zen Cart Logo
Forums / Bug Reports / Qnty Discount Not Working

Qnty Discount Not Working

Locked

Views: 1,344

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
20 Nov 2008, 7:28 AM
#1
memorydecals avatar

memorydecals

New Zenner

Join Date:
Nov 2008
Location:
New Hampshire
Posts:
4
Plugin Contributions:
0

Qnty Discount Not Working

I'm using 1.3.8 and I'm having an issue with addiding the same product with an attribure to the cart and having it calculate the total, well it's calculating but not what it should. I have tried the fix in another post : within the shopping_cart.php in classes. And that did not work. Here is a link to a page I'm working on that has the qty. discount. and when you add just a qty with just on option it works fine, but if you try to mix and match it doesn't.


http://southernleatherthangs.com/index.php?main_page=product_info&cPath=7&products_id=4


I've tried several hours to try and fix. But nothing. Everything I tried I converted back, so yes this is a clean copy.

Thanks

20 Nov 2008, 2:41 PM
#3
memorydecals avatar

memorydecals

New Zenner

Join Date:
Nov 2008
Location:
New Hampshire
Posts:
4
Plugin Contributions:
0

Re: Qnty Discount Not Working

I did try that fix first before posting... And still nothing.

20 Nov 2008, 3:16 PM
#4
memorydecals avatar

memorydecals

New Zenner

Join Date:
Nov 2008
Location:
New Hampshire
Posts:
4
Plugin Contributions:
0

Re: Qnty Discount Not Working

Fixed: Well after I tried the fix again from the above post, I must not have read it clear, but I did figure it out. There are (2) of these, and when I read

Solution:
/includes/classes/shopping_cart.php
at lines 1401 and 1435 you have code that looks like this:

I was thinking my code was off within the file, and it moved the numbers. so anyways.

I found BOTH (2) of

// reset($this->contents); // breaks cart
$check_contents = $this->contents;
while (list($products_id, ) = each($check_contents)) {

And fixed them BOTH (2) with adding your fix:

// reset($this->contents); // breaks cart
$check_contents = $this->contents;
reset($check_contents); while (list($products_id, ) = each($check_contents)) {

Thanks

21 Nov 2008, 5:32 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Qnty Discount Not Working

Thanks for the update and posting what the solution was that you missed on the fix ... this will help others that also miss the reference to the two locations of the code that need to be fixed ... :smile: