Jump to content


Public support for combinations tab pro module. Ask about this module and get free public help.
Photo

two prices in combinations table module - HRK and €


  • Please log in to reply
1 reply to this topic

#1 igor

igor

    Newbie

  • Members
  • Pip
  • 1 posts

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


#2 Milosz

Milosz

    Advanced Member

  • Members
  • PipPipPip
  • 117 posts

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)}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users