Jump to content

Quantity Input - Step problem


biotek17
 Share

Recommended Posts

Hello, i write you because i have a problem with the javascript that controlls the step parameters of input type number.

Now i try to make some changes in theme.js, because i want that all input type number increase the steps per minum quantity product so if the minimun quantity of an product is for example 6 the input quantity increaes his steps x6 (6,12,18..) .

 

in theme.js i found something like that.

 

var r = {
  min: 0,
  max: 100,
  initval: '',
  replacementval: '',
  step:1, /*THIS PARAMETER INCREASE THE STEP BY 1 */ 
  decimals: 0,
  stepinterval: 100,
  forcestepdivisibility: 'round',
  stepintervaldelay: 500,
  verticalbuttons: !1,
  verticalupclass: 'glyphicon glyphicon-chevron-up',
  verticaldownclass: 'glyphicon glyphicon-chevron-down',
  prefix: '',
  postfix: '',
  prefix_extraclass: '',
  postfix_extraclass: '',
  booster: !0,
  boostat: 10,
  maxboostedstep: !1,
  mousewheel: !0,
  buttondown_class: 'btn btn-default',
  buttonup_class: 'btn btn-default',
  buttondown_txt: '-',
  buttonup_txt: '+'
},

So in the step parameter i try to put a call to the value of the element id quantity_wanted that is a minimum_quantity_wantend and it works when i stay in product page, the input increase his steps per minimum quantity wanted , but when i  join in checkout page of my cart the input number crashes becaouse don't found the value of elementid quantity wantend obviusly.

So i need to know if there is a variable in theme.js that store this value.

and i need to know where i can find the rules that increase the price of cart page when i increase the quantity of products, becouse i see that if i make work the input of the cart page it will refresh and increase the quantity per 1.

Thanks a lot!

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More