网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > ZenCart
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 153.99.38.100
Old 2016-08-13, 08:20 PM
Kennett Square Kennett Square is offline
初级会员
 
Join Date: 2013-07-19
Posts: 1
Kennett Square 现在声名狼藉
Default Force display of other currency than default?

Hi there ladies! , I have scoured the vast ocean of zen cart related posts and cannot find the answer to this relatively simple problem:

What I hope to achieve:

Default/base currency: GBP
(currency in which I buy from the supplier and base my pricing on)

Displayed currency: Only EURO
(customers only in euro zone)

I dont want the customer to have the choice to select currencies, so I have gotten rid of the currency drop down. How do I get zen cart to always automatically display EURO when the a customer visits the store and not the default GBP.

Seems simple enough, maybe I have been a bit of a noon and missed this one!

Thanks in advanced
Reply With Quote
  #2   IP: 153.99.38.100
Old 2016-08-13, 08:21 PM
Oak View Oak View is offline
初级会员
 
Join Date: 2013-09-30
Posts: 1
Oak View 现在声名狼藉
Default

Well, you need to set the variable $_SESSION['currency'] to the right value.

So basically you need to have GBP and EURO enabled. THis would normally mean that the user could choose between the two. When they choose it sets $_SESSION['currency']. Instead of letting them choose you force that variable to be what you want.

If that is all greek to you just add this line
Code:
$_SESSION['currency'] = 'EUR';
At the bottom of the file includes/init_includes/init_currencies.php. It needs to go just above the '?>' at the end of the file.

And you need to check that you have euros enabled.
Reply With Quote
  #3   IP: 153.99.38.100
Old 2016-08-13, 08:23 PM
Oakwood Hills Oakwood Hills is offline
初级会员
 
Join Date: 2008-12-09
Posts: 1
Oakwood Hills 现在声名狼藉
Default

Just got to say niccol, you've saved me a lot of heartache. I was having big difficulties in getting different currencies to work with subdomains on a single template with the multi-site mod, the currency kept getting 'stuck' on the main domain. Your helpful tip was exactly what I needed. Wish I had found it sooner.

Thank you
Reply With Quote
  #4   IP: 153.99.38.100
Old 2016-08-13, 08:24 PM
Ocean Pines Ocean Pines is offline
初级会员
 
Join Date: 2010-10-19
Posts: 1
Ocean Pines 现在声名狼藉
Default

Hi,

This thing actually work but if I implement this, it is restricting the user to change to any other currency even if it is available in currency drop down menu. It just refuse to change.

Can anyone please suggest on how to manage non default currency on website but at the same time customers can still change if they want some other currency to show.

Thanking you in advance.
Reply With Quote
  #5   IP: 153.99.38.100
Old 2016-08-13, 08:27 PM
Oglala Oglala is offline
初级会员
 
Join Date: 2007-01-04
Posts: 1
Oglala 现在声名狼藉
Default

Try changing this line:

Code:
// If no currency is set, use appropriate default
if (!isset($_SESSION['currency']) && !isset($_GET['currency']) ) $_SESSION['currency'] = DEFAULT_CURRENCY;
to this:
Code:
// If no currency is set, use appropriate default
if (!isset($_SESSION['currency']) && !isset($_GET['currency']) ) $_SESSION['currency'] = 'EUR';
And getting rid of the other edit. Probably a better solution.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display different currency in product info? Kandiyohi ZenCart 1 2016-08-13 08:12 PM
How do I use my currency instead of US Dollars? Karis ZenCart 0 2016-08-06 10:28 AM
How To Force Https On Your X-Cart Admin And X-Cart Provider Sections Tenakee Springs X-Cart 0 2015-03-31 12:58 AM
Css实现完美垂直居中 Iola CSS, DIV, HTML 0 2015-01-01 12:01 PM
Simple Steps to Change Your Table Prefix in WordPress Abby WordPress 0 2014-04-14 03:40 PM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 11:24 PM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.