slman Posted May 29, 2020 Share Posted May 29, 2020 Hello! 1) I implemented currency change variable in the cart, and its working good, but i switched from using the cart to show my product to showing my product on custom pages to make it more neat. The currency is not changeable in the custom page, I want to get the price by using the product id + having the prefix of the currency (to make it update with currency conversion changes). 2) I want to show Kuwait + Saudi Arabia + USA flag in the currency converter, I was only able to get the us flag from flags.png in /templates/(theme)/img Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 30, 2020 Share Posted May 30, 2020 11 hours ago, slman said: 1) I implemented currency change variable in the cart, and its working good, but i switched from using the cart to show my product to showing my product on custom pages to make it more neat. The currency is not changeable in the custom page, I want to get the price by using the product id + having the prefix of the currency (to make it update with currency conversion changes). i'm not sure if these custom pages are within WHMCS or not, or if you're using a currency selector in the header... if there's aren't a log of prices to be shown on the page, using a data feed would be an option... possibly if these custom pages are within WHMCS, you could use a hook instead. 11 hours ago, slman said: 2) I want to show Kuwait + Saudi Arabia + USA flag in the currency converter, I was only able to get the us flag from flags.png in /templates/(theme)/img quickest way would just be to get the flags from a third-party site, there will be plenty of free sites out there, e.g countryflags.com (!) - just ensure that you get all the flags you need so that the style of them all is the same... and then use them rather than the ones supplied by WHMCS or your theme. 0 Quote Link to comment Share on other sites More sharing options...
slman Posted May 31, 2020 Author Share Posted May 31, 2020 On 30/05/2020 at 11:28 AM, brian! said: i'm not sure if these custom pages are within WHMCS or not, or if you're using a currency selector in the header... if there's aren't a log of prices to be shown on the page, using a data feed would be an option... possibly if these custom pages are within WHMCS, you could use a hook instead. quickest way would just be to get the flags from a third-party site, there will be plenty of free sites out there, e.g countryflags.com (!) - just ensure that you get all the flags you need so that the style of them all is the same... and then use them rather than the ones supplied by WHMCS or your theme. My custom pages are within WHMCS, I want to get the price from the ID without using Data Feed, and yes, I am using a currency selector in the header. Regarding the flags, How can I assign each flag to its currency? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 31, 2020 Share Posted May 31, 2020 (edited) 1 hour ago, slman said: My custom pages are within WHMCS, I want to get the price from the ID without using Data Feed, and yes, I am using a currency selector in the header. using a feed would be simpler, but if you want to go down the hook route, then it's going to be a ClientAreaPage hook, ideally limited to running on just this custom page, that pulls prices for a list of given PIDs, using a specified billing cycle, the current currency value, from the database, formats it in the correct currency layout and returns them as an array/variables to the template. 1 hour ago, slman said: Regarding the flags, How can I assign each flag to its currency? I would need to see the code you're using, but generally I would make the flag filenames the same as the currency's 3-letter abbreviation and reference them that way. Edited May 31, 2020 by brian! 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.