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...

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

In this example, you manually specify the total amount in the link (e.g., "150") without using the "%total%" placeholder. This way, you ensure that the link doesn't include the currency symbol.

If you can't manually specify the amount and still want to use a placeholder, you should check the documentation or contact the platform's support to see if they offer a different placeholder that only includes the numeric amount without the currency symbol. If such a placeholder exists, it would be the ideal solution for your needs.

Link to comment
Share on other sites

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...