Jump to content

Unable to change currency in 3.05


Guest awhyte

Recommended Posts

The currency wont change in the new version, keeps resetting to default. I also did the email fix but im not recieving any emails now when an order is made.

Link to comment
Share on other sites

Guest darmarat

Also having the same problem does try to change but defaults back to Canuck buck :angry:

Any one else having this problem and found a solution?

I did a search and this is all I found so far.

Darcy

Link to comment
Share on other sites

I found that this happens to me only when i add a new currency in an other language (Greek) but if its in English No Problems occur.

Is anyone of you two doing this

or are they typed in English

or no added custom currency?

Link to comment
Share on other sites

The currency wont change in the new version, keeps resetting to default. I also did the email fix but im not recieving any emails now when an order is made.

I have the same problem, but i also have the problem that the language files also is resetting to default (deafult is norwegian and i have added norwegian kr as default).

Link to comment
Share on other sites

Guest shawnlovebaobao

i was having two problems

1: i can;t change my languae other than english

2: i can;t change my currency to British Pounds or Euros

anyone got an idea of how to fix these?

thanks a lot

Link to comment
Share on other sites

Guest darmarat

I'm using Canadian and U.S. currencies defaulted to Canadian will not change to U.S.

Also language will not change. Same problem (only default language working)

Anyone with a solution yet?

Darcy

Link to comment
Share on other sites

While that may have worked, here is a corrected version of /switch.php.

<?php

/*

+--------------------------------------------------------------------------

|   CubeCart v3.0.5

|   ========================================

|   by Alistair Brookbanks

|	CubeCart is a Trade Mark of Devellion Limited

|   (c) 2005 Devellion Limited

|   Devellion Limited,

|   Westfield Lodge,

|   Westland Green,

|   Little Hadham,

|   Nr Ware, HERTS.

|   SG11 2AL

|   UNITED KINGDOM

|   http://www.devellion.com

|	UK Private Limited Company No. 5323904

|   ========================================

|   Web: http://www.cubecart.com

|   Date: Thursday, 13 October 2005

|   Email: info (at) cubecart (dot) com

|	License Type: CubeCart is NOT Open Source Software and Limitations Apply 

|   Licence Info: http://www.cubecart.com/site/faq/license.php

+--------------------------------------------------------------------------

|	switch.php

|   ========================================

|	Switch between language and currency vars	

+--------------------------------------------------------------------------

*/

	include_once("includes/ini.inc.php");

	

	// INCLUDE CORE VARIABLES & FUNCTIONS

	include_once("includes/global.inc.php");

	include_once("includes/functions.inc.php");



	// initiate db class

	include_once("classes/db.inc.php");

	$db = new db();

	include_once("includes/functions.inc.php");

	$config = fetchDbConfig("config");



	// get session data

	include_once("includes/session.inc.php");

	

	// change language if necessary making sure it is cleaned against cross site scripting!!! Or else there'd be truble!!

	if( (isset($_GET['lang'])) && (!empty($_GET['lang'])) && (isset($_SESSION['ccUser'])) && eregi("^[a-z0-9_]",$_GET['lang'])){

  $sessData['lang'] = $db->mySQLSafe($_GET['lang']);

  $update = $db->update($glob['dbprefix']."CubeCart_sessions", $sessData,"sessId=".$db->mySQLSafe($_SESSION['ccUser']));

  

  // detect possible spoofing URL's

  if(!eregi("http://",$_GET['r']) && !eregi("ftp://",$_GET['r']) && !eregi("https://",$_GET['r'])){

 	 header("Location: ".str_replace("&amp;","&",$_GET['r']));

  } else {

 	 header("Location: index.php");

  }

  exit;

  

	} elseif( (isset($_GET['currency'])) && !empty($_GET['currency']) && (isset($_SESSION['ccUser'])) &&  ereg("^[A-Z]",$_GET['currency'])){

	

  $sessData['currency'] = $db->mySQLSafe($_GET['currency']);

  $update = $db->update($glob['dbprefix']."CubeCart_sessions", $sessData,"sessId=".$db->mySQLSafe($_SESSION['ccUser']));

  

  // detect possible spoofing URL's

  if(!eregi("http://",$_GET['r']) && !eregi("ftp://",$_GET['r']) && !eregi("https://",$_GET['r'])){

 	 header("Location: ".str_replace("&amp;","&",$_GET['r']));

  } else {

 	 header("Location: index.php");

  }

  exit;

	

	} else {

  header("Location: index.php");

  exit;

	}

?>

It works like a charm. There were important changes made in how and when the sessions were initiated. If these aren't followed, other things will break. I simply included those changes in the switch.php file.

