V13: Update E Commerce to check local Currency and is needed use Exchange Rate

Hi all,
We are using V13… and using the E Commerce module…

We came up with a customer that is in Angola (currency is KZ) but due to Exchange rates changing every week or day the customer created the List price in USD.

So Exchange Rate is updated everyday and when creating Quotations he selects Currency KZ as the Price list is set to be USD the system will do the calculations… This is OK.

Now when it comes to E Commerce i had to make changes so the systems checks first what Currency is and Country and if is Angola/KZ shows the prices calculated based on the Exchange rate.

I had to change and copy lots of files to achieve this but would be great to either have this done by the system on the future or an option were users select if they need to have prices calculated based on the Exchange rate…

The normal all-products shows in USD
image

The customized all-producs_ show in KZ
image

To achieve this i had to change:

  • Copied all-products directory to local Application
  • Copied item (has html files) directory to local Application
  • Copied Index.html and Index.js to local Application
  • Copied cart directory and cart.html and cart.py to local Application
  • Copied shopping_cart directory and website_item.py to local Application
  • Copied product_ui directory to local Application

Besides of copying files and overriding some whitelisted methods (get_product_filter_data, get_product_info_for_website,update_cart) to include Company Currency as well as Exchange rate for that day or period …

After all work the system shows the prices is the list is in USD converted to KZ.

Now other issue is related to Translation… if your system is set to PT the translation for the index.html is not done… so i had to change that by typing in PT because even with the Custom translation text it does not work.