Jump to content

Code access to product data

Recommended Posts

Hello there!


I've been integrating an embedded feature in a product page, using a Code Block in the Additional Info section.
For this to work as intended, i need to be able to access the current product data (name, price, quantity).

Is there a way to do this, via a global product variable or similar, without having to scrape the page?



António Dias

Link to comment
  • Replies 2
  • Views 370
  • Created
  • Last Reply

So, i've got what i needed by scraping the page, and getting the product info directly from the elements innerText. But the ideal solution was if there was some sort of injected variable i could access to that had that information. Something like 



Link to comment


This topic is now archived and is closed to further replies.

  • 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.