I'm running Zen Cart v1.3.8a/v1.3.8 and I've instituted the following code (which I got from page 3 of this thread) in my product_listing.php file to display the lowest price available with quantity discounts:
Code:
case 'PRODUCT_LIST_PRICE':
// $lc_price = zen_get_products_discount_price_qty((int)$_GET['products_id'],20000);
$lc_price = zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000);
$lc_price = number_format($lc_price, 2);
$lc_text='As low as: $' . $lc_price . '<br>';
It works great on my category index pages main product listing area, but when I implement it in my new_products.php and featured_products.php module files, it displays the "As low as" price as $0.00 on every page that module is used on except the sub-category listing page. In other words it works here: http://babybeecards.com/index.php?ma...ndex&cPath=1_3
but not here: http://babybeecards.com/index.php?ma...=index&cPath=1
On my new_products.php mod file the code looks like this:
Code:
while (!$new_products->EOF) {
$products_price = zen_get_products_discount_price_qty((int)$new_products->fields['products_id'],20000);
$products_price = number_format($lc_price, 2);
$lc_text='As low as: $' . $products_price . '<br>';
if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $lc_text);
Can anyone help me out?