We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Add to Cart

Add to Cart

Krish9870
New Member
10 0 0

I am selling fabrics per roll. Each roll is 25kg each. The price in which we deal is per kg. I want to show the price in kg but when someone add it to cart they should only be able to add it in multiple of 25.

Replies 2 (2)

Huptech-Web
Shopify Partner
1169 234 265

Hi @Krish9870, Could you please provide more details about this, as well as the store URL? This will help me better understand the requirements and assist you more effectively.

 

Thank you!

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

oscprofessional
Shopify Partner
16407 2444 3196

Hello @Krish9870 

 

To achieve your goal of displaying the price per kg while allowing customers to add only multiples of 25 kg to the cart in your Shopify store, you can follow these steps:

 

You'll need to edit you the main-product.liquid file

 

Modify the Quantity Input Field: Replace the quantity input with a custom field that only allows multiples of 25.

 

Here’s a basic example of how you might adjust the code:

 

<div class="product-form">
<label for="quantity">Quantity (25kg rolls):</label>
<input type="number" id="quantity" name="quantity" min="25" step="25" value="25" required>
</div>

Hire us | Pass Core Web Vital | B2B Wholesale Experts | Claim Your Free Website Review |
Connect with Us: WhatsApp | Skype: oscprofessionals-87 | Email: pallavi@oscprofessionals.com |
Custom Shopify SolutionsPrivate Apps, Theme Customization & SEO | Digital Marketing |
OSCP Apps: Discount Suite | Wholesale App | Bundle & Upsell | Shipping Discount | and more...