TwoMoonsAI Posted January 13 Share Posted January 13 Hi there! I'm using a summary block to build my customer facing product store so that I can limit my displayed stock to exactly 30 products. Within the summary block, I am able to display product name, price, and image very easily, however I'm struggling to display dimension as it isn't a default piece of metadata that is integrated with the summary block. Each product has been given dimensions via .csv import under the "Width" and "Height" field, but I have no idea how to access and display that info. Clearly those fields are intended for use for shipping, but I see no reason why I shouldn't be able to access them through some sort of code. I just don't have much of an idea how to get at the data and display it in the summary block. Any ideas? The website page is here: www.twomoons.io/shop Thanks! Link to comment
paul2009 Posted January 13 Share Posted January 13 3 minutes ago, TwoMoonsAI said: Each product has been given dimensions via .csv import under the "Width" and "Height" field, but I have no idea how to access and display that info. Clearly those fields are intended for use for shipping, but I see no reason why I shouldn't be able to access them through some sort of code. You won't be able to pull the size information into the Summary Block because this data isn't available (Squarespace don't expose the shipping information in the markup). However, you could add the available sizes as tags instead. If you enable tags as the Primary or Secondary Metadata (see below) the sizes will then appear in the Summary Block beside the title and price Did this help? Please give feedback by clicking an icon below ⬇️ About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. Content: Links in my posts may refer to SF Digital products or may be affiliate links. Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.Improve your online store with our extensions. Link to comment
TwoMoonsAI Posted January 14 Author Share Posted January 14 Hi Paul, Thanks for the prompt reply - much appreciated! Tags weren't a great solution as we tend to have a wide variety of potential dimension options, and moving between these seemed like more hassle that it was worth. In case anyone in future comes here wondering what I did, I just made the compromise of limiting the product description to dimensions and displaying the excerpt on the summary page. The only issue was text formatting, but solved that through a direct CSS script to reduce text size to fit in line with my page. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment