CMS Development

JamesKw
Participant

How to clone and customise products section in marketing emails

I am trying to clone & customise default "Products" section in marketing emails. Instead of prices, we wish to show reward points which is a custom field in Products object. 

JamesKw_0-1742365948738.png

I copied @hubspot/growth/sections/products.html file and paste code in /growth copy/sections/products.html file, but it wouldn't allow me publishing changes, and there are 46 errors.

JamesKw_1-1742366041933.png

I am pretty new to HubSpot development. Can someone please shed some light for me?

 

2 Replies 2
JamesKw
Participant

How to clone and customise products section in marketing emails

Hi Gaurav,

Thank you. It seems that I tried to copy a wrong thing. 

Can you please tell me where I can clone this module?

JamesKw_1-1742401303633.png

 

0 Upvotes
GRajput
Recognized Expert | Gold Partner
Recognized Expert | Gold Partner

How to clone and customise products section in marketing emails

Hi @JamesKw 

 

Okay, I guess you created a module in your child theme and the copy pasted the section's code in there but it doesn't work like that in HubSpot. Modules are not templates. They are the atomic part of the theme which means you can use a module in any section and templates but you can not use sections and templates in a module and definitely cannot convert a module into a section by setting template type to section. First, you need to create a module and then create a section and call the module in that section.

You cannot use {% dnd_tags %} in modules as well. Below I have attached some articles/docs which will help you. Also, I would recommend checking HubSpot for Developers 2 certification lectures if you want to understand HubSpot themes in detail.

 

DOCS:-   Theme Structure, Sections, DNS Tags

 

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting