dailce Posted July 7, 2005 Posted July 7, 2005 When the cart contents are shown I want to siwtch the user currency to what I want when they click the "continue" button (the button that takes them to the login page). HOw can I do that?
dailce Posted July 7, 2005 Author Posted July 7, 2005 Could I actually switch the currency when a user goes to a specfic page on my site?
dailce Posted July 7, 2005 Author Posted July 7, 2005 I figured out that when the user is on a specific page you can add the following PHP code to the top and it will force the currency to change to the one you want. if($currency == 'USD'){ $currency = 'CAD'; } Now does anyone see a problem that this can cause, is it safe to do this?
dailce Posted July 7, 2005 Author Posted July 7, 2005 Well I added the following, this forces the currency I want when the buyer goes to check out. ANyone see a problem with it, is this ok to do? ADDED ?if (substr(basename($PHP_SELF), 0, 8) == 'checkout') { ? $currency = 'CAD'; ?} BEFORE ?if (substr(basename($PHP_SELF), 0, 8) == 'checkout') { ? $currency = 'CAD'; ?} // register a random ID in the session to check throughout the checkout procedure // against alterations in the shopping cart contents ?if (!tep_session_is_registered('cartID')) tep_session_register('cartID'); ?$cartID = $cart->cartID; in "checkout_shipping.php" or do you think it should be: if (substr(basename($PHP_SELF), 0, 17) == checkout_shipping') { $currency = 'CAD'; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.