VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: kratzi on April 14, 2016, 23:27:31 PM

Title: What is the function of the following code and can I delete this?
Post by: kratzi on April 14, 2016, 23:27:31 PM
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

Title: Re: What is the function of the following code and can I delete this?
Post by: Studio 42 on April 15, 2016, 12:50:20 PM
init="1" step="1" is not allowed
Title: Re: What is the function of the following code and can I delete this?
Post by: 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.
Title: Re: What is the function of the following code and can I delete this?
Post by: Studio 42 on April 15, 2016, 15:29:40 PM
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