Show product price according to bankwire discount payment discount

i Milos, I already bought Bank wire with Discount module for my client web site.
I would like to show discount price and discount amount on product page. 

Hello
I prepared smarty code snippet that will show what you expect. It works both with percentage discount and flat discount.
Code will identify what option is enabled on module configuration page and then - calculate the prices to display.

Please open file: /themes/your-theme/catalog/_partials/product-prices.tpl. Paste there smarty code:
  {if Configuration::get('BANK_WIRE_DIS_CHARGEP')==1}
    {assign var='price_with_discount' value=$product->price-($product->price*Configuration::get('BANK_WIRE_DIS_CHARGEP_V')/100)}
    {assign var='price_saving' value=($product->price*Configuration::get('BANK_WIRE_DIS_CHARGEP_V')/100)}
    {l s='Price with bankwire discount: ' d='Shop.Theme.Catalog'}{Tools::displayPrice($price_with_discount)}
    {l s='You will save: ' d='Shop.Theme.Catalog'}{Tools::displayPrice($price_saving)}
  {elseif Configuration::get('BANK_WIRE_DIS_CHARGEA')==1}
    {assign var='price_with_discount' value=$product->price-Tools::convertPriceFull(Configuration::get('BANK_WIRE_DIS_CHARGEA_V'), Currency::getDefaultCurrency(), Context::getContext()->currency)}
    {assign var='price_saving' value=Tools::convertPriceFull(Configuration::get('BANK_WIRE_DIS_CHARGEA_V'), Currency::getDefaultCurrency(), Context::getContext()->currency)}
    {l s='Price with bankwire discount: ' d='Shop.Theme.Catalog'}{Tools::displayPrice($price_with_discount)}
    {l s='You will save: ' d='Shop.Theme.Catalog'}{Tools::displayPrice($price_saving)}
  {/if}

You can translate texts "Price with bankwire discount:" and "You will save:" to any other text you want. You can do it directly in the code, or in back office from prestashop's "theme translations" feature. (localization > translations). Once you will save the code, it might be required to clear shop cache to see the changes immediately.


enjoy :-)


Show product price according to bankwire discount payment discount Show product price according to bankwire discount payment discount Reviewed by VEKIA on Wednesday, July 03, 2019 Rating: 5

No comments