VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: jjk on October 12, 2011, 10:51:10 AM

Title: [Solved] Cart issue - Warning: Cannot use a scalar value as an array...
Post by: jjk on October 12, 2011, 10:51:10 AM
J1.7.1/VM2 SVN revision 4355
When not logged in (no customer address in the cart yet), the cart shows:
Warning: Cannot use a scalar value as an array in ...\plugins\vmshipper\weight_countries\weight_countries.php on line 404
Title: Re: Cart issue - Warning: Cannot use a scalar value as an array...
Post by: alatak on October 12, 2011, 19:45:57 PM
Hi,

Txs, i'll have a look ..
Title: Re: Cart issue - Warning: Cannot use a scalar value as an array...
Post by: alatak on October 13, 2011, 08:39:19 AM
Hi,

Line 404 .. sorry I did not find it ..  ;)

I can't reproduce you error.
I did some changes lately in the shipping/payment plugins.
May be i did correct it?

Can you try again please?
Title: Re: Cart issue - Warning: Cannot use a scalar value as an array...
Post by: jjk on October 13, 2011, 10:00:37 AM
Hi,

it's still present using J1.7.1/VM2 SVN revision 4373. This morning I found that this warning comes up if I publish a shipping method - one warning for each published shipping method. If I unpublish my shipping methods, the warning disappears.
See screenshots attached.

Also, when I enter some numbers into 'Zip range start' and 'Zip range end', VM Debug reports an 'ordering' issue:
vmdebug Problem in store TableShippingcarrier_shoppergroups Unknown column 'ordering' in 'field list' SQL=UPDATE `jos_virtuemart_shippingcarrier_shoppergroups` SET `virtuemart_shippingcarrier_id`='1',`virtuemart_shoppergroup_id`='1',`ordering`='1' WHERE `id`='4'


[attachment cleanup by admin]
Title: Re: Cart issue - Warning: Cannot use a scalar value as an array...
Post by: alatak on October 13, 2011, 10:42:04 AM
Hi,

Did i fix the scalar error with revision 4374 ?

Title: Re: Cart issue - Warning: Cannot use a scalar value as an array...
Post by: jjk on October 13, 2011, 11:46:21 AM
...not really  ;)
Now I see this if I want to view the cart:

Warning: Cannot use a scalar value as an array in ...\plugins\vmshipper\weight_countries\weight_countries.php on line 404
Warning: Cannot use a scalar value as an array in ...\plugins\vmshipper\weight_countries\weight_countries.php on line 404

Fatal error: Declaration of plgVMPaymentPaypal::plgVmOnConfirmedOrderGetPaymentForm() must be compatible with that of vmPaymentPlugin::plgVmOnConfirmedOrderGetPaymentForm() in ...\plugins\vmpayment\paypal\paypal.php on line 597
Title: Re: Cart issue - Warning: Cannot use a scalar value as an array...
Post by: Milbo on October 13, 2011, 15:47:24 PM
Heyhoo Jörg, we dont have this problem using j1.5,

But this is not a j1.7 error, I am quite sure, that you forgot to move the files into the subdirectories.... hmm maybe I provide a windows shell doing that (hey linux geeks, of course lets also add a command file for linux).
Title: Re: Cart issue - Warning: Cannot use a scalar value as an array...
Post by: jjk on October 13, 2011, 18:57:20 PM
Ahhh - good hint  ;) ...actually pretty close to what has happend.
The source of the problem was an earlier issue - see here: http://forum.virtuemart.net/index.php?topic=91627.msg301021#msg301021 (http://forum.virtuemart.net/index.php?topic=91627.msg301021#msg301021)
For that reason it did work only when I left the old folders/including the files (duplicates) in place and with Valerie's latest fix this workaround was producing the new problem.
Title: Re: Cart issue - Warning: Cannot use a scalar value as an array...
Post by: Milbo on October 13, 2011, 19:01:37 PM
exactly, as I said, I should provide a .cmd file for coping the files to j1.7
Title: Re: [Solved] Cart issue - Warning: Cannot use a scalar value as an array...
Post by: jjk on October 13, 2011, 19:06:45 PM
...in my case I just had to delete the forgotten duplicates in the old folders :-)