VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: Pejo on November 04, 2016, 01:37:28 AM

Title: Upgrade to 3.0.18 multi variant issue
Post by: Pejo on November 04, 2016, 01:37:28 AM
Hi,

I have upgrade Virtuemart from 3.0.14 to 3.0.18 and I have problem selecting children products in multi variant option of the product.
(like in some threads here, when select other product or color from drop down menu, it doesn't show it, doesn' refresh and image is from parent product, as the stock level).

Versions are latest: Joomla 3.6.4 and VM 3.0.18 - Template is paid one, from Gavick.

Believe it or not, for the last 2 day I have searching rough thi forum and web,but still no solution. I have read this tread:

New stable Release Candidate 3.0.18 released, please anyone test. -> http://forum.virtuemart.net/index.php?topic=135402.0

Change some stuff, furst time I refreshed, it wokrd, putted in the cart, then delete it from cart, went again to same product, and it did not work anymore.

On this two threads:

Choose Option Multi Variant does not update the page -> https://forum.virtuemart.net/index.php?topic=135601.0
Custom fields not work after update to 3.0.18 -> https://forum.virtuemart.net/index.php?topic=135634.0

"product-container" was already there, but I have change some DIV variants and string, tried it many other ways with other codes, but once i maybe 15 tries (every try is some small change in code, adding "product-container" in some other DIVs, etc) worked once, but after refreshing page, it did not work anymore.

Have read this thread:

MultiVariant problem after upgrade to 3.0.14 -> https://forum.virtuemart.net/index.php?topic=133525.0

After reading this tread, I install jQuery Easy, tried it with a lot of advices from searching other sites, forums, pages, nothing happened, nothing helped, so turned off plugin.

Also, on one topic here on forum (can not find it) I read that someone resolve problem with turning off one plugin at the time. tried this also, but no luck.
I have tried many solutions I have search in this two days (I have working on this problem for 5-6 hours a day) and no luck at all.

This is my last attempt, my last try.
I don't like posting questions as soon as problem appears,  because there is sooo many same cases on this forum as on the web, so it is not difficult to resolve it but this one is so hard. :(

Should I downgrade Virtuemart to some other version that did work or?

Hope someone had same problems as me and found solution that are not already mentioned here in post.
Thanks guys...
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: GJC Web Design on November 04, 2016, 11:23:27 AM
IMHO Jqueryeasy is NOT required now in J3/VM3  (it was useful in J2.5)

also IMHO Gavik VM (the last time I looked) templates are not fit for purpose.. still using VM2 coding techniques etc

Have you a JS error?
Have u tried with the stock productsdetail template?
Have u line compared your proddetails with the stock one?
there are different inline scripts needed with the jsapi thing

try with the stock Protostar as a test -- then u know the system works

look at the bottom of the default file
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: bortolani on November 04, 2016, 12:17:18 PM
Hi,
should you ever find a solution please post it here.
Me too I've been struggling with the same problem and then decided to revert back to 3.0.16 for the moment. :( :(

Thanks, Bruno
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 04, 2016, 15:49:08 PM
I just spend my afternoon to find some fallbacks. The new vm3.0.18.1 has now an option, which makes it possible to use old layouts. I also found a fallback for the js, not a nice one, but it works.
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 04, 2016, 19:31:08 PM
Please try this one http://dev.virtuemart.net/attachments/download/1024/com_virtuemart.3.0.18.1_extract_first.zip

There are some changes for the category view. The config tab "templates" has new options and there is an untranslated option, just activated it, to be able to use your old layouts.
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Pejo on November 04, 2016, 19:46:37 PM
Thanks guys. It seems that problem is with jQuery. I read somewhere that jquery is loaded twice, or that error is with jQuery script and fancybox script. I'm not that expert to figure it out.
I have tried really a lot of solutions, but today I decide to downgrade to 3.0.14 so I did that. Still having a lot of troubles, but in most time, multi variant works - not always, but I think when you enter product for the first time, you'll be able to choose color or variant and that is better than not able to select at all.

@GJC Web Design

I did not try to use stock productdetails template. Well, I'll try, how bad can it be if this option is not working? :)

I have tried with protostar or Beez3, but same problem.
I'll wait for other updates to see if problem will be resolved or Gavick update of my template with newer version of joomla and Virtuemart.


Anyway, if someone find a solution, please share. Thanks
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Pejo on November 04, 2016, 19:47:19 PM
Quote from: Milbo on November 04, 2016, 19:31:08 PM
Please try this one http://dev.virtuemart.net/attachments/download/1024/com_virtuemart.3.0.18.1_extract_first.zip

There are some changes for the category view. The config tab "templates" has no option and there is an untranslated option, just activated it, to be able to use your old layouts.

Thanks Milbo, I'll try it immediately :D
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 04, 2016, 19:53:13 PM
You should really use the new version. Sometime you need only to disable a layout override, which even sometimes barely noticeable. Templates can also deliver their own JQuery. you can either deselect that in the template or at leat in our vmconfig, tab template.
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Pejo on November 04, 2016, 20:24:03 PM
I installed and my template/productdetail view is useless, just nothing on screen I'll try again with fresh install of JM and VM that I have, bought with older versions (of course, everything is on test site and test server), then I will install update of JM 3.6.2 and VM 3.0.18 from Joomla update option in BE/admin panel.

