884483048 Posted August 8, 2018 Share Posted August 8, 2018 (edited) How can I assign current Prestashop currency exchange rate to the variable $rate to be able use it in my code <mytag> ' . $product_price * $rate . ' </mytag> I tried to play with Currency:getConversionRate() defined at Currency.php but got errors only Edited August 8, 2018 by 884483048 (see edit history) Link to comment Share on other sites More sharing options...
Rolige Posted August 9, 2018 Share Posted August 9, 2018 Hello, And why don't forget to do the conversion manually for PrestaShop to do it?, so that you better get the final price already converted in the currency selected by the customer. {Tools::convertPriceFull($product_price, null, Context::getContext()->currency)} Regards! Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 10, 2018 Share Posted August 10, 2018 Hi, Refer to the thread mentioned below for the solution. https://www.prestashop.com/forums/topic/880661-how-to-assign-a-currency-exchange-rate-to-a-variable-in-the-module-using-php/?tab=comments#comment-2942105 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