How do i set Quantity Selector to desired minimum

FusionClimb_01
Visitor
2 0 0

hey hows it going, i was wondering if maybe y'all could help me with this problem

im trying to set my minimum on my quantity selector to 250, but i cant seem to get the code right 

this is what i have 

 

<quantity-counter class="quantity-selector">
        <label for="product-quantity-buttons-{{ unique }}" class="label-hidden">{{ 'products.product.quantity' | t }}</label>

        <button
          class="quantity__minus"
          type="button"
          name="decrease"
          title="{{ 'cart.general.decrease_quantity_label' | t }} - {{ product.title | strip_html }}">
          {%- render 'icon-minus' -%}
        </button>

        <input
          id="product-quantity-buttons-{{ unique }}"
          class="quantity__input"
          type="number"
          name="quantity"
          value="1"
          min="1"
          aria-label="quantity"
          autocomplete="off"
          title="{{ 'cart.general.quantity_field_label' | t }} - {{ product.title | strip_html }}"
          pattern="[0-9]*"
          data-popout-input>
        
        <button
          class="quantity__plus"
          type="button"
          name="increase"
          title="{{ 'cart.general.increase_quantity_label' | t }} - {{ product.title | strip_html }}">
          {%- render 'icon-plus' -%}
        </button>
      </quantity-counter>
    </popout-select>
  {%- else -%}
    <input type="hidden" name="quantity" value="1">
  {%- endif -%}
{%- endcapture -%}

hopefully yall could help.

 

thanks so much in advance 

 

best 

Jayce

Replies 3 (3)

shamsulhuda
Shopify Partner
17 4 2

@FusionClimb_01

Set the input value to 250 and min 250.

Now, disable the cursor pointer for input field, using css.

input.quantity__input{

pointer-events: none;

}

Shopify Developer
Need any help for your store?
Drop me an email: shamsulhuda310@gmail.com

Web: portfolio-msh.netlify.app
FusionClimb_01
Visitor
2 0 0

i did change the the value and min. both to 250 

however the css part i think didn't work and so 

i doesnt seem its working 

shamsulhuda
Shopify Partner
17 4 2

@FusionClimb_01 

Try this one-

.quantity-selector input.quantity__input{
  pointer-events: none !important;
}

Make sure you properly put this code in the CSS file that used in product page.

Like Dawn theme have a common CSS file, called- `base.css`

-----------------------------

If the issue still persists, please share your store url and I'll try to solve the issue.

Shopify Developer
Need any help for your store?
Drop me an email: shamsulhuda310@gmail.com

Web: portfolio-msh.netlify.app