EZKEEL Posted April 5, 2023 Posted April 5, 2023 I have several products that I make out of gold and silver. Each product has a base price, then you add the spot price of each metal using a calculation (i.e. pull through metals-api 1oz spot price and divide by 31.1 for gram price and multiply by the product weight and add to the base price to create the final price. Is that possible to do?
paul2009 Posted April 5, 2023 Posted April 5, 2023 On Squarespace, product prices must be fixed. They cannot be adjusted with code. Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
ashu3131 Posted April 7, 2023 Posted April 7, 2023 (edited) On 4/5/2023 at 10:41 AM, EZKEEL said: I have several products that I make out of gold and silver. Each product has a base price, then you add the spot price of each metal using a calculation (i.e. pull through metals-api 1oz spot price and divide by 31.1 for gram price and multiply by the product weight and add to the base price to create the final price. Is that possible to do? Yes, it is definitely possible to use an API such as metals-api to retrieve the current spot price of gold and silver, and then use that information to calculate the final price of your products. Here is a general outline of the steps you could take: Determine the base price of each product. Use the metals-api to retrieve the current spot price of gold and silver. Convert the spot price from ounces to grams (if needed). Multiply the spot price per gram by the weight of the product to determine the metal cost. Add the metal cost to the base price to determine the final price of the product. You could automate this process using a programming language like Python, which can make API requests and perform calculations. Alternatively, you could use a spreadsheet program like Excel or Google Sheets to create a pricing template that automatically pulls in the spot price information and calculates the final price for each product. Edited April 26, 2023 by ashu3131
EZKEEL Posted April 7, 2023 Author Posted April 7, 2023 (edited) Thank you for the quick reply. Is there any way to adjust a static price through automation? Like could I run a script on my end that would log into my squarespace account and adjust the price to something else? My product is made of gold, price of gold changes everyday so I don't want to lose money when the price goes up. Trying to find an easier way than logging in everyday to change it. Edited April 7, 2023 by EZKEEL
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment