VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: alesalva86 on September 27, 2016, 21:40:59 PM

Title: Multi-variant error "scalar"
Post by: alesalva86 on September 27, 2016, 21:40:59 PM
Good evening everyone,
I am creating an online store, and I have included a number of products without any hitch, now when I insert the custom field "multi-variant" at the time when I add the child products, causes me a son produced with the same id of the parent and the word "scalar" (see image) and when each child check the variant appears to me the error: "VMerror: Check VmTable #__virtuemart_products_it_it not passed. Neither slug nor obligatory value at product_name for self slug creation is given 0
VMerror: You are not an administrator or the correct vendor, storing of product canceled "

And until now had not given me any problems ... I do not understand anything! Help? Help? Help?

Can someone help me?

Thank you

Joomla 3.6.2
VirtueMart 3.0.18
Title: Re: Multi-variant error "scalar"
Post by: GJC Web Design on September 27, 2016, 21:47:55 PM
post a screen of your MV setup please
Title: Re: Multi-variant error "scalar"
Post by: alesalva86 on September 27, 2016, 21:52:43 PM
There is.
Title: Re: Multi-variant error "scalar"
Post by: Milbo on September 29, 2016, 15:46:58 PM
Which browser do you use? and which php version are you running.
Title: Re: Multi-variant error "scalar"
Post by: alesalva86 on October 01, 2016, 15:04:08 PM
Hi,
I use Chrome and my PHP version is 5.6.24

Thank you, I wait an answer

Please help me!
Title: Re: Multi-variant error "scalar"
Post by: Marktwert on October 11, 2016, 14:27:52 PM
Hi at all,
I have the same problem, no solution?
Title: Re: Multi-variant error "scalar"
Post by: alesalva86 on October 13, 2016, 11:51:54 AM
We are the only with this problem?!?!?

