Author Topic: Child products and double quotes  (Read 202 times)


  • Jr. Member
  • **
  • Posts: 261
Child products and double quotes
« on: January 24, 2019, 17:05:15 pm »
There is a product which has children. The child products have doble quotes in their name.
Like the product is:
- cable
and the children are
- 10" red
- 10" green
- 20" red
- 20" green

We use multivariants to bind these, and the values are 10" and 20"
When I open the productdetails page and try to select the child product, VM doesn't load it at all.

I checked the code and found a code part in sublasouts/customfield.php:
$('select[data-cvsel="field324"]').on('change', { variants:[["
and there is a JS array with the variants but the variants should be escaped because if there is a double quote in the variant name, it breaks the array definition.

I modified the code a bit and added addslashes and it seems valid.

It's Joomla 3.9.2 and VM