catalogElement object represents the product in catalog templates.
Use it with the
ses_render_field Twig function to render product Fields:
Additional fields within the dataMap¶
dataMap of the catalog element provides additional fields within some properties.
dataMap provides an array of objects which implement the
ses_render_field() function can automatically use either a property of the catalog element, or a property from the
If a property within the
dataMap has the same name as another property of the
you can enforce using the property from the
dataMap by using the
catalogElement has property
price (which has a
PriceField with value
1.00) and a
2.00) within its
1 2 3 4
Supported Field Types¶
dataMap provides Fields of the following Field Types:
- SpecificationsType (for
- VariantType (for
To add more Field Types do the
dataMap, you need to extend the catalog factory.
Getting a product by SKU¶
If you need to fetch a product in a template (e.g. in a basket), use the
ses_product Twig function.
||yes||The SKU of the product node|
||no||An optional subtree path, to search product nodes (default:
||no||An optional parameter if a given variant is returned|
Product detail PDF¶
You can generate a PDF from the product detail page using a tool called
For security reasons, the PDF for product detail can only display general information that would be also visible for anonymous users. As a consequence, some details such as customer price cannot be displayed.
This is because
wkhtmltopdf would need user data to generate user-specific PDFs.
The user data would have to be attached to the URL and would be visible to everyone.
wkhtmltopdf in version 0.12.4 or higher to avoid issues with bugs present in earlier versions.
For example, if your PDF output is too small, you may need to update
wkhtmltopdf to a newer version.
You can generate a PDF in the command line by providing a URL of the product detail page, for example: