Solution Recipe 4: Extending Klaviyo’s Product Block Functionality
Solution Recipes are tutorials to achieve specific objectives in Klaviyo. They can also help you master Klaviyo, learn new third-party technologies, and come up with creative ideas. They are written mainly for developers & technically-advanced users.
Note: We do our best to make sure any code and API references are accurate and current when this is published, but you might need to update code and it’s always a best practice to leverage our latest API versions. If you have questions, feel free to hop over to our Developer Community.
How to create a customizable Product Block-like Text block using Klaviyo’s native features and Django Template Tagging.
The prebuilt Product Block provides some easy-to-use preset functionality, but it might not cover 100% of business/marketing cases.
High
Introduction
Klaviyo’s template editor allows you to use a preset block called the Product Block. This block lets you choose from a selection of filtered/weighted Product Feeds which pull from your Catalog. In addition to this, Klaviyo provides a range of default Django and custom built template tagging syntax to let you customize the look, feel and personalization of our email templates.
Challenge
While the default setup and options for the Product Block work for most businesses, there are a handful of use-cases which can warrant a more customized approach. Because of the nature of the default block and the need to support its functionality at scale, customization options are relatively limited.
Note: this block setup requires custom html and template tagging/Django. As such, its troubleshooting is not