Quantity limiter

SunShopp
Excursionist
36 2 5

We Just switched to the Impulse theme and cannot figure out how to limit the maximum quantity a customer can select for a given product to what we currently have in stock.

Any help is appreciated.

Thank you

 

Store URL:

https://thesunshopp.com/

Replies 15 (15)
LitExtension
Shopify Partner
1952 321 394

Hi @SunShopp ,

Please change 'Second Part:'

return n.prototype=Object.assign({},n.prototype,{init:function(){this.plus.addEventListener("click",function(){var e = this._getQty();if (e >= this.maxValue) {e = this.maxValue;}this._change(e);}.bind(this)),this.minus.addEventListener("click",function(){var e=this._getQty();this._change(e-1)}.bind(this)),this.input.addEventListener("change",function(e){var e = this._getQty() + 1;if (e >= this.maxValue) {e = this.maxValue;}this._change(e);}.bind(this))

 

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!
SunShopp
Excursionist
36 2 5

With that change the quantity selector wont go above 1.

LitExtension
Shopify Partner
1952 321 394

Hi @SunShopp ,

Please create staff account with email: namphan992@gmail.com

I will check it for you.

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!
LitExtension
Shopify Partner
1952 321 394

Hi @SunShopp ,

I checked and this JS function is called in many places, so if possible please create staff account, I will help you debug and rewrite it.

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!
SunShopp
Excursionist
36 2 5

Sorry for the delay. We will actually be bringing things in house.

Thank you for your time.

LitExtension
Shopify Partner
1952 321 394

Hi @SunShopp,

I saw you liked my answer. If it helped you solve your issue, please mark it as a solution. Thank you and good luck.

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!