Change price based on quantity selection

Shopify Partner
6 0 0

Hello,

 

Any advice on how to have the product price on a product page change based on the quantity selected?  No variants in use, just a base price.  

 

Basically similar functionality to the cart page, when you change the quantity a new total price displays for that line item.

 

I just want it to display on the product page before that select "ADD TO CART".

 

Thank you in advance.

https://bradleyssurplus.com
0 Likes
Astronaut
1069 145 260

You can use jQuery. This is working, but on my end I need to hit add to cart twice for it to submit. I don't know if that's just a problem because I'm adding the code after loading or if it's an issue with the code. Can I request access to your store and duplicate your theme to take a look and see if it's working? Btw this is with a default price set at 12.99, obviously would be changed before hand:


<script>
$('.adjust').on('click', function(){ let quantity = $('#Quantity-product-template').val(); let initialPrice = 12.99; let newPrice = initialPrice * quantity; $('.money').html('$'+ newPrice); })
</script>
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Shopify Partner
6 0 0

Thank you for the response.  I'm not sure what theme I'll be using yet. Just seeing if it's possible to change the price based on quantity. Based on your response, it's possible.  

https://bradleyssurplus.com
0 Likes
Astronaut
1069 145 260

Yup, it surely is. When you're ready to mess with it you can give me a shout in the private messages here if you enable messaging in your profile.

If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes