News:

Looking for documentation? Take a look on our wiki

Main Menu

What is the function of the following code and can I delete this?

Started by kratzi, April 14, 2016, 23:27:31 PM

Previous topic - Next topic

kratzi

Hi I have the latest J 3.5.1 and VM 3.0.14

When I check my site through w3 Validator I get the following errors:

Attribute step not allowed on element input at this point.
<input type="text" class="quantity-input js-recalculate" name="quantity[]" data-errStr="You can only...."value="1" init="1" step="1"  />

Attribute init not allowed on element input at this point.
<input type="text" class="quantity-input js-recalculate" name="quantity[]" data-errStr="You can only...."value="1" init="1" step="1"  />

All of it is coded in sublayouts/addtocartbar.php

Since I am showing 60 products per page I get over 120 errors only due to the 2  lines of code.

My question is now if I could easily delete the "init" and "step" value to get rid of the errors or if I could have strange behaviour at some browsers etc?

Thank you

kratzi


Studio 42


Ghost

It's in /components/com_virtuemart/sublayouts/addtocartbar.php. Create an override and customize it to your liking.

Studio 42

Quote from: Ghost on April 15, 2016, 14:06:30 PM
It's in /components/com_virtuemart/sublayouts/addtocartbar.php. Create an override and customize it to your liking.
It's better to not remove it, else you can have some javascript errors.
This is the step quantity checker value for VM.
It's not valid, but should not give any problem in modern browsers