How to define discount to a payment method? Like "order total is %2 less if you pay by bank"

Hi all.

As the question states, I would like to create a new payment method for bank transfer but I would like to promote it by making special discount for bank transfer payment method. So here are two questions in regard;

1- How to define this discount special to the payment method I will create?
2- How to display this discount price on product page so that for example it would read “99 $ (95 $ by bank transfer)”.

  1. Please check
  1. Unfortunately, there is no way to do it. You can only use the Promo text field and display something like “-5% by bank transfer”

You can assign text to all items with the export/import functionality

Thank you. Now there are two more questions;

1- Is there an easy way to accept wire transfer? Otherwise I will apply this solution proposed by the docs:

2- Is is possible to assign tags that will read “%5 discount for wire transfer” via API, by single product? (I am actually managing product prices not on CS-Cart admin panel but on another panel I wrote for managing a few platforms together. So I can use this trick like each time I update price and stocks of the product over API; I would also send the tag information for that product and eventually all the products will always be tagged.)

You can also try this by adding a minus to the “surcharge” -5% on the payment of our choice., to show at checkout.

It depends on what information you want to get from the user

Yes, the promo text field can be updated via API

@johnbol1 , thank you. It was a solution came to my mind but haven’t tried; now I see from your example that it is very possible.

@ecomlabs , All I want to show the bank information. Doc says it could be done by adding a language variable; but isn’t also using a block possible? I have banking information as a block already.

Yes, you can use block or show it through language variable

I can’t see payment method listed in the conditions? I have “Product Price”, “Categories”, “Products” and as such. There is no payment method option.

Is it possible that I edit template files and show another price below the original price?

  1. Please add a Cart promotion instead of the Catalog one

  2. Sure, it can be added directly to the core templates. But changes may be lost after upgrade

1 Like

I could take the risk. By any chance you could tell me which file I can tamper with? I can maybe later work on a hook or something to make it into a add-on.


Please use hook products:prices_block or add your code near this hook

1 Like

Thank you @ecomlabs you are being very helpful.

I have been going through add-on documentation but I don’t really understand how the hooks work. I created an add-on with some settings but I don’t understand how and where I need to use products:prices_block hook. Documentation is not really clear how the directory structure should be.

Could you please let me know what directory structure I need to set in /tamplates/addons/myaddon/hooks to use products:prices_block hook to display another price under the main product price? And how do I access the values of the settings I created in addon.xml in this hook tpl file?

First I actually edited the template file you told and the result was good enough for me. But then I wanted to make it an addon because I want this second price option be showed in everywhere the product price is shown. Will that hook do the job or do I need to use other hooks for example displaying this second price in product list page?

Ok I got it to work. I found another tutorial which is way more explanatory than the official one and figured through it.

1 Like