Jump to content

[solved] More than 3 chars in input Qty


AndreasAnemyr

Recommended Posts

Hi!

 

I want to use more than 3 chars in the qty form,

from the side .... product.php. Where can i change this value.

I use 1.4.0.17

 

Is this controlled in js or somewhere else. Can't find....

 

Best Regards!

 

Andréas

 

Hi!

 

I want to use more than 3 chars in the qty form,

from the side .... product.php. Where can i change this value.

I use 1.4.0.17

 

Is this controlled in js or somewhere else. Can't find....

 

Best Regards!

 

Andréas

Link to comment
Share on other sites

Hi!

 

I want to use more than 3 chars in the qty form,

from the side .... product.php. Where can i change this value.

I use 1.4.0.17

 

Is this controlled in js or somewhere else. Can't find....

 

Best Regards!

 

Andréas

 

you must edit your template file (tpl) located in your theme: themes/YOUR_THEME/product.tpl

 

you've got there something like

 

<input type="text" name="qty" id="quantity_wanted" class="text" value="1" size="2" maxlength="3">

 

and maxlength="3" param defines number of chars

 

you should increase value of this param for example: maxlength="5"

  • Like 1
Link to comment
Share on other sites

Thx Vekia for your answer!

 

I also wonder how/where this input value is controlled/validated (and autocahnged...)

I mod my prestashop to use decimals in all the Qty-felts....

 

This should be accepted for the input:

10.25

11.23

9,75

 

for example...

 

Best regards!

 

/Andréas

Link to comment
Share on other sites

Happy me!!!

 

To use decimals i had to change all the int cast's to float's instead. But in the cart.php in the classes folder i forgot one...

 

if ((float)$quantity < $minimalQuantity)

return -1;

 

 

I think my solution now works fine for 1.4.0.17.

 

thx to Vekia for the ...tpl help!!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...