Forums / Addon Payment Modules / I broke the payment options...

I broke the payment options...

Views: 1,157

Results 1 to 6 of 6
26 Jul 2012, 9:32 AM
#1
blueeyedfrog avatar

blueeyedfrog

New Zenner

Join Date:
Mar 2008
Posts:
29
Plugin Contributions:
0

I broke the payment options...

Hi All,

I had PayPal express checkout working using PayPal sandbox. I was working on a non zen cart payment option module (direct bank deposit), changing some of the text in the php files. Well, I stupidly uploaded the php file while simultaneously tinkering with the payment option on the testsite. Now I have lost about 4 or more different payment options in the admin area (they don't even appear as an option), and I can't progress to checkout on the test site.

How do I recover? I see the php files still seem to be on the server and I can open them okay (i.e. they don't seem to be corrupted) - so I suspect I will need to replace some/all of the sql database tables. However, I'm new to working with sql databases. I have backed up my database however, when I try to restore it tells me the first file (table?) on the list already exists and doesn't allow me to continue. I suspect I may not have properly backed up the database. Can I get around the issue by selectively restoring tables (my preference since I have made I lot of changes since the last backup that I would prefer not to loose - still not the end of the world)? If so, how? Do I need to delete files/tables first before trying to restore the database?

Sorry if this is in the wrong section.

Thanks in advance.

26 Jul 2012, 9:46 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: I broke the payment options...

Payment modules consist of pairs of files: the "module" file, and its corresponding language file. If either of those is missing or contains errors, you'll get the symptoms you describe.
Also, if you have any *.php files (even so-called "backup" files which you've left with a .php extension), those will be attempted also, and if they have errors or no matching language/module pair, then you'll get those symptoms as well.

Ref: http://www.zen-cart.com/content.php?124-blank-page

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Jul 2012, 11:55 AM
#3
blueeyedfrog avatar

blueeyedfrog

New Zenner

Join Date:
Mar 2008
Posts:
29
Plugin Contributions:
0

Re: I broke the payment options...

Thanks for your reply.

To confirm, you're suggesting that initially I try replacing all the payment module php files (the twin module/language files for each module) via fpt (and do not try reinstalling the sql database)? As well as removing any miscellaneous php files that might be creating problems.

26 Jul 2012, 2:51 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: I broke the payment options...

I would put the files back into the state they were before you made changes that broke things.

The technical info I offered earlier simply helps you start in the folders related to those modules and their language content. If you need to do broader cleanup than that, that's up to you and whatever changes you've been making.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Jul 2012, 11:33 AM
#5
blueeyedfrog avatar

blueeyedfrog

New Zenner

Join Date:
Mar 2008
Posts:
29
Plugin Contributions:
0

Re: I broke the payment options...

All fixed. Removed and replaced dodgy payment module php files in the locations specified. No sql restore needed.

Thank you! :smile:

27 Jul 2012, 3:13 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: I broke the payment options...

Thanks for confirming that cleaning up the files solved the problem.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.