• strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /home1/eangkasa/public_html/sites/all/modules/views/handlers/views_handler_argument.inc on line 745.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 589.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 589.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/modules/node/views_handler_filter_node_status.inc on line 14.
  • strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.
  • warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home1/eangkasa/public_html/sites/all/modules/counter/counter.module on line 136.
  • warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home1/eangkasa/public_html/sites/all/modules/counter/counter.module on line 159.
  • warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home1/eangkasa/public_html/sites/all/modules/counter/counter.module on line 159.
  • strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.
  • strict warning: Declaration of views_handler_field_comment::init() should be compatible with views_handler_field::init(&$view, $options) in /home1/eangkasa/public_html/sites/all/modules/views/modules/comment/views_handler_field_comment.inc on line 50.
  • strict warning: Declaration of views_handler_field_comment_username::init() should be compatible with views_handler_field::init(&$view, $options) in /home1/eangkasa/public_html/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 48.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.
  • strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.
  • strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.

Forcing your checkout process to default currency in Zen Cart

Sometimes, the owners of ecommerce system would like to force the customers to choose store's default/chosen currency and why is that? Because, the instability of worldwide economy may cause the storeowners to loss profits during currency converting. Therefore, the storeowners have to ensure that it doesn't affect them by forcing their customers to select default currency (normally, it's the currency where the storeowner resides) during checkout process.

The easy way is to hide the currency converter pulldown menu once the customer entered the checkout process and set the current currency to your chosen/default currency. The steps explained here assume that currency converter is placed on the header instead of sidebar menu as it's way neater and you have to use the override system to have your own theme:

1. Put the code below on your /includes/templates/your_own_theme/common/tpl.header.php

  1. $checkout_shipping = '/index.php?main_page=checkout_shipping';
  2. $checkout_payment= '/index.php?main_page=checkout_payment';
  3. $checkout_confirm= '/index.php?main_page=checkout_confirmation';
  4. $request_url=$_SERVER['REQUEST_URI'];
  5.  
  6. if ($request_url == $checkout_shipping || $request_url == $checkout_payment || $request_url == $checkout_confirm)
  7. {
  8. $_SESSION['currency'] = 'AUD';
  9. }

This will get the current url address of your browser, so whenever the customer entered checkout process such as shipping, payment and confirmation then the current currency automatically converted to AUD (you may suit this currency as you please)

2. Place the code below just before your currency converter pulldown menu in the header

  1. $checkout_shipping = '/index.php?main_page=checkout_shipping';
  2. $checkout_payment= '/index.php?main_page=checkout_payment';
  3. $checkout_confirm= '/index.php?main_page=checkout_confirmation';
  4. $request_url=$_SERVER['REQUEST_URI'];
  5.  
  6. if ($request_url != $checkout_shipping && $request_url != $checkout_payment && $request_url != $checkout_confirm) {

This ensures the currency converter pulldown menu will not be displayed during checkout process.

Of course, there is another way to force currency during checkout process, which's to hack into zencart order_total module. However, it is prone to error as you have to hardcode it manually. Furthermore, there is no point of having a currency converter menu during checkout process while you have to essentially force your customers to use your default/chosen currency.