Then I'll try to disable layout override, if that doesn't help, I'll try with your 3.0.18.1 version.
Thank you so much for helping me.

I won't just won't give up until I try every solution. I would like to have latest versions in my web shop/on my site, but if shop doesn't work properly, I need version that does. :)

Thanks again. Post here ASAP after I try this solutions.
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 04, 2016, 21:46:35 PM
Try directly the vm3.0.18.1. There is no need to stay with an old version.
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Pejo on November 06, 2016, 23:45:21 PM
It seems that is working, I have tried with only one product for now, but I have problem with category inside my template.
This is what I get, when I try to enter category:

(http://www.appleoprema.com/tmp/test.png)

I can test it more, after I override/fix this category problem...
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 07, 2016, 11:51:26 AM
enable the php debug, you can do that within vmconfig, first tab. There is very likely a fatal, if you show it to me, I can again find a fallback. I dont like to force people to adjust their template. :-)
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: jannisl on November 07, 2016, 13:04:43 PM
Ok my friend.. i enabled php debug.. can you check the link? because i dont understand what i have to do..
http://www.epsilonk.gr/index.php/proionta-menu/analosima/proionta-tipografiou
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 07, 2016, 13:36:30 PM
ehrm, I cant see any error on your page. How did you create the error?
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 07, 2016, 13:38:07 PM
ReferenceError: jQuery is not defined(...)

Looks like you do not load jQuery. When your template does not load jQuery you must enable it in vm. Did you enable the legacy option?
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 07, 2016, 15:11:47 PM
Yepp, the old files work now again, when you activate the fallback. Just the js is not perfect, it tries first to load the old container and if not available, it tries the old way.
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: bortolani on November 07, 2016, 21:36:17 PM
I confirm that in my website most of the problems caused by VM 3.0.18 have been fixed by the 3.0.18.1 release.

Bugs that I still found are the following:

1) If you create a multi variant child using the 'Add a child product' button in the custom field area then an extra product 'scalar' is created. This does not happen if you create the child using the  'Add a child product' button in the 'Product information' tab. By the way I couldn't find an easy method to delete the 'scalar' child.

If you want to reproduce the error do the following:
- Activate the 'legacy' option in 3.0.18.1
- Edit a product and add a custom field of multi variant type
- Press the 'Add a child product' button in the multi variant area
- Two child products are created: one is OK, the other is named scalar and makes no sense :(

2) If you try to show the cart content after having switched to another language you get an SQL syntax error related to shipment methods selections. This does not happen if you simply switch languages when already showing the cart. This does not happen either if you put a product in the cart directly from the second language.

If you want to reproduce the error do the following:
- When in language A put a product in the cart
- Show the cart
- Exit the cart, continue shopping
- Switch to language B
- Show the cart
- Error :(

And concerning multi variants there is still the bug described here: http://forum.virtuemart.net/index.php?topic=135381.msg471324#msg471324

Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 08, 2016, 11:34:19 AM
You do that in one row?
You create a new product, you do not give a name, you do not store it? you directly add the MV and then you directly use the "add to new Produkt"?

I cannot reproduce it and wonder about. "- Activate the 'legacy' option in 3.0.18.1" is only active in the FE!
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: bortolani on November 08, 2016, 23:09:23 PM
Hi Milbo.

Just to explain it better.

Option 1:

VM 3.0.18.1
I check the flag you added in VM config to enable legacy layouts.
I edit an existing product or a new one and I add a new custom field of type multi variant, for example color.
I set three values: red green blue and save
Then I add a new child product using the button in the custom fiels area.
I see two new products: one is the regular child with proper name, the other one is called 'scalar' and there is no way to delete it.

Option 2:

VM 3.0.18.1
I check the flag you added in VM config to enable legacy layouts.
I edit an existing product or a new one and I add a new custom field of type multi variant, for example color.
I set three values: red green blue and save
Then I add a new child product using the button in the product details area.
I see one new product: just the regular child with proper name.

Hope you are able to reproduce the behaviour.
Title: Re: Upgrade to 3.0.18 multi variant issue
Post by: Milbo on November 09, 2016, 08:29:51 AM
Okey, you store the product in between, that was the question.

I checked both buttons and they look exactly the same. Btw, which php version do you use?

open your controller product.php in BE /administrator/components/com_virtuemart/controller/product.php around line 294, please replace the code with the one below


$cids = vRequest::getInt($this->_cidName, vRequest::getInt('virtuemart_product_id'));
$cids = array_unique($cids);
foreach($cids as $cid){
        $cid = (int) $cid;
       
if ($cid and $model->createClone($cid)) {
$msg = vmText::_('COM_VIRTUEMART_PRODUCT_CLONED_SUCCESSFULLY');
} else {
$msg = vmText::_('COM_VIRTUEMART_PRODUCT_NOT_CLONED_SUCCESSFULLY');
$msgtype = 'error';
}
}