Quote Originally Posted by Calljj View Post
Products are set to display only when stock is 0.
to replicate, just set a standard product to zero stock quantity, no priced by attributes, then discount it.
the original price shows, the discount price = 0.00
Thank you for that information. Will look into one or more ways to address it. It sounds like based on the discussion of the product being out-of-stock that it the store is setup to not allow purchase of product if the quantity is 0 or less. Therefore that will be/become a factor moving forwards.

It does make me wonder how much if any of the shopping_cart related operation can be hooked into to allow the "addition" of a product in this condition so that the price updating can be visualized, but not to allow the addition of the product through another process. Otherwise (without editing the shopping_cart class), price updating may not be permitted for product that are out-of-stock when store is set to require a positive quantity of stock to add product to the cart.

Of course an alternative would be to include a separate version of a shopping_cart type class that does allow such a condition, but then it would need to either be maintained in parallel with the version of ZC or any other changes uniquely made to it, which just makes things more difficult to maintain consistent operation and the software.

A potential middle ground to that could be to evaluate the in-stock quantity and then manage the price determination based on that knowledge. :/

Some things to review and determine.

If you believe you need a temporary fix to the issue in the interim I can advise how to disable the price update feature for this condition.

In: includes/modules/pages/YOUR_PRODUCT_TYPE/jscript_dynamic_price_updater.php

Before the last line of this code (code section starts about line 23):
Code:
if (empty($pidp)) {
    $load = false;
  }
  if ($load)
Make it look like:
Code:
if (empty($pidp)) {
    $load = false;
  }

  if ($load && STOCK_ALLOW_CHECKOUT === 'false') {
    $pid_quant = $db->Execute("SELECT products_quantity FROM " . TABLE_PRODUCTS . " WHERE products_id = ". (int)$pid, false, false, 0, true);
    if ($pid_quant->EOF || $pid_quant->fields['products_quantity'] <= 0) {
      if (zen_get_products_special_price((int)$pid, false) !== false) {
        $load = false;
      } 
    }
  }
   
  if ($load)
This is based on the report that there is an issue when a special/sale exists for a product that has a stock quantity of zero and the store does not permit "over-purchase" of the quantity. It does not address the possibility of quantity discounts having the same "result" of displaying the discounted price as 0.