New Zenner
- Join Date:
- Feb 2008
- Posts:
- 10
- Plugin Contributions:
- 0
display group pricing discount in product listing
Hello everyone - as above im trying to display group pricing live on the site as opposed to in step 2 of the checkout...
i have not tried to modify ZenCart in this way before so this could get messy.
her is what i have done..
/includes/templates/template_default/templates/tpl_product_info_display.php
I have made the following changes;
<h2 id="productPrices" class="productGeneral">
<?php
// base price
if ($show_onetime_charges_description == 'true') {
$one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
} else {
$one_time = '';
}
echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?></h2>
<h2 id="productPrices" class="productGeneral">
<?php
// base price
if ($show_onetime_charges_description == 'true') {
$one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
} else {
$one_time = '';
}
//echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
$rmprice = $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
echo '<del>';
echo $rmprice;
echo '</del>';
$discount = $rmprice * $group_discount->fields['group_percentage'] / 100;
echo ' £'.$discount.'';
?></h2>
and it displays;
<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<del>£100</del> £0</h2>
<!--eof Product Price block -->
obviously its not picking up the percentage from
$group_discount->fields['group_percentage']
can anyone tell me where im going wrong?
Many Thanks! :D