VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: FabioZumbi12 on October 06, 2016, 09:06:21 AM

Title: Custom fields not work after update to 3.0.18
Post by: FabioZumbi12 on October 06, 2016, 09:06:21 AM
Hello,

After update to 3.0.18 my custom fileds stoped to work on product details.

When i change an option the value dont update and the button "Add to cart" not work. On tests i know its the custom fields. When i disable the custom filed, the button "Add to Cart" back to work.

Can someone help?
Thanks.
Title: Re: Custom fields not work after update to 3.0.18
Post by: GJC Web Design on October 06, 2016, 18:43:19 PM
??  http://virtuemart.net/news/latest-news/477-release-of-3-0-18-connecting-the-loose-ends

The new js for using ajax for reloading product content uses now always the same class. The class is "product-container". Just search for the div with "productdetails-view productdetails" and add "product-container". In case you want the ajax reload within a product modul, you need to adjust the overrides here also. Furthermore the layout login of the user view is now in the sublayout folder. Members who used the ajax for child variants within the browse view should change the layout back to default.
Title: Re: Custom fields not work after update to 3.0.18
Post by: FabioZumbi12 on October 07, 2016, 00:36:47 AM
I dont have ideia on how or where i need to change this. I am not only the unique people with this problem.
http://forum.virtuemart.net/index.php?topic=135402.msg472593#msg472593

