Edit Shopify Metafields/Product Options - shopify

I'm using Shopify to run a sort of Kickstarter campaign on a custom product, whereby if the goal is reached the item will be made. I need to update the number of the items sold during the campaign, I'm storing the number sold as either a product option or metafield however right now i'd have to update these values manually every time one is sold.
My question is whether or not I am able to edit the value of a product variant option or metafield preferably using liquid - so that on completion of the order I can update the number of sold items.

Related

Dynamic Variant Price while adding variant into the Shopify cart

I have Shopify Store, where customer can design/customise their product before buying it. and based on the design / customisation price of the selected variant may get varied. but I think Shopify does not facilitate to change variant price dynamically while adding into cart.
Is any solution there I might be missing ? Any help will be appreciated.
There are a few solutions none of which are great.
Quantity based
Make the product price $1 and based on the options increase the quantity in order to meet the required price. With a little code you can change the cart to look like it's a single product, but the checkout will not be OK.
Variant based
If the product will have only a few price changes you can create different variants and change the variants based on the selected options. For example 10 different variants for 10 different prices.
App based
You can use an App such as https://apps.shopify.com/product-options to create options that can modify the product price. ( this will add dummy products to the checkout as well )
For Plus, you can use shopify script to edit the line items directly.
If you're not Plus users, you have to do it on server-side, i.e. your backend
submit an ajax request on your custom product page
backend receives the request. Use admin API to create a new product variant on the fly
set the variant price, weight, quantity, or other properties based on your business rules
return response to client
client receives a successful response. use cart ajax to add the new variant to cart
let client continue checkout
Upon order is made, use webhook to update inventory or other information required. But there is a problem regarding variant limit. For each product, you can only add 100 variants.
So you need to create new products when the variant is used up for the product. Alternatively, you can delete the existing variants. But the variants in customer carts will be cleared.
I am doing something similar to what you're doing so I think our approach will be more or less the same. Basically, there are only 2 solutions, either create a new product or new discount dynamically. Both approaches create many dummy/garbage data

How do i add product option or a variant that increments the price - shopify?

I'm creating a custom feature on a Shopify theme and I need to add product options or variants that each increment a price by a certain amount.
For example, if I want to have wrapping on a product, that costs 10$ extra. I don't want to create a "wrapped" variant that costs product price + 10$, I want it to be dynamically calculated because I will be adding multiple such choices.
I then need to add the product to the cart via the Shopify AJAX API, so I will be needing to specify such added options in the request body somehow and have Shopify calculate the final price.
How would I go about doing this?
Prices in Shopify are attached to variants.
To say it simply you can't modify the price of a variant in any way. The price is set on creation of the variant and you can't modify the variant price from the front-end.
If you plan to modify the price based on the user input you need to create predefined variants for each option and change the selected variant based on the user input.
If you still want real dynamic price you will need to look for some kind of an App that will support this functionality.

How to hide out of stock products and its categories in Volusion

I have Volusion store I want to do the following, If it is possible??
If Qty = 0 (out of stock) do not display the product as well as it category.
When Qty changes display. (this will eliminate clutter)
If Product in Category = 0. Do not display the category
For example Home > New > Digital Signage has 0 products,
Then do not display the category - Until there are product in the category.
From Volusion's support article.
https://support.volusion.com/hc/en-us/articles/209957467-How-to-Use-the-Hide-When-Out-of-Stock-Option
How to Use the Hide When Out of Stock Option
When an order placed in your store causes the stock status of a product to drop to zero or below, your store will hide the product, provided the Hide When Out Of Stock setting (on the product's Advanced Info > Product Display tab) is set.
This will prevent the product from being viewed by customers on your store front until the product's stock value is incremented (either manually or through processing an RMA or purchase order). You can learn more about using the hide function by reviewing the Marking a Product as Hidden article.
Note that if any of your products have options for your customers to select from, you may wish to hide certain options when the associated product variant is out of stock, while leaving other options visible. The best way to automatically hide out-of-stock product options is by using Smart Match and the Inventory Control Grid.
Automatically Hiding When Out of Stock
Note that the Hide When Out Of Stock function only activates if the stock status of a product drops to zero or below due to a purchase. If you explicitly set the stock status to zero within a product's settings, it will not automatically trigger this setting. To manually hide a product from view on your store front, enable the Hide Product option within the Advanced Info > Product Display tab.
Furthermore, in order for products to automatically be hidden when out of stock, products need to be configured to not allow backorders. To do this, go to Settings > Config Variables and select the Checkout Variables. Make sure the Enable Back Orders check box is not selected. This will prevent Volusion from allowing any products at a stock less than 1 from being ordered and will allow the Hide When Out Of Stock variable to engage for all products.
If you have some products that you want to do this for and some you don't, you can set Enable Back Orders at a global level as described above but select the Do Not Allow Backorders check box for specific products under the Stock tab.
Note on Stock Value Updates
Briefly mentioned above, Volusion's Hide When Out Of Stock will inversely update products: Any product using this function will be automatically unhidden when the stock status for a product is updated to a positive quantity. Product stock can be updated manually from a product's settings page or automatically through the processing of an RMA or purchase order, or even through an import to your Volusion store's products table.
Also, please note that any product with Hide When Out Of Stock and Hide Product checked with a Stock Status set to Null (blank) or a positive value will be unhidden whenever any Stock Status is imported for any product in the store.
Please keep this function in mind when using this feature to prevent products you wish to remain hidden from being made available on your store front after product stock value updates.blockquote

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.