CMS Development

uppline
Participant | Platinum Partner
Participant | Platinum Partner

Implement product information in email module

Hey everybody! I am new here.. Hopefully someone can help me out. 

I want to create a email module. This module should make it possible to easily get product information (product image, description, price) in an email. The products are available in the HubSpot Quote / products section. The idea is drag and drop the module in the email and for example get all info by filling in a sku. 

 

Has anybody made something like this? Whow can help me out building this for my client?

 

Thanks!

Jorg

0 Upvotes
5 Replies 5
amwilie
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Implement product information in email module

Hey @uppline , you can use CRM Objects in a custom module to grab product information.

https://developers.hubspot.com/docs/cms/features/custom-objects

 

 

{% set products = crm_objects("products") %}
<ul>
  {% for product in products.results %}
    <li>{{ product.name }}</li>
  {% endfor %}
<ul> 

 

 

OR if you want to grab products from a Deal (in an email sent through a Deal base workflow) you can use line_items.

 

<ul>
  {% email_each list="deal.line_items" item="line_item" %}
    <li>{{ line_item.name }}</li>
  {% endemail_each %}
</ul>

 

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developer at Lynton

Learn HubL | Get Marketing Insights

balabanov
Contributor

Implement product information in email module

Hi Alyssa,

Do you know whether there's a workaround for

deal.line_items

 in the emails for 2023? Looks like Ecommerce Bridge sunset killed this feature.

Thanks!

0 Upvotes
uppline
Participant | Platinum Partner
Participant | Platinum Partner

Implement product information in email module

Hey @amwilie !

Thanks for you help so far! I am really new with this part of coding in HubSpot. 

I get the following errors:

 

1. Error:object type `products` does not exist
2.Error:object type `products` does not exist
3.Warning:An argument is missing
 
Is this something you can help me with?
 
Thanks!
Jorg
 
0 Upvotes
uppline
Participant | Platinum Partner
Participant | Platinum Partner

Implement product information in email module

hey @dennisedson !

Thanks for this answer. I will look into the podcast. That would probably help me a lot. I will also contact @amwilie for some guidance 🙂

 

Thanks and have a nice day!

 

Jorg

dennisedson
HubSpot Product Team
HubSpot Product Team

Implement product information in email module

Hey @uppline 

Welcome aboard 😀

Did you know that we are about to do a podcast on email and @amwilie is going to be talking all about it.  Maybe she could lend a hand here

0 Upvotes