I am trying to do some customization in the way specials are priced.
If ordered quantity is less than products_quantity_order_min then take the product_price
if ordered quantity is >= products_quantity_order_min then take the special price.
I made the following changes in the includes/modules/pages/shopping_cart/header_php.php
Zencart Version 1.56
$quantityField = zen_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4" class="cart_input_'.$products[$i]['id'].'"');\
if($products[$i]['quantity'] >= $products[$i]['products_quantity_order_min'])
{
$ppe = $products[$i]['final_price'];
}
else
{
$ppe=$products[$i]['products_price '];
}
$ppe = zen_round(zen_add_tax($ppe, zen_get_tax_rate($products[$i]['tax_class_id'])), $currencies->get_decimal_places($_SESSION['currency']));
$ppt = $ppe * $products[$i]['quantity'];
It does not take the products_price when if($products[$i]['quantity'] < $products[$i]['products_quantity_order_min']). Product_price is 0
Can someone help me?
Bookmarks