Topic: Whether selecting a custom option via Shopify line item properties (properties[name]) can increase a product’s price (e.g., +$20) without using variants.
Key points:
Line item properties: custom fields added to a product line item; they store information but don’t natively affect price in Shopify.
One response says increasing price based on a property isn’t possible or secure, since customers can edit frontend inputs. Checkout discount functions can apply discounts by property but cannot increase item prices.
Suggested workarounds:
Create a separate add-on product priced at the surcharge (e.g., $20) and add it to the cart alongside the main product when the option is selected.
Use product variants for priced options, despite management overhead.
Latest update:
The OP cites example stores where selecting options (apparently using properties[xx]) increases the displayed price. Implementation details aren’t provided in the thread.
Status:
No confirmed native solution in the discussion; alternatives suggested. Whether the examples rely on an app or custom backend logic remains unanswered, so the issue is unresolved.
When using custom option “properties[name]", I write a code like this and put it on the product page and it works fine:
But I also need, when the customer chooses this option, the price of the product will be changes, for example, an increase of 20 dollars, can this be done ?
I know it is possible to add this variation directly on the product edit page and set a different price. But this is not what I want, because it is not flexible enough, once there is a change, we need to modify it product by product.
I don’t think this is possible, as it would be very insecure - any customer could edit this input on the frontend and get things for no extra cost. (You could technically add a property and discount by that property in a checkout discount function, but I don’t believe you can increase the value of an item there)
If you are upselling the same things often, you could have a separate product for that add-on, with the add-on product being 20 dollars, and add both of them to the cart if selected?
Other than that, I think variants is the way to go, although I know what you mean about it being annoying to change all the products.