Set currency based on IP address - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Set currency based on IP address (/showthread.php?tid=63582) |
Set currency based on IP address - Lykos22 - 11-16-2015 Hi, I need some help please. This is my code in MY_Controller PHP Code: // set default currency code if not set already in index() This is my view PHP Code: <span data-eur="€100" data-gbp="£75" data-usd="$115" class="price-span">$115</span> What I'd like to do is, if there's no currency set in session already, to save the (new) currency set based on users ip location and do an ajax call to change the pricing on all span tags. How can I make this work properly ? RE: Set currency based on IP address - Sentro - 11-17-2015 Are you getting any errors?? What's the issue here? |