Quote Originally Posted by yuki View Post
Hi guys,


Firstly, I appreciated for providing such a nice MOD,

My site v1.38a working wonderful.


Now I found a small bug as described here


In Shopping Cart, during shopping on zencart before loged in,

case ok

1. product within a stock
2. product with out of stock

Only No.2 shows error message as expected

case NG-1

1. product with out of stock
2. product within a stock

BOTH shows error. No.2 should not be an error.


case NG-2

1. product within a stock
2. product with out of stock
3. product within a stock

NO.2 & NO.3 shows error. No.3 should not be an error


case NG-3

1. product with out of stock
2. product within a stock
3. product within a stock

All product show error


I think it is clear there is a little bug for kind of "Array" coding?

I have no found this bug on v.1.4.11
after upgraded v.1.4.12 It happens.


Any idea?



Yuki....
A client of mine noticed this bug, and I was tasked to fix it.

You only need to add two lines of code to one of the files included in the addon package.

  1. Open up /includes/modules/pages/shopping_cart/header_php.php
  2. Around line #137, you should see this line:
    1. if (zen_not_null($stock_check))
  3. Add this line right before the line you found in step #2
    1. $flagStockCheck = NULL;
  4. Around line #172, you should see this line:
    1. $productArray[$i] = array(...
  5. Add an array element and value like this:
    1. 'stockAvailable'=>$stockAvailable,


That should fix the issue with products below out of stock items showing up as out of stock when they aren't. It should also make the available stock quantities show up like they are supposed to.

I hope this helped you out. :)