Shopify-Limit products is setted so when clients click cart button with over quantity, they get error - shopify

I'm shopify developer.
I want to set quantity limit so that if client try to add over limit quantity and click "cart" button, they get error message.
How can I implement this?
Thanks for seeing my question.

When you render a product, you have access to its current quantity. You are free to use this value. Take the example of a widget with 3 variants, A, B and C. A has 3, B has 6, and C has 9.
When you render your input element to capture quantity, you are aware of the variant in question, and the max quantity allowed (at the time the page rendered anyway). So you are free to limit the quantity to be less than the maximum available using simple HTML controls. With Javascript you can script this kind of stuff.
In the end though, by the time the customer reaches checkout, if say they asked for 3 of B, even though at that time B had 6, so 3 was good and allowed, at checkout, Shopify may reject their order as B may only have 2 at that time. Meaning they waited too long to purchase.
If Shopify did not work this way, people would hold inventory hostage while not buying. So in effect, even if you limit quantities, your customers may still be unable to purchase all they want.
Long story short, you can add quantity limits to the HTML element used to change the quantity going into the cart. Use the variant's current quantity from Shopify as the high limit.

Related

Accessing automatic discounts in the cart page

I want to render stuff in the cart when a certain automatic buy-x-get-y discount exists, is there a way to access the discounts added in the admin discounts section then check their titles? If not, is there another way I can do so within the cart? Because the only other way I can think of is adding the y item to the cart if the total price >= x then checking the discounts array for the item then remove it if the discount am looking for is not there, its a solution but it requires sending 1, sometimes 2 unnecessary post requests to the database which I want to avoid.

How to set custom price for products on the basis of quantity in shopify?

Greetings.
I am working on a eCommerce website based on shopify. And for product I want to set a custom price. For example, The standard price of product is $500 but price will vary if user increased the quantity i.e. On 5 - 10 it will cost $450, On 11 - 15 it will cost $400 and on 20+ quantity it will cost $300.
I have searched module for this and also found a module i.e. https://apps.shopify.com/quantity-breaks. But its working on the basis of "Percent" that I don't need. Because I want to place price manually on the basis of quantity.
So please help me out from this and provide your valuable thoughts on the same.
Thanks in advance.
The way this is generally done in Shopify is to create variants where the option values are the price breaks. You have to modify your theme so that when a Qty > price break is entered the product page selects the variant that corresponds to that price level.
Other than the coding portion of this the main issue becomes inventory management since Shopify treats each variant as a separate inventory item but if you use variants to manage price breaks they are not actually separate items.
I think the easiest way to do this would be with a Shopify App. There are many that have price breaks etc. and they are usually easier to set up than using variants as the price break amounts.

Is it possible to show the number of pre-orders on the product page?

My primary business is pre-orders, and this is how it works:
I list an item for sale.
My customers order the item. Their credit card is authorized but not charged.
Once a minimum number of orders are placed, the customers are charged, and the buy is live.
If, after a specified amount of time, the minimum is not reached, all orders are cancelled.
What i would like to do is this:
Specify the minimum number of orders needed for a particular item in the backend. (not 100% needed, but it would be nice).
Display the total number of pre-orders on the product page, so that my customers know how many are left before the buy is live (it would be great to show it in the following format: 23/50 Ordered).
Does anyone know if this is possible? If so, can you please explain to me what I need to do in order to make this happen?
Thanks!
P.S. - In case it doesn't show up, I'm using Bigcommerce
Store the minimum needed as a custom field & set the initial inventory to that same number. You'll also need to allow inventory to be displayed for pre-orders, though you can hide it from display if you'd like (we only want it present in the DOM).
As the products are pre-ordered, inventory will decrement. Use javascript to subtract the number left in inventory from the original number (the custom field) and display in the ProductDetails.html panel.

Variant options on Shopify

I've been trying to create variant options which also have prices on a Shopify theme, and represent them by checkboxes. So end user can select multiple options with additional prices. But shopify has limitations on this as far as I noticed.
Let's say the product is 'personal computer' with fixed price £500, and it has options like 'graphic card - £30', 'processor - £40', 'sound card - £15', 'sound card - £30'. As you've noticed there can be multiple options with different prices in addition to the main product price. And as I would like to use checkboxes, users can select min 1 max all of them.
I don't want to use the Shopify app for this but it seems there is no other choice, unfortunately.
I think you would prefer to organize it like this.
make a personal computer product. it costs 500
make a graphics card product. it costs 30
make a processor product. it costs 40
make a sound card product. it costs 15, 30 or whatever.
Now present all four products on a page so the customer can check off one or more of those products. The ones they check off go into the cart.
You get inventory control that way. You can also price each product up to 100 different ways.
You do not need an App to go this route. It works.

How do I change the purchase quantity on my bigcartel shop to be a text box

I sell fabric by the 10cm increment. How do I change the purchase quantity on my bigcartel shop to be a text box to allow customer to type in the quantity they'd like to buy (for example 1.2 metres) instead of using bigcartel's dropdown purchase quantities?
At the moment, I end up having a long list of drop down options ie. 10cm, 20cm, 30cm, 40cm, 50cm, 60cm, 70cm, 80cm, 90cm, 1m. And then I have to rely on the customer adding the quantities they want together to get the total they need (ie. 20cm and 1m to get 1.2 metres). People sometimes make a mistake with their math and order the wrong amount. I would prefer to be able to just have a text box in the purchase quantity area where my customer could simply type in "1.2" and the quantity and price would be calculated for the cart.
Is this possible on bigcartel? I know it is possible on a lot of other e-commerce sites. Any help would be greatly appreciated!
Unfortunately there's not a way to add an input box to your product or cart pages to allow for customer input like that, sorry! Your customers can only select their option from a list that you create in the admin.