Jump to content

Currency problem?


Guest intergemsuk

Recommended Posts

Guest intergemsuk

Hi im having a bit of a problem with my currency changer. You can view it here: My Webpage

currency changes fine on the homepage, however if it is changed on another page such as a category page ("rings" for example) it changes the currency but links back to the homepage and doesnt stay on the page you are viewing?

Anyone got any ideas why its doing this or how i could resolve it?

cheers, ben.

Link to comment
Share on other sites

Guest intergemsuk

I had it working on my first install but have done something to mess it up :-( some advice would be greatly appriciated. Im using images instead of a drop down menu, however im guessing the way it links should be the same.

:blink:

Link to comment
Share on other sites

  • 1 month later...

i *think* the problem lies within the switch.php

	} elseif((isset($_GET['currency'])) && !empty($_GET['currency']) && (isset($_SESSION['ccUser']))){

	

		$sessData['currency'] = "'".preg_replace('/[^a-zA-Z0-9_\-\+]/', '',$_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;","",treatGet($_GET['r'])));

		} else {

			header("Location: index.php");

		}

		exit;




i think its 


 else {

			header("Location: index.php");

		}

is this the right one to just refresh the page instead of redirecting to index.php, and if so, how can you do it?

Link to comment
Share on other sites

Hi yia folks.

Thanks to someone else this is a fix for the Currency Jump menu not responding to the way it should.

This is a work around and hence I was told that this could be either a Bug in the script or a hosting issue.

In any rate here goes.

Locate the switch.php file located in the root of your store and comment out the following lines:

// detect possible spoofing URL's

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

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

// } else {

// header("Location: index.php");

// }

It worked for me. DON'T FORGET TO BACK UP YOUR ORIGINAL switch.php file before making any changes. Please let us know if it works for you.

Cheers

aPoLLo :)

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...