Change price based on quantity selection

Highlighted
Shopify Partner
8 0 2

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
Highlighted
Shopify Partner
1445 195 523

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 my solution helped you, please like and accept as solution!
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
Highlighted
Shopify Partner
8 0 2

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
Highlighted
Shopify Partner
1445 195 523

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 my solution helped you, please like and accept as solution!
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
Highlighted
New Member
1 0 0

@Ninthony - I saw your post on this. I'm trying to have the displayed price on the product change when someone clicks without needing to refresh the page. I have 3 different fixed quantity option buttons in addition to a 'subscribe & save' discount.

 

Have you figured out a working solution to this? Is this something you might be able to help with?

 

0 Likes
Highlighted
Shopify Partner
1445 195 523

I'm sure I can help you out. Send me a message on here with your store url and outline exactly what you need to do. I can request access and take a look and see how easy or not it would be.

If my solution helped you, please like and accept as solution!
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
Highlighted
Tourist
5 0 1

Hi there,

I am looking for a similar solution. Can you please expand on how we can achieve this:

The aim is to have the price of the item change dynamically when the user changes the quantity:
This means I would need a price tier app to achieve this - because Shopify does not have the facility.
However the ones I have tried do not update the prices when the user selects different amounts of the product - which is essential for the user experience.
Rather they just show the regular price of the item, along with the box of tiered prices / discounts, and the saving incurred with more products.
 
It is so important to keep things simple for the end user. All I want to achieve is that the price of the item change when the quantity of items entered is a new level / tier. e.g. if the regular price is $56, when the user adds 10 items into the cart this (new price) becomes $51 - it should show the price as being $51 (not the original $56).
 
Thanks for your kindness.
0 Likes