Not of immediate use, but for future reference: Always the best course before adding any thing to a live shop is to "Backup" files and DB just for this type of event.This is a 1.3.5 cart that worked fine until I installed latest GCO module
Not of immediate use, but for future reference: Always the best course before adding any thing to a live shop is to "Backup" files and DB just for this type of event.This is a 1.3.5 cart that worked fine until I installed latest GCO module
Sorry, "rolling back" and restoring all from a backup are read as different to me.
Did you require any DB alterations to install this?
GCO required this change only
update orders set orders_status = 100 where orders_status = 1 and payment_module_code = 'googlecheckout';
update orders set orders_status = 101 where orders_status = 2 and payment_module_code = 'googlecheckout';
update orders set orders_status = 102 where orders_status = 3 and payment_module_code = 'googlecheckout';
Believe it or not ....
I have solved this problem by replacing in actionMultipleAddProduct
while ( list( $key, $val ) = each($_POST['products_id']) ) {
with
foreach($_POST['products_id'] as $key=>$val) {
Thanks to drbyte, Dan at IDG , and jiri from magic SEO for taking time to work on it ..these guys are GREAT !! for stepping up to help.
but ... in the end, old fashioned debugging saved the day.
Allan
I'm glad you've got it working.
I'm still a bit puzzled that it "works", considering that checking the value of $_POST before running the while/list was showing empty during earlier testing ...
Was there anything else that you changed? (or, rather, left changed while doing many tests and didn't back out after testing)
.
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.
As far as I can tell , i removed all flags that I had inserted during the debug process. I was playing with various structures with ourput to error_log, and quite by fluke when I inserted the foreach, suddenly started to notice that it started to present the output of the $_POST, when i reverted to a while, the $_POST stopped displaying data. I tried a join(',',$_POST['products_id'] and it was showing erratic data.
Even now, after the fact, if I revert to the "while", it breaks it again.
Now why this works fine on 100K other ZC installs, and also on other ZC installs on the same server is beyond me...but for now ill settle for the fact that it works. Just wish I knew what else is broken as a result.
Allan
So, any explanation of this? The behavour SHOULD be the same, they are equivalent. BUT, on our web site, exactly the same thing happens, replacing the while list each with foreach makes the problem go away. This is soundlng like a PHP bug perhaps? foreach is preferred anyway, but, I do not see any logical reason the 2 statement shoudl not behave the same, but they don't.