Jump to content
thirty bees forum

Custom Payment %total% without currency?


Payo Figueroa

Recommended Posts

Hello community,

I am in Guatemala and website is being build in spanish with quetzales currency son the letter is "Q" instead of "$"

I need help with a setting on the Custom Payment link, the platform at the payment description tells me that "%total% will be replaced with total amount.", so in order to be able to generate the link, I am leaving in the source code:


<p>Pago con Tarjeta de Crédito</p>
<p>Esta siendo <a href="https://app.XXX.com/s/zaraguate/pagar/%total%/GTQ">re dirigido</a>.</p>

The link I need to be generated is (in the example the total amount in the shopping cart is 150):
https://app.XXX.com/s/zaraguate/pagar/150/GTQ

But the platform is sending:
https://app.XXX.com/s/zaraguate/pagar/Q 150/GTQ

How can I take off the "Q " and leave only the amount? Can I use something different from %total% that only show the total numbers?

Thanks a lot in advance for any help you can provide me.

 

Link to comment
Share on other sites

  • 2 weeks later...

You can edit module code and provide %total% placeholder as non-formatted amount instead of formatted with currency symbol.

Change

Tools::displayPrice($cart->getOrderTotal(true, Cart::BOTH))

with

$cart->getOrderTotal(true, Cart::BOTH)

in file

/modules/custompayments/custompayments.php

There are two places in the file where you should make the changes:

https://github.com/thirtybees/custompayments/blob/b281c5178a9869be3c13b228281715dd6e38ec6b/custompayments.php#L310

https://github.com/thirtybees/custompayments/blob/b281c5178a9869be3c13b228281715dd6e38ec6b/custompayments.php#L456

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...