Jortex Posted April 20, 2009 Share Posted April 20, 2009 Hi all, I know you can specify the template used (?systpl=portal) and order form (cant remember this one) but is there anyway to specify the currency in the URL when linking to the order pages? If not, i think this would make a great edition to V4. Cheers. 0 Quote Link to comment Share on other sites More sharing options...
ljesh Posted April 20, 2009 Share Posted April 20, 2009 I would like this option too (if it isn't possible already and we don't know about it). 0 Quote Link to comment Share on other sites More sharing options...
thernes Posted April 20, 2009 Share Posted April 20, 2009 Another vote for this 0 Quote Link to comment Share on other sites More sharing options...
D9Hosting Posted April 20, 2009 Share Posted April 20, 2009 I didn't know we could change the template via the URL, you learn something new everyday! But the currency suggestion would be great as well if it's not already there. 0 Quote Link to comment Share on other sites More sharing options...
ServWise.com Posted April 20, 2009 Share Posted April 20, 2009 It is not possible using the URL as far as I am aware (Unless WHMCS have added it since I last asked). However you can achieve a currency change from any page or link with a custom php page. Create a php page called setcur.php with the following code. <?php session_start(); $_SESSION["currency"] = $_GET["cur"]; if (isset($_GET["rurl"])){ $rurl = $_SERVER['HOST'] . $_GET["rurl"]; } else { $rurl = $_SERVER['HTTP_REFERER']; } header('Location: ' . $rurl); ?> And create your links with - setcur.php?cur=1 This simply redirects back to the referring page or to have the script redirect to a specific page use - setcur.php?cur=1&rurl=url-to-return-too.htm variable "cur" should be currency id of one of the currencies you have created. The currency is set using the session variable "currency" (unless the user is logged in then it uses the currency set when they signed up) 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted April 20, 2009 WHMCS CEO Share Posted April 20, 2009 That's a complicated way of doing it. You can of course set it via the url by just simulating what the form shown for currency selection does - eg. cart.php?currency=1 cart.php?currency=2. It's the same thing as you can do with the gid for group selection & pid for product selection. Matt 0 Quote Link to comment Share on other sites More sharing options...
Daniel Posted April 20, 2009 Share Posted April 20, 2009 Good to know it's already available 0 Quote Link to comment Share on other sites More sharing options...
ServWise.com Posted April 20, 2009 Share Posted April 20, 2009 That's a complicated way of doing it. You can of course set it via the url by just simulating what the form shown for currency selection does - eg. cart.php?currency=1 cart.php?currency=2. It's the same thing as you can do with the gid for group selection & pid for product selection. Matt You are correct of course Matt. My script does however have one advantage, it will work on any page not just the cart page so you can set and show the current currency to the user throughout the site, good if you have currency specific call-outs / adverts or custom pricing pages. Unless this has changed since RC1? 0 Quote Link to comment Share on other sites More sharing options...
Hosteris Posted April 21, 2009 Share Posted April 21, 2009 You are correct of course Matt. My script does however have one advantage, it will work on any page not just the cart page so you can set and show the current currency to the user throughout the site, good if you have currency specific call-outs / adverts or custom pricing pages. Unless this has changed since RC1? Well, actually it works in any page, eg. cart.php?gid=1¤cy=2 cart.php?gid=3¤cy=2 , etc. 0 Quote Link to comment Share on other sites More sharing options...
ServWise.com Posted April 21, 2009 Share Posted April 21, 2009 Well, actually it works in any page, eg. cart.php?gid=1¤cy=2 cart.php?gid=3¤cy=2 , etc. So I put "/index.php?currency=2" to change the currency while on the homepage, I just tested it on RC1 and it works, thanks for implementing it, I know it wasnt doing that Pre-RC1. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.