Safir Hosting Posted February 28, 2020 Share Posted February 28, 2020 Hello All, We are using Turkish Lira (TRY) and USD on our system. The billing structure we're using have some problems about exchange rates. The prices showing under website is USD and we need to use only TRY. So Primary must be TRY, secondary must be USD What i did to resolve this issue and failed, - Changed Default Currency to TRY and Secondary to USD (This caused wrong conversion to TRY) (example when i add a product on $23.99 it must convert ₺147,53 but the conversion rate is changing TRY to USD, i need USD to TRY - reverse conversion) - Changed Cart link to Currency=1 and Currency=2 (This caused nothing, cart worked only on USD) In this case, how can i make TRY as default Currency and make reverse conversion work (from USD to TRY) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2020 Share Posted February 28, 2020 16 minutes ago, Safir Hosting said: We are using Turkish Lira (TRY) and USD on our system. The billing structure we're using have some problems about exchange rates. The prices showing under website is USD and we need to use only TRY. the quick fix for that might be to add ¤cy=2 for all your product buy now links (assuming 2 = TRY) on your site... 17 minutes ago, Safir Hosting said: Changed Default Currency to TRY and Secondary to USD (This caused wrong conversion to TRY) (example when i add a product on $23.99 it must convert ₺147,53 but the conversion rate is changing TRY to USD, i need USD to TRY - reverse conversion) note the warning at the top of the help page about changing default currencies... Quote Only change the default currency if you don’t yet have any invoice or transaction data in WHMCS I assume after 3+ months of WHMCS use, you will have existing invoices. remember that currencies are assigned to clients, not orders/invoices and so if you have made this change, a client with an existing $100 invoice when viewing their client area today, will now see the invoice as ₺100 (or vice versa)... which is a bit of a difference! 22 minutes ago, Safir Hosting said: Changed Cart link to Currency=1 and Currency=2 (This caused nothing, cart worked only on USD) that should work... e.g if you use... cart.php?a=add&pid=1&carttpl=safir -> then it should use your default currency... whereas, if you use cart.php?a=add&pid=1&carttpl=safir¤cy=2 -> then it should switch to TRY and use that... at some point, you might need a hook to either completely remove the currency sidebar, or modify it to remove USD as an option, but I wouldn't do that until you've got all your links updated to pass the TRY currency. btw - do you have any clients using USD for their currency setting ? 0 Quote Link to comment Share on other sites More sharing options...
Safir Hosting Posted February 28, 2020 Author Share Posted February 28, 2020 Hello Brian Thank you for helping me. I tried currency=1 and currency=2 and seems its still not working. I have 6 clients using USD as default, Can i make TRY selected from sidebar and hide usd. Eren 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2020 Share Posted February 28, 2020 (edited) 1 hour ago, Safir Hosting said: I tried currency=1 and currency=2 and seems its still not working. that screenshot above is from your site - so passing the currency in the URL should work. 🙂 1 hour ago, Safir Hosting said: Can i make TRY selected from sidebar and hide usd. yes, but that wouldn't be enough.... it would still show the products in your default currency USD) unless you change the currency in the url. possibly you could force redirection in the cart if it's not currently using your preferred currency. Edited February 28, 2020 by brian! 0 Quote Link to comment Share on other sites More sharing options...
heiko Posted April 6, 2020 Share Posted April 6, 2020 Hi Received the below from support. To change default currency. Can you please be of assistance what to add to have the default currency set when client is not logged on? Basiclly when the client select store/product it should show default currency 2. <?php use WHMCS\Session; add_hook('ClientAreaPageCart', 1, function($vars) { // Provide your new default currency ID $currencyId = 2; if (!Session::get('uid') && !Session::get('currency')) { Session::set('currency', $currencyId); } }); 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.