News:

Support the VirtueMart project and become a member

Main Menu

[SOLVED] Error on checkout

Started by Schafir, June 01, 2008, 01:37:18 AM

Previous topic - Next topic

Schafir

Hello, We are using VM 1.1.0 on Joomla 1.5.3 and we get the following error upon checkout confirmation:

Warning: Invalid argument supplied for foreach() in /home/.../administrator/components/com_virtuemart/classes/ps_checkout.php on line 1845

I am not a programmer, but I looked at this line in the ps_checkout.php file and it has to do with shipping fields:

1845 foreach( $shippingfields as $field ) {      

Can anyone tell me what this error is and how to fix it?

thank you,

Schafir

Schafir

Anyone at Virtuemart have any ideas on this error?

Nyquist

I have the same problem, but with even more errors...


Warning: Invalid argument supplied for foreach() in xxx\administrator\components\com_virtuemart\classes\ps_checkout.php on line 992

Warning: Invalid argument supplied for foreach() in xxx\administrator\components\com_virtuemart\classes\ps_checkout.php on line 1826

Warning: Invalid argument supplied for foreach() in xxx\administrator\components\com_virtuemart\classes\ps_checkout.php on line 1845

Notice: Undefined offset: 0 in xxx\administrator\components\com_virtuemart\html\checkout.thankyou.php on line 40

Notice: Undefined property: stdClass::$user_email in xxx\components\com_virtuemart\themes\default\templates\pages\checkout.thankyou.tpl.php on line 34


The order can also not be accessed from the backend but the order seems to get registered in the database. The strange thing is that it works flawlessly on my local computer (exact same website but with MySQL 5.0.27 running). Could it have something to do with which MySQL-version being used? The one that generates errors have MySQL 4.1.15 installed.

Schafir

Aravot, can you please comment on these errors?  In my case, I am using a basic Joomlart shopping II template and I get this error on checkout.  It this a Virtuemart bug, a Joomla bug,
a configuration issue, or what?  We really need to get this resolved and would appreciate your help.

Thank you.

aravot

@Nyquist could be SQL issue, try updating your remote site to v5

@Schafir, where do you get this error, what shipping and payment modules you have activated, are you using SEF, do you have cache on.

Schafir

Aravot, first of all, thank you for responding.  I didn't realize you were unavailable. 

This error occurs when confirming the checkout. The error occurs when selecting "standard shipping" in checkout.  It appears on the confirmation page (see attached), in addition to another error in the confirmation email in the "ship to" field:

Warning: Invalid argument supplied for foreach() in /.../components/com_virtuemart/themes/default/templates/order_emails/confirmation_email.tpl.php on line 104

We are in development at this point and we only have activated Flex shipping and standard shipping enabled. Cache and SEF are turned off.

Thanks for any help you can give us.




[attachment cleanup by admin]

gregdev

Did you upgrade from one of the earlier RC releases? It almost looks like you are missing a column in the userfields table.

Greg

[tr][td]
[/td][td]
www.plainlycode.com[/td][/tr]
[/table]

Schafir

Greg, thank you very much. It turns out that the userfields did not copy over
when I did a manual upgrade from the release candidate to VM 1.1.0 stable.

An uninstall/reinstall with the automatic installation did the trick.

Thanks again for your help.

Nyquist

Quote from: aravot on June 13, 2008, 03:47:12 AM
@Nyquist could be SQL issue, try updating your remote site to v5

Yes, this did actually help. Thank you!

teubernet

Did you find a solution for this issue, I have the same problem. The problem accurs also in a fresh installation with sample data here.
Similar errors happen when viewing the order in the account administration, the order confirmation emails and other places.

I have Joomla! 1.0.15; VM 1.1.0 with extra user fields.

Best regards

CT

Schafir

teubernet,

You may or may not have the same problem I had.  The best advice I can give you is to go into the admininstration area of Virtuemart and check to see if you have the default userfields installed.  You can get there by selecting "manage user fields".  In my case, the default fields were not installed when I upgraded for some reason.  An uninstall and reinstall of virtuemart solved the problem.

Good luck.

teubernet

I did afresh install with sample data again, same problem:
QuoteWarning: Invalid argument supplied for foreach() in /srv/www/vhosts/sq-lab.com/httpdocs/administrator/components/com_virtuemart/classes/ps_checkout.php on line 992

Warning: Invalid argument supplied for foreach() in /srv/www/vhosts/sq-lab.com/httpdocs/administrator/components/com_virtuemart/classes/ps_checkout.php on line 1826

Warning: Invalid argument supplied for foreach() in /srv/www/vhosts/sq-lab.com/httpdocs/administrator/components/com_virtuemart/classes/ps_checkout.php on line 1845

After the confirmation also there are Errors like:
QuoteWarning: Invalid argument supplied for foreach() in /srv/www/vhosts/sq-lab.com/httpdocs/components/com_virtuemart/themes/default/templates/pages/account.order_details.tpl.php on line 98
and
QuoteWarning: Invalid argument supplied for foreach() in /srv/www/vhosts/sq-lab.com/httpdocs/components/com_virtuemart/themes/default/templates/pages/account.order_details.tpl.php on line 135
while viewing the order in the Account maintenance.

The confirmaion email also has warnings:
QuoteWarning: Invalid argument supplied for foreach() in /srv/www/vhosts/sq-lab.com/httpdocs/components/com_virtuemart/themes/default/templates/order_emails/confirmation_email.tpl.php on line 63
and
QuoteWarning: Invalid argument supplied for foreach() in /srv/www/vhosts/sq-lab.com/httpdocs/components/com_virtuemart/themes/default/templates/order_emails/confirmation_email.tpl.php on line 104

There is no customer information shown. There is nothing saved to the jos_vm_order_user_info table in the database.

Using 1.0.15, vm 1.1.1.

Best regards CT

Schafir

Sorry, I cannot help. Perhaps Gregdev or one of the other Virtuemart experts can respond and help you.



teubernet

Are there other possibilities to solve this problem?
I have an own server for one client, but on shared hostings upgrading can be a problem.

best regards

CT