News:

Looking for documentation? Take a look on our wiki

Main Menu

Customfields bug after update

Started by BKintera, August 27, 2021, 22:41:26 PM

Previous topic - Next topic

BKintera

Hi,

After updating to Joomla 3.10.0 and VirtueMart 3.8.8 10472 I noticed a bug with customfields.

Here is a description of the bug:

Main product is a toy with options (customfields) to add greeting card and/or gift wrapping.
If user select some of this options toy's price increase and name of custom fields should appear in cart view bellow product name like this:

Toy 1
+ greeting card
+ gift wrapping

But if user doesn't select any of this options, customfield names shouldn't appear in cart view.
This was working in older version of VM.

Now, if user doesn't select any of additional options, toy's price doesn't increase but in cart view and on invoce user can see:
Toy 1
+ greeting card
+ gift wrapping

instead of just:
Toy 1


Any ideas how to fix this?

Thanks in advance.


VirtueMart 3.8.8 10472
Joomla 3.10.0

Milbo

Which customfield do you use to create the variants?

the String custom, or multivariant? or even generic childs?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

BKintera

Hi Milbo,

I used image type.


This is live version of website (without updates):

https://toyzzz.rs/igracke/mali-vozaci/vozila-na-akumulator/9096dip-na-akumulator-mb2312-toyzzz

When you click on green accordion button "Dodaj ukrasno pakovanje" you will see customfields.


Sorry I can't provide a link with updated version of Joomla and VM, but I hope this can help you better understand my problem.


Best regards,

BKintera

#3
Hello everyone,

I noticed when I select option "Bez..." which mean "Without..." everything works fine, customfields doesn't show in cart view.

So, my next question is: can I make "Without.." options checked as defualt?

Since i use those customfields as radio inputs I tried to do add checked attribute on "Without..." options with JS but that didn't selected those options.


Edit:

Actually, I managed to make it to work with JS... in productdetails defualt.php (override) I added JS at the bottom:

<script>
   let selected = document.querySelectorAll('.product-field-type-M input');
   selected[0].checked=true;
   selected[3].checked=true;
   selected[6].checked=true;
</script>