catisfaction Posted February 28, 2007 Posted February 28, 2007 Hi, I just started setting up my osCommerse store and I'm trying to set up the Payment module to accept Paypal. But every time I put in the email address that payments go to, the currency etc and hit update it just switches back to the defauly [email protected] etc. Can anyone advise?
GemRock Posted February 28, 2007 Posted February 28, 2007 If you are using the 060817 update release of osc, then the following may help to solve the problem: OPen compatibility.php under admin/includes/functions, then find this block of code (its at the beginning): 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); } } } Change it to: 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); } You may also need to change the one (same file name) at the catalog side. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
catisfaction Posted February 28, 2007 Author Posted February 28, 2007 Thankyou, I'll give it a shot and see what happens
sbfl26 Posted February 28, 2007 Posted February 28, 2007 If you are using the 060817 update release of osc, then the following may help to solve the problem: OPen compatibility.php under admin/includes/functions, then find this block of code (its at the beginning): 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); } } } Change it to: 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); } You may also need to change the one (same file name) at the catalog side. Ken Hello Ken, I have similar problem for Tax Zones. (I am using 060817 version). I changed the Tax Zones from default "Florida" to "California", but it always shows "Florida" whenever I return to this Tax Zones page. However, if I click (select) it, it would change back to "California". The most bothers me is under the Tax Rates, it doesn't allow me to change the zone from default "Florida" to "California", because the drop down menu only Florida exist there. I cannot do any change. Do you know how to change it? Thank you very much...
catisfaction Posted February 28, 2007 Author Posted February 28, 2007 Hmm, I just tried replacing that bit of code. Still have the original problem though
catisfaction Posted March 1, 2007 Author Posted March 1, 2007 Hmm ok, I see it says to try it on the catalog side too but I can't figure out where that is :P another nudge from anyone? Thanks
bkellum Posted March 1, 2007 Posted March 1, 2007 Hmm ok, I see it says to try it on the catalog side too but I can't figure out where that is :P another nudge from anyone? Thanks Helen, 1. Open the catalog/admin/includes/functions/compatibility.php. 2. 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); } 3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php. If you would rather just copy and paste (FTP) the modified files into your store, you can simply use my contribution to fix this 060817 osCommerce bug that I uploaded in the STS contribution site to help out the STS users. YOU DO NOT NEED STS IN ORDER TO USE THIS. I just had so many pleas for help regarding this from STS users so I posted it there. :lol: Use the link in my signature to go to STS4.4 and then download the 060817 Modules Patch for STSv4.2 & v4.3. Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
catisfaction Posted March 1, 2007 Author Posted March 1, 2007 This is a problem. I can't find this: catalog/admin/includes/functions/compatibility.php. There appears to be no file called Catalog.
Ausgirl Posted March 1, 2007 Posted March 1, 2007 This is a problem. I can't find this:catalog/admin/includes/functions/compatibility.php. There appears to be no file called Catalog. Hello, In your ADMIN under TOOLS click FILE MANAGER. All those files that show up are your catalog. If you use cPanel click FILE MANAGER then click catalog or yours maybe called something like www or shop or store or whatever it is called for your site.
catisfaction Posted March 1, 2007 Author Posted March 1, 2007 Hello, In your ADMIN under TOOLS click FILE MANAGER. All those files that show up are your catalog. If you use cPanel click FILE MANAGER then click catalog or yours maybe called something like www or shop or store or whatever it is called for your site. Oooh ok, yeah the ones in my FTP think start with Shop and then go on from there. Thanks so much! There i was trying to find one called Catalog O.o
jippybeale Posted March 1, 2007 Posted March 1, 2007 I was having the same problem with the payment module page not saving my settings (thread here) - adding in the reset($ar); line to compatibility.php that Ken suggested fixed it for me :thumbsup:
Ausgirl Posted March 1, 2007 Posted March 1, 2007 Oooh ok, yeah the ones in my FTP think start with Shop and then go on from there. Thanks so much! There i was trying to find one called Catalog O.o It can be a bit tricky when you first start but you'll get there. Have Fun
catisfaction Posted March 3, 2007 Author Posted March 3, 2007 I'm so sorry to keep having to come back to this but I'm still having problems. i'm trying to change that bit of code in the files in the admin area of stuff now... first I used my FTP to change it in the other area. It's giving me this error message. Error: I can not write to this file. Please set the right user permissions on: /home/virtual/site64/fst/var/www/html/shop//admin/includes/functions/compatibility.php It seems perhaps I need to be signed into my admin area to edit things? but I can't find anyway to login to anything. When my beddy put the store up for me he told me a login and password but I can't seem to find anywhere to use it!! Help! this is getting so frustrating :( Thanks Cat
Ausgirl Posted March 3, 2007 Posted March 3, 2007 Type http://www.yoursite.com/admin a pop up should ask you for your user name and password
catisfaction Posted March 3, 2007 Author Posted March 3, 2007 Ok, tried that, that gave me the sign in but took me to my hosts admin page, and I went on to www.mysite.com/shop/admin and still have the same error. I thought I managed to change the file using my ftp but ended up with a half a page of code coming up in the shop/admin area O.o so I went and put it back the way it was lol.
catisfaction Posted March 3, 2007 Author Posted March 3, 2007 I don't know what that is! If it's the shop admin area thats what I was trying.
Ausgirl Posted March 3, 2007 Posted March 3, 2007 No, http://www.mysite.com/cpanel You will need a user name & password to access it, if you dont have one ask your host what it is
catisfaction Posted March 3, 2007 Author Posted March 3, 2007 The requested URL /cpanel was not found on this server. Apache/2.0.52 (CentOS) Server at www.catisfaction.net Port 80
Ausgirl Posted March 3, 2007 Posted March 3, 2007 Mmmm well, I dont know, then. You should contact your host & ask about your cPanel (Where is it?). Maybe you dont have the oscommerce cart set up right. Looking at your site, nothing but your home page works. Hopefully someone else will pop in here and be able to help you. :)
catisfaction Posted March 3, 2007 Author Posted March 3, 2007 Thanks so much for your efforts. I'll pounce on the guy that set stuff up for me and show him this thread and see if he can help at all.
bkellum Posted March 3, 2007 Posted March 3, 2007 Thanks so much for your efforts. I'll pounce on the guy that set stuff up for me and show him this thread and see if he can help at all.Helen,Here is what you will need to do in order to fix your payment module: Use a FTP client software to download the two compatibility.php files mentioned earlier in this thread to your PC. With the files now on your PC, use a PHP editor such as PHP Designer 2007 or any plain text editor (such as NotePad) to open and Edit each file so that you add the code changes suggested in this thread. Save the files using the same file name. Use a FTP client software to upload the modified compatibility.php files over the existing compatibility.php files in your store's files. Note: You will be uploading two separate compatibility.php files in two separate folder destinations. That's it. Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
catisfaction Posted March 3, 2007 Author Posted March 3, 2007 Thanks Bill. This is what I tried too. It worked for the first one but the second isn't uploading... wait no it did upload eventually and that's when I got the half page of code at the top of each page when I went into the admin area so I switched it back.
catisfaction Posted March 3, 2007 Author Posted March 3, 2007 Le Sigh, I'm gonna give it another shot and see if mebee I screwed up the code when I did it. Fingers crossed!
bkellum Posted March 3, 2007 Posted March 3, 2007 Thanks Bill. This is what I tried too. It worked for the first one but the second isn't uploading... wait no it did upload eventually and that's when I got the half page of code at the top of each page when I went into the admin area so I switched it back.Helen, it appears you made some coding errors. I made all the changes for you and placed them in the correct folder so that all you need to do is upload the files over the same files in your store. Take a look at my contribution in the STS area using the STS4.4 link in my signature and download the contribution "060817 Module Fix for STSv4.2 & v4.3" Don't be fooled by the fact that it is in the STS area because it really does not have anything to do with STS except for the fact that since STS works like the Payment & Shipping Modules, it is also affected by this 060817 bug. I posted this fix some time ago since I kept getting emails for help from STS users regarding this bug. Have fun! Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
Recommended Posts
Archived
This topic is now archived and is closed to further replies.