Author Topic: [Solved] Cart issue - Warning: Cannot use a scalar value as an array...  (Read 4235 times)

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3441
  • using Matomo instead of Google Analytics
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
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: Cart issue - Warning: Cannot use a scalar value as an array...
« Reply #1 on: October 12, 2011, 19:45:57 pm »
Hi,

Txs, i'll have a look ..

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: Cart issue - Warning: Cannot use a scalar value as an array...
« Reply #2 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?

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3441
  • using Matomo instead of Google Analytics
Re: Cart issue - Warning: Cannot use a scalar value as an array...
« Reply #3 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]
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: Cart issue - Warning: Cannot use a scalar value as an array...
« Reply #4 on: October 13, 2011, 10:42:04 am »
Hi,

Did i fix the scalar error with revision 4374 ?


jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3441
  • using Matomo instead of Google Analytics
Re: Cart issue - Warning: Cannot use a scalar value as an array...
« Reply #5 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
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9835
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Cart issue - Warning: Cannot use a scalar value as an array...
« Reply #6 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).
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3441
  • using Matomo instead of Google Analytics
Re: Cart issue - Warning: Cannot use a scalar value as an array...
« Reply #7 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
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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9835
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Cart issue - Warning: Cannot use a scalar value as an array...
« Reply #8 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
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3441
  • using Matomo instead of Google Analytics
Re: [Solved] Cart issue - Warning: Cannot use a scalar value as an array...
« Reply #9 on: October 13, 2011, 19:06:45 pm »
...in my case I just had to delete the forgotten duplicates in the old folders :-)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations