Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Access currency value from checkout_payment.php


Recommended Posts

Posted

Hello,

 

Would someone know how I can get at the currently selected currency in the checkout_payment.php page? Or in the checkout_confirmation.php page?

 

I have one payment module which only accepts EUR, so I would like to hide it when it doesn't apply.

 

Thanks,

 

Mi

Posted
Hello,

 

Would someone know how I can get at the currently selected currency in the checkout_payment.php page? Or in the checkout_confirmation.php page?

 

I have one payment module which only accepts EUR, so I would like to hide it when it doesn't apply.

 

Thanks,

 

Mi

If you only have one payment module which only accepts EUR, why would you want to hide the EUR. I would have thought that you would only want the EUR in your shop.

Posted

Obviously, the shop does accept other currencies, and the other payment methods do accept different currencies. It's only clickandpay which only accepts Euros, so it needs to be treated specially.

 

I found the currency info in the meantime, so I have a temporary workaround:

 

    if ( ($selection[$i]['id'] == 'clickandbuy') && ($order->info['currency'] != 'EUR') ) {
       echo "<!-- Skipping ClickandBuy because not EUR: currency=" . $order->info['currency'] . " -->";
       continue;
   }

 

A better solution would be to change the currency in the checkout_confirmation.php page if the payemnt module selected was ClickandBuy, and reload the page with EUR. But I'm not sure how to do that.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...