Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Modifying Options in Shipping Modules


Recommended Posts

No matter which shipping option I try to modify, nothing changes when I edit my shipping modules. I chmod my shipping php files to 755 (they were 644) in hopes that would help. I changed the php files locally then ftp'ed them up, but nothing changes!?! I don't understand. I liked the region shipping modules and I downloaded and added them to my options but I can't change the states or prices. I can't even change the "by price" to "by weight" radio button. Nothing holds. What do I need to do so that I can make the shipping prices appropriate for my store?

 

Thanks for any suggestions,

Karen :blush:

Link to comment
Share on other sites

I had the same problem. To fix it, do this:

 

Open admin/includes/functions/compatibility.php and includes/functions/compatibility.php:

At the end of the “do_magic_quotes_gpc” routine, add the following code: reset($ar);

It will end up looking like this:

function do_magic_quotes_gpc(&$ar) {
			if (!is_array($ar)) return false;
			while (list($key, $value) = each($ar)) {
			if (is_array($ar[$key])) {
			do_magic_quotes_gpc($ar[$key]);
			} else {
			$ar[$key] = addslashes($value);
			}
			}
			reset($ar);
			}

I can't remember who originally wrote this tip, but it works great.

Link to comment
Share on other sites

I had the same problem. To fix it, do this:

 

Open admin/includes/functions/compatibility.php and includes/functions/compatibility.php:

At the end of the “do_magic_quotes_gpc” routine, add the following code: reset($ar);

It will end up looking like this:

function do_magic_quotes_gpc(&$ar) {
			if (!is_array($ar)) return false;
			while (list($key, $value) = each($ar)) {
			if (is_array($ar[$key])) {
			do_magic_quotes_gpc($ar[$key]);
			} else {
			$ar[$key] = addslashes($value);
			}
			}
			reset($ar);
			}

I can't remember who originally wrote this tip, but it works great.

Wasn't there an update to OSC that corrected a bug with magic quotes?

Link to comment
Share on other sites

@Coopco: Not as far as I'm aware of. I use the latest version of OSC (2.2) and the problem is still there. You have to manually scourge the forums to find a fix.

###########################

###### Update 060817 ######

###########################

 

------------------------------------------------------------------------------

Magic Quotes Compatibility Layer Fix

http://www.oscommerce.com/community/bugs,1435

http://svn.oscommerce.com/trac/changeset/706

------------------------------------------------------------------------------

 

Problem:

 

The Magic Quotes compatibility layer does not parse arrays within the GET/POST/COOKIE scope that can be used to inject SQL into database queries.

 

Solution:

 

The following lines must be replaced in catalog/includes/functions/compatibility.php:

 

Lines 22-23, from:

 

if (is_array($value)) {

do_magic_quotes_gpc($value);

 

to:

 

if (is_array($ar[$key])) {

do_magic_quotes_gpc($ar[$key]);

 

The following lines must be replaced in catalog/admin/includes/functions/compatibility.php:

 

Lines 22-23, from:

 

if (is_array($value)) {

do_magic_quotes_gpc($value);

 

to:

 

if (is_array($ar[$key])) {

do_magic_quotes_gpc($ar[$key]);

Link to comment
Share on other sites

###########################

###### Update 060817 ######

###########################

 

------------------------------------------------------------------------------

Magic Quotes Compatibility Layer Fix

http://www.oscommerce.com/community/bugs,1435

http://svn.oscommerce.com/trac/changeset/706

------------------------------------------------------------------------------

 

Problem:

 

The Magic Quotes compatibility layer does not parse arrays within the GET/POST/COOKIE scope that can be used to inject SQL into database queries.

 

Solution:

 

The following lines must be replaced in catalog/includes/functions/compatibility.php:

 

Lines 22-23, from:

 

if (is_array($value)) {

do_magic_quotes_gpc($value);

 

to:

 

if (is_array($ar[$key])) {

do_magic_quotes_gpc($ar[$key]);

 

The following lines must be replaced in catalog/admin/includes/functions/compatibility.php:

 

Lines 22-23, from:

 

if (is_array($value)) {

do_magic_quotes_gpc($value);

 

to:

 

if (is_array($ar[$key])) {

do_magic_quotes_gpc($ar[$key]);

 

See http://www.oscommerce.com/solutions/downloads

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...