Help us!!!!
:'( :'( :'(
Title: Re: Multi-variant error "scalar"
Post by: dslove on October 18, 2016, 12:02:19 PM
Facing the same problem on 3 websites that otherwise worked perfectly when running VM 3.0.16.

Joomla 3.6.2 / VM 3.0.18 / PHP 5.6.21 / MySQL 5.6.33

Any news on a fix for this?
Title: Re: Multi-variant error "scalar"
Post by: alesalva86 on October 19, 2016, 19:51:52 PM
but really no one can help us ???
it is not possible that only we have this problem, there has to be a bug in Virtuemart at this point.

Title: Re: Multi-variant error "scalar"
Post by: dslove on October 21, 2016, 13:50:20 PM
Quote from: alesalva86 on October 19, 2016, 19:51:52 PM
but really no one can help us ???
it is not possible that only we have this problem, there has to be a bug in Virtuemart at this point.

No news is bad news, I'm afraid. Don't really know what to tell the clients... :-\
Title: Re: Multi-variant error "scalar"
Post by: alesalva86 on October 22, 2016, 15:59:17 PM
Me too!

I'm realy sad!!!  :'( :'( :'(
Title: Re: Multi-variant error "scalar"
Post by: myweb11 on October 26, 2016, 23:21:49 PM
Create the first child of at least one item in the Information tab.
After this error will disappear and you can add other child products.
Title: Re: Multi-variant error "scalar"
Post by: dslove on November 03, 2016, 09:30:52 AM
Quote from: myweb11 on October 26, 2016, 23:21:49 PM
Create the first child of at least one item in the Information tab.
After this error will disappear and you can add other child products.

Thank you myweb11, but this has not really worked for me.  :(
Clients have asked to be migrated to a new cart extension, so I am currently investigating that.
Title: Re: Multi-variant error "scalar"
Post by: Milbo on November 04, 2016, 19:38:34 PM
Please tell the php version, dslove has PHP 5.6.21 and the others?

dslove, none of our testers have this error and we have quite a lot. When I know how to reproduce it, I could fix it. But at the moment we dont know the conditions to reproduce the bug. Consider to buy a http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail and to write a ticket. I fear I need to debug this directly on your system.
Title: Re: Multi-variant error "scalar"
Post by: dslove on November 11, 2016, 11:43:34 AM
Hi Milbo, and sorry it took me so long to reply to you.

My key issue right now is persuading customers to stay with VM and not migrate to another e-commerce extension. Please message me with your email so we can continue this conversation in private. I am willing to buy a Bronze subscription for one of the websites so you can take a look and see what's going on.

Best regards,
Alex
Title: Re: Multi-variant error "scalar"
Post by: Milbo on November 13, 2016, 08:57:14 AM
Seems we found it, ...

open /administrator/components/com_virtuemart/models/customfields.php around line 409 (function displayProductCustomfieldBE, case 'C'), search for



$field->options = (object)$field->options;



replace by

if(!empty($field->options) and is_array($field->options)){
$field->options = (object)$field->options;
}
Title: Re: Multi-variant error "scalar"
Post by: escapezone on November 14, 2016, 11:17:21 AM
Quote from: Milbo on November 13, 2016, 08:57:14 AM
Seems we found it, ...

open /administrator/components/com_virtuemart/models/customfields.php around line 409 (function displayProductCustomfieldBE, case 'C'), search for



$field->options = (object)$field->options;



replace by

if(!empty($field->options) and is_array($field->options)){
$field->options = (object)$field->options;
}


Fixed !

Thank you Milbo ;)

Joomla! Version 3.6.4 Stable
Virtuemart Version   3.0.18
PHP Version    7.0.12
Title: Re: Multi-variant error "scalar"
Post by: Milbo on November 14, 2016, 14:59:07 PM
Also fixed in this new version http://dev.virtuemart.net/attachments/download/1028/com_virtuemart.3.0.18.3_extract_first.zip

Which should also "heal" already broken ones (just open the product, check the form and store)
Title: Re: Multi-variant error "scalar"
Post by: dslove on November 15, 2016, 11:22:50 AM
Hi Milbo, thanks for the solution & patch but unfortunately I still get an error:

Error
   
vmError: VmTable #__virtuemart_products_el_gr Check not passed. Neither slug nor obligatory value at product_name for auto slug creation is given 0
   
vmError: You are not an administrator or the correct vendor, storing of product cancelled

(I have installed the 3.0.18.3 patch & AIO)
Title: Re: Multi-variant error "scalar"
Post by: Milbo on November 15, 2016, 12:22:46 PM
This is another error. You cannot create a child, when the parent is not stored already. The child needs a name, which is derived from the parent one.
Title: Re: Multi-variant error "scalar"
Post by: dslove on November 15, 2016, 12:25:26 PM
This happens when I try to save the changes to an already existing parent product.
Title: Re: Multi-variant error "scalar"
Post by: Milbo on November 15, 2016, 14:03:43 PM
I got the error myself now and the reason is that you create a new product and directly add the mv. I add some fixes and reupped it. You can see that the version changed, because the admin menu on the left shows now also the codename and svn version.
http://dev.virtuemart.net/attachments/download/1029/com_virtuemart.3.0.18.3_extract_first.zip
Title: Re: Multi-variant error "scalar"
Post by: dslove on November 15, 2016, 19:25:33 PM
It seems to be ok now Milbo, thank you.
I will apply the latest version of the fix to the rest of the websites & post here if I discover any further issues.

Best regards,
Title: Re: Multi-variant error "scalar"
Post by: Guido Q. on December 05, 2016, 21:23:30 PM
I have the same problem. please help.
Title: Re: Multi-variant error "scalar"
Post by: dslove on December 06, 2016, 07:49:01 AM
Quote from: Guido Q. on December 05, 2016, 21:23:30 PM
I have the same problem. please help.

Doesn't the above solution work for you Guido?
Title: Re: Multi-variant error "scalar"
Post by: bookplates on December 10, 2016, 18:29:03 PM
I was having similar issues, then updated to "VirtueMart 3.0.18.5 Blue Corvus 9390." Now I can add a product with category, and multivarient custom field on the admin side, and no errors. But when I try to add a ramification to the multivar, the front end gives "page can't be found" and "0 Cannot use object of type stdClass as array." Then any category listed with that product also reports page not found. Is there perhaps a trick to adding a ramification, or a bug in Virtuemart?
Title: Re: Multi-variant error "scalar"
Post by: bookplates on December 10, 2016, 20:37:53 PM
Turns out it was a problem with my Multivarient custom field. I somehow had "Internal variable" set to "Yes," but with no internal variable assigned. I put it back to "No" -- which the hover tooltip recommends -- and works.