I have with 3 problems with this great mod - the first 2 can do nothing about but hopefully Dan can; the third I can offer guidance for:
1. Ignores quantity discounts and therefore shows the wrong total.
2. Ignores one-time charges.
3. A client pointed out that if the price is in its usual location (i.e. up at the top of the page with the product name) then quite often the Attributes and Add to Cart sections are below the fold, so the benefits of this super mod are lost.
My solution was to copy the section for the base price display (EXCLUDING the quantity discounts section) in tpl_product_info_display.php ...
Code:
<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>
and insert it closer to the Add to Cart box, giving this new element an id of productPrices2.
Then in jscript_updater.php, copy line 250 ...
Code:
document.getElementById('productPrices').innerHTML = '<?php echo UPDATER_PREFIX_TEXT; ?>' + l + addCommas(newPrice) + r + (showQuantity ? ' (' + quantity + ')' : '');
and paste it to the next line, changing productPrices to productPrices2.
You can then use css to position/style as you need.
Now what would be really neat (and I'm sure it can be done but I don't know how) is to hide this second display of the price until after a change has been made.
Because of the quantity discounts issue, I've had to remove it from the live site for now, but you can see the ide on the test site here
Bookmarks