Product object scope not available in product detail page section

Product object scope not available in product detail page section

Greg_R_
Shopify Partner
11 0 3

I am using a new 2.0 theme and on the product detail page I have added a new section that is available in the theme and I am unable to access the product by liquid except for a few of the product attributes like title and vendor and some of the meta fields.

 

according to Shopify the object can be accessed in a section in a product template, but when I try to access them with liquid I get a "product.fieldname is invalid"

 

can anyone give me some insight as to why I can use {{product.title}} but not {{product.description}} in a section on the product detail template? 

 

I have no issues editing the section 

Screenshot 2023-03-01 161856.jpg

 

 

Replies 4 (4)

Greg_R_
Shopify Partner
11 0 3

Documentation showing these values should be in scopeScreenshot 2023-03-01 155746.jpg

gr_trading
Shopify Partner
2032 148 205

Hi @Greg_R_ ,

 

All product objects are not accessible using section.

 

Screenshot which you are referring not about sections.

 

It's for liquid file. Instead of section try using custom liquid and all attributes will be accessible their.

For any custom development WhatsApp or connect at Email ID: support@grtrading.in for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
Greg_R_
Shopify Partner
11 0 3

But it is a section referenced in a product template.... as stated right in the documentation as quoted "You can access the product object directly in a product template, or a section referenced in a product template" and that is what I am trying to do, access the object in a section referenced in a product template, and I can access some of the product object, just not all of it.

 

I want to use some sections for displaying the data of the product and don't want to have to hand code all the tables and styles for the data when according to the docs it should work

Greg_R_
Shopify Partner
11 0 3

It says so right in the documentation.....  "you can access the product object directly in a product template, or a section referenced in a product template"