Can you xplain with more details or where i change this? I am not a virtuemart dev then i dont know where all files and all calsses/system and etc :(

Thank you.
Title: Re: Custom fields not work after update to 3.0.18
Post by: GJC Web Design on October 07, 2016, 11:05:56 AM
look in your

\templates\xxxxxxxxx\html\com_virtuemart\productdetails\default.php if over ridden .. if not in the VM views

find the html container holding the whole code

normally something like

<div id="productdetails-view" class="productdetails-view productdetails">

change it to

<div id="productdetails-view" class="productdetails-view productdetails product-container">



Title: Re: Custom fields not work after update to 3.0.18
Post by: FabioZumbi12 on October 08, 2016, 09:49:34 AM
Thanks for your help.

I didnt find the php file on my templates folder. This the tree on my site:

http://prnt.sc/cr8w5z

And on "/components/com_virtuemart/views/productdetails/tmpl" i found this:

<div class="product-container productdetails-view productdetails" >

I think i not using ovwrride for virtuemart but if yes, where i see this?
Thanks.
Title: Re: Custom fields not work after update to 3.0.18
Post by: GJC Web Design on October 08, 2016, 10:47:38 AM
so it has the product-container class so it must be some other problem

JS?
Title: Re: Custom fields not work after update to 3.0.18
Post by: FabioZumbi12 on October 12, 2016, 01:14:30 AM
I dont know.

I have the joomla plugin jQuery Easy to fix imcompatibilities but the problem its only when i enable custom fields.

Any other ideia what can be?
Title: Re: Custom fields not work after update to 3.0.18
Post by: websmith on October 12, 2016, 21:51:19 PM
Fabio this worked for me.

look in your components/com_virtuemart/views/productdetails/tmpl/default.php  Around line 36 change the

<div class="product-container productdetails-view productdetails" >

to the following

<div class="productdetails-view productdetails product-container" >

This seemed to work for me on a quick test.

Thanks GJC Web Design for the heads up on editing this file.
Title: Re: Custom fields not work after update to 3.0.18
Post by: Milbo on October 13, 2016, 09:43:39 AM
I have no clue, why this code

while(!Virtuemart.container.hasClass(cl) && runs<=maxruns){
Virtuemart.container = Virtuemart.container.parent();
runs++;
}

works different, when you change the order of the classes
Title: Re: Custom fields not work after update to 3.0.18
Post by: cvrak on October 19, 2016, 09:41:33 AM
Hi,

I'm facing the same problem since I've upgraded to 3.0.18
Custom fields created with last version and with the new one as well, are not working in administration. When I choose a custom field, nothing happens.
I've tried to change components/com_virtuemart/views/productdetails/tmpl/default.php

<div class="product-container productdetails-view productdetails" >

to the following

<div class="productdetails-view productdetails product-container" >

but the problem remains. Any suggestions??
Thanks
Title: Re: Custom fields not work after update to 3.0.18
Post by: jenkinhill on October 19, 2016, 10:58:35 AM
Are you using template overrides?
Title: Re: Custom fields not work after update to 3.0.18
Post by: GJC Web Design on October 19, 2016, 11:21:07 AM
and if so is the correct js loaded at the bottom of the product details template?
Title: Re: Custom fields not work after update to 3.0.18
Post by: bortolani on October 19, 2016, 11:25:33 AM
Which is at the moment the correct js?

Inviato dal mio E5303 utilizzando Tapatalk

Title: Re: Custom fields not work after update to 3.0.18
Post by: GJC Web Design on October 19, 2016, 11:27:25 AM
look at the standard latest file!
Title: Re: Custom fields not work after update to 3.0.18
Post by: cvrak on October 19, 2016, 11:35:53 AM
Quote from: GJC Web Design on October 19, 2016, 11:21:07 AM
and if so is the correct js loaded at the bottom of the product details template?

As you can see at the attachment, I use Hudrogen template for the e-shop (site), and no overrides for the products.

How I can check for the correct Js??
Title: Re: Custom fields not work after update to 3.0.18
Post by: GJC Web Design on October 19, 2016, 12:59:26 PM
these settings have no effect if there is over riding in templates/xxxx/html/com_virtuemart/

compare the code with the standard
Title: Re: Custom fields not work after update to 3.0.18
Post by: cvrak on October 19, 2016, 13:23:51 PM
Quote from: GJC Web Design on October 19, 2016, 12:59:26 PM
these settings have no effect if there is over riding in templates/xxxx/html/com_virtuemart/

compare the code with the standard

I can't find the com_virtuemart folder, see my attachment.
Located somewhere else? Some other error?
Thanks
Title: Re: Custom fields not work after update to 3.0.18
Post by: GJC Web Design on October 19, 2016, 13:44:59 PM
looks like no over rides.. to confirm just add something to the  components\com_virtuemart\views\productdetails\tmpl\default.php and see if it appears

e.g. <!--I am the default-->

if that confirmed then you have another prob.. JS error etc?
Title: Re: Custom fields not work after update to 3.0.18
Post by: cvrak on October 19, 2016, 14:38:13 PM
Quote from: GJC Web Design on October 19, 2016, 13:44:59 PM
looks like no over rides.. to confirm just add something to the  components\com_virtuemart\views\productdetails\tmpl\default.php and see if it appears

e.g. <!--I am the default-->

if that confirmed then you have another prob.. JS error etc?

I've added
<?php
    echo "Hello";
?>
and is displayed at the product page .

What else can do?
Thanks
Title: Re: Custom fields not work after update to 3.0.18
Post by: GJC Web Design on October 19, 2016, 15:12:34 PM
ok -- now

Quoteif that confirmed then you have another prob.. JS error etc?
Title: Re: Custom fields not work after update to 3.0.18
Post by: cvrak on October 19, 2016, 15:17:59 PM
Quote from: GJC Web Design on October 19, 2016, 15:12:34 PM
ok -- now

Quoteif that confirmed then you have another prob.. JS error etc?

Any suggestions about the JS error?
Title: Re: Custom fields not work after update to 3.0.18
Post by: GJC Web Design on October 19, 2016, 17:42:38 PM
JS is on YOUR browser.. how could I?

use the search please!!!

e.g.
http://forum.virtuemart.net/index.php?topic=119638.0

Title: Re: Custom fields not work after update to 3.0.18
Post by: cvrak on October 19, 2016, 19:08:25 PM
I used Firefox's Firebug and inspected the specific element (screen_03.jpg).
At the console I got some errors, one of then was "Use of getAttributeNode() is deprecated. Use getAttribute() instead" . I edited mootools-core.js, and changed the text, and the error is gone.

Now I get "Empty string passed to getElementById()" at .../media/jui/js/jquery-min.js:2:24932  (screen_04.jpg).

The strange thing is that at the site, custom fields are working properly, the problem is only at administrator UI.

Any suggestions, pls??
Title: Re: Custom fields not work after update to 3.0.18
Post by: Brockney on October 20, 2016, 16:47:49 PM
I actually got the custom fields working by changing the 'Please Select' option to one of the options that are selectable.

So it gave me the option to choose either

Tropical Storm Burst - 30ml - 3mg
Tropical Storm Burst - 30ml - 6mg

However, whichever option was chosen, only Tropical Storm Burst - 30ml showed in the customer cart and no strength 3mg or 6mg

Here are the screenshots in order to show what I did. Is it possible to go back to a slightly previous version of Virtuemart until we figure this out?
Title: Re: Custom fields not work after update to 3.0.18
Post by: cvrak on October 24, 2016, 11:39:23 AM
Hi,

Trying to find out how I can solve my problem, I've done the following:

1. I've installed VM 3.0.18 to another site (joomla version, template, etc are the same).
Using the Firebug's console I got the same 2 errors:
    Use of getAttributeNode() is deprecated. Use getAttribute() instead.    The file is media/system/js/mootools-core.js
    Empty string passed to getElementById().   The file is components/com_virtuemart/assets/js/jquery-min.js

The strange thing is that the custom fields dropdown menu (administration UI) is working ok.


2. At the problematic site, I've corrected the Use of getAttributeNode() is deprecated. Use getAttribute() instead error, but the problem remains.
    I've replaced the mootools-core.js & jquery-min.js from the working site, the problem remains.

3. Anotther strange thing is that if a product has already a custom field set and try to add another, the dropdown menu is working ok!! The problem appears only when I try to add a custom fields set for the first time.


I'm completely confused with this. Can anyone help??

Thanks
Chris
Title: Re: Custom fields not work after update to 3.0.18
Post by: cvrak on October 24, 2016, 16:12:47 PM
Continue from my previous post:

I've replaced all folders & files from the 3.0.18 VM clean install package. The problem remains!!
Finally I've returned to 3.0.14 version and now its working!!

Can anyone explain this?

I believe VM team will deal with this issue for future updates.
Any suggestions/comments are more than welcome.


Title: Re: Custom fields not work after update to 3.0.18
Post by: Studio 42 on October 24, 2016, 23:52:12 PM
Hi cvrak,
i think that using vm 3.0.16.2 is safe. I have new problem too with VM 3.0.18, but not using vm 3.0.6.2(payment,shipments,customfields ...).
And with last Joomla too, because some internal changes in jommla 3.6.3+
Title: Re: Custom fields not work after update to 3.0.18
Post by: Brockney on October 26, 2016, 15:15:27 PM
Message to GJC your description on page one seemed to solve the problem and many thanks  :D

For anybody who has missed it, here it is

look in your

\templates\xxxxxxxxx\html\com_virtuemart\productdetails\default.php if over ridden .. if not in the VM views

find the html container holding the whole code

normally something like

<div id="productdetails-view" class="productdetails-view productdetails">

change it to

<div id="productdetails-view" class="productdetails-view productdetails product-container">
Title: Re: Custom fields not work after update to 3.0.18
Post by: Milbo on November 05, 2016, 09:34:31 AM
com_virtuemart.3.0.18.1_extract_first.zip has now a new option in the vm config, which can be enabled to use old layout overrides. I found the fallbacks, but they are only enabled, when the config option is activated.
http://dev.virtuemart.net/attachments/download/1029/com_virtuemart.3.0.18.3_extract_first.zip

Brockney, what you describe is the general Hint in https://virtuemart.net/news/latest-news/477-release-of-3-0-18-connecting-the-loose-ends

Quote
Important for shops with overrides

The new js for using ajax for reloading product content uses now always the same class. The class is "product-container". Just search for the div with "productdetails-view productdetails" and add "product-container". In case you want the ajax reload within a product modul, you need to adjust the overrides here also. Furthermore the layout login of the user view is now in the sublayout folder. Members who used the ajax for child variants within the browse view should change the layout back to default.

For a full list of all changes or more information how to adjust your overrides, please read here in our forum http://forum.virtuemart.net/index.php?topic=135402.0