Jump to content

Using Calculator to Populate Qty on Product Page

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

This is very likely not possible, the quantity field won't be able to read the result of the calculator after loading.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
🔌
 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 Did I help? Buy me a coffee?

Link to comment

It may be possible.

 
This is not a solution and I don't know for sure if I can get all the way there. The code is not bi-directional. In other words changing the quantity does not update the slider. I need more info on how you intend to use this potential code.

Is there only going to be one product with the slider?

Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support!

Link to comment
  • 3 weeks later...
On 10/17/2022 at 7:54 PM, creedon said:

Is there only going to be one product with the slider?

Thank you for the responses - Sorry I missed them until now!  

To answer @creedon, I would like to have the slider on two different products. 

I actually have a solution working right now with JSON but only on Desktops and Tablets - it does not work on mobile.  Calconic offered these two options as solutions:

Basically, the desktop/tablet website breakpoint and the mobile website breakpoint use separate quantity input fields by the same name. Value output apparently prioritizes the desktop/tablet website breakpoint quantity field.

You would need to either
a) use multi-output JSON and output the same value to both quantity fields, but both fields should have different names.

b) use the same quantity field for both website breakpoints.

Is there a way to 'override' the Quantity input name reference with unique names that can be referenced by the JSON?

Thanks for all the input 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.