And if you don't want to do that, here's a downloadable version for you:

http://www.swscripts.com/downloads/switch.zip

:)

Link to comment
Share on other sites

  • 6 months later...
Guest saraj63

Apparently I am toooo blonde. I don't understand where to paste this code to and am I adding this code to the existing or total replacement of existing?

Thanks for your help!

Sara

While that may have worked, here is a corrected version of /switch.php.

<?php

/*

+--------------------------------------------------------------------------

|   CubeCart v3.0.5

|   ========================================

|   by Alistair Brookbanks

|	CubeCart is a Trade Mark of Devellion Limited

|   (c) 2005 Devellion Limited

|   Devellion Limited,

|   Westfield Lodge,

|   Westland Green,

|   Little Hadham,

|   Nr Ware, HERTS.

|   SG11 2AL

|   UNITED KINGDOM

|   http://www.devellion.com

|	UK Private Limited Company No. 5323904

|   ========================================

|   Web: http://www.cubecart.com

|   Date: Thursday, 13 October 2005

|   Email: info (at) cubecart (dot) com

|	License Type: CubeCart is NOT Open Source Software and Limitations Apply 

|   Licence Info: http://www.cubecart.com/site/faq/license.php

+--------------------------------------------------------------------------

|	switch.php

|   ========================================

|	Switch between language and currency vars	

+--------------------------------------------------------------------------

*/

	include_once("includes/ini.inc.php");

	

	// INCLUDE CORE VARIABLES & FUNCTIONS

	include_once("includes/global.inc.php");

	include_once("includes/functions.inc.php");



	// initiate db class

	include_once("classes/db.inc.php");

	$db = new db();

	include_once("includes/functions.inc.php");

	$config = fetchDbConfig("config");



	// get session data

	include_once("includes/session.inc.php");

	

	// change language if necessary making sure it is cleaned against cross site scripting!!! Or else there'd be truble!!

	if( (isset($_GET['lang'])) && (!empty($_GET['lang'])) && (isset($_SESSION['ccUser'])) && eregi("^[a-z0-9_]",$_GET['lang'])){

  $sessData['lang'] = $db->mySQLSafe($_GET['lang']);

  $update = $db->update($glob['dbprefix']."CubeCart_sessions", $sessData,"sessId=".$db->mySQLSafe($_SESSION['ccUser']));

  

  // detect possible spoofing URL's

  if(!eregi("http://",$_GET['r']) && !eregi("ftp://",$_GET['r']) && !eregi("https://",$_GET['r'])){

 	 header("Location: ".str_replace("&amp;","&",$_GET['r']));

  } else {

 	 header("Location: index.php");

  }

  exit;

  

	} elseif( (isset($_GET['currency'])) && !empty($_GET['currency']) && (isset($_SESSION['ccUser'])) &&  ereg("^[A-Z]",$_GET['currency'])){

	

  $sessData['currency'] = $db->mySQLSafe($_GET['currency']);

  $update = $db->update($glob['dbprefix']."CubeCart_sessions", $sessData,"sessId=".$db->mySQLSafe($_SESSION['ccUser']));

  

  // detect possible spoofing URL's

  if(!eregi("http://",$_GET['r']) && !eregi("ftp://",$_GET['r']) && !eregi("https://",$_GET['r'])){

 	 header("Location: ".str_replace("&amp;","&",$_GET['r']));

  } else {

 	 header("Location: index.php");

  }

  exit;

	

	} else {

  header("Location: index.php");

  exit;

	}

?>

It works like a charm. There were important changes made in how and when the sessions were initiated. If these aren't followed, other things will break. I simply included those changes in the switch.php file.

And if you don't want to do that, here's a downloadable version for you:

http://www.swscripts.com/downloads/switch.zip

;)

Link to comment
Share on other sites

Guest groovejuice

@saraj63 which version of CubeCart are you using? This fix is for an old release and you likely should not be using it. Your problem is probably with the settings you're using in the ACP, and not a bug.

Link to comment
Share on other sites

  • 2 months later...
Guest ekka

I'm using version 3.0.10 and when a customer changes the language or currency he will be logged out. This is off course a problem. As I understand is the fix posted in this thread for an old version and the switch.php posted here is included in version 3.0.10. In the post above groovejuice is talking about settings in the control panel. I have tried all kind off settings that I can think of as relative to the problem but without any luck. Can someone please instruct me how to work around this problem and/or solve it for good?

Thanks in advanced/ekka

:w00t:

@saraj63 which version of CubeCart are you using? This fix is for an old release and you likely should not be using it. Your problem is probably with the settings you're using in the ACP, and not a bug.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...