Hi,
two prices in combinations table module - HRK and €
#1
Posted 09 September 2022 - 11:34 AM
#2
Posted 09 September 2022 - 11:34 AM
Hi,
I am trying to made modification /modules/combinationstab/views/templates/hook/productfooter.tpl to show price in second currency.For other prestashop prices calculations I had use:€{round($produst.some.test.total.amount / 7.53450, 2)}In your module file productfooter.tpl I have {Tools::displayPrice(Product::getPriceStatic(Tools::getValue('id_product'),false,$ctk,6,null,false,true,1,false,null))} {l s='Tax excl.' mod='combinationstab'} for calculate price of any combination in table and I don't know how to properly calculate to get display price / 7.53450.....Best regards,Igor
Hello,
I am trying to made modification /modules/combinationstab/views/templates/hook/productfooter.tpl to show price in second currency.
For other prestashop prices calculations I had use:
€{round($produst.some.test.total.amount / 7.53450, 2)}
In your module file productfooter.tpl I have {Tools::displayPrice(Product::getPriceStatic(Tools::getValue('id_product'),false,$ctk,6,null,false,true,1,false,null))} {l s='Tax excl.' mod='combinationstab'} for calculate price of any combination in table and I don't know how to properly calculate to get display price / 7.53450.....
Best regards,
it will be required to assign price to variable
{assign var='myprice' value=Product::getPriceStatic(Tools::getValue('id_product'),false,$ctk,6,null,false,true,1,false,null)}
then you can operate on $myprice variable
€{round($myprice / 7.53450, 2)}
so the final code to use is
{assign var='myprice' value=Product::getPriceStatic(Tools::getValue('id_product'),false,$ctk,6,null,false,true,1,false,null)}
€{round($myprice / 7.53450, 2)}
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users