netmechanics Posted May 10, 2012 Share Posted May 10, 2012 (edited) I was sexcited to se a field allowing sales "Per" a text field is now in on the product page. This is great for me as we sell "per 100" and "per 1000". I can not at the moment get the "per" field to print on the "product-list.php" template page - does anybody know the best way to print to screen the variables/objects available on that page - or how to print it to screen? Many thanks, Gwilym Edited May 10, 2012 by Staple (see edit history) 2 Link to comment Share on other sites More sharing options...
presty Posted July 31, 2012 Share Posted July 31, 2012 I'm also interested in this feature. In a product page the price can be shown like this: {$product_unity = $product->unity|escape:'htmlall':'UTF-8'} {$product_unit_price_ratio = $product->unit_price_ratio|escape:'htmlall':'UTF-8'} {if !$priceDisplay || $priceDisplay == 2} {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {elseif $priceDisplay == 1} {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} {/if} {* display unit price of the product *} {if !empty($product_unity) && $product_unit_price_ratio > 0.000000} {math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price} <p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'htmlall':'UTF-8'}</p> {/if} But in the "category>product-list.tpl", there is no access to the "product->getPrice" function. Does anyone know how to show the unit price in the category view? Link to comment Share on other sites More sharing options...
josal Posted November 23, 2012 Share Posted November 23, 2012 You can set it this way: <span id="unit_price_display">{convertPrice price=$product.orderprice} per {$product.unity|escape:'htmlall':'UTF-8'}</span> Link to comment Share on other sites More sharing options...
Petya Posted December 10, 2012 Share Posted December 10, 2012 (edited) hi I'm not sure how to do this. In the product-list.tpl I would like to display the Unit price too. Actually, the only price i want to display there is the unit price. Is there a way to do that? Edited December 10, 2012 by Petya (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now