Personalized checkout and custom promotions with Shopify Scripts
Hi,
Theme used: Dawn
I'm looking for a method to have a product's price updated based on the quantity, and a few other values (radio buttons, checkboxes) while on the product page, and have the cart updated with new price when its submitted.
I was thinking of using an if statement function with addEventListener to the specific inputs (radio)
I have all the liquid "assign" variables setup for the price to change to in the assets>price.lquid for the if statement function.
Thanks in advance.
The scripts forum isn't for javascript it's for checkout-scripts on the Shopify Plus plan , but moderators aren't keeping it clear like they should.
Use the design forums or technical forums for such javascript things to increase chances of getting relevant solutions.
Javascript, nor liquid , can modify the actual real price of a product. So you can change the presentment price all day long but when the customer goes to checkout the actual price as will be shown as entered in the admin for that product.
@MLaurex wrote:.. looking for a method to have a product's price updated based on the quantity..
Natively changing price based on quantity is tier pricing, aka volume pricing aka quantity breaks, that's only available for shopify Plus plans with price lists or checkout-scripts.
All others need to implement advanced theme customization whereby you either add multiple products to the cart or swap different products of the correct price in and out of the cart and or use discounts ; and or use apps.
If your DIY'ing it there are topics on it, and in some I've describe the general approach.
@MLaurex wrote:...and a few other values (radio buttons, checkboxes) while on the product page
That's moving into the realm product personalization.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
@PaulNewton wrote:Javascript, nor liquid , can modify the actual real price of a product. So you can change the
Clarification, javascript on the front end clientside cannot modify product prices through the ajax api. Backaned javascript, such as in node.js, using the admin apis is completely different.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024