Pulling data from both the Products and Categories CMS groups

Hi friends!
I just started messing around with CMS and Ecommerce, so this may have a simple solution that I’m just not seeing.

Let’s say I just made a new site with 3 products and 2 categories. Let’s call them Journal, Planner, and Bracelet, with categories for Books and Jewelry. Now, I want to add a background color to all the pages with Books on them, so I added a CMS field for Colors, and applied a blue to the Books, and a Pink to all the Jewelry.

Now, I want the background of the product pages to show the color of the Category. So a Journal page will show a Blue background, from the Colors CMS field under Category, and the Bracelet will show a Pink background.

When I go to the Products page to put that together, I can’t figure out how to call the Color CMS field under the Book Category. How do I do that? Is that possible? Can I call a second category on the default Products page? Is there a way to work around that?

Thanks in advance!
Niki

Hi @Carnet - Welcome to the forum. :wave:

Yes, you can with a single category. Assumptions:

  • There is a color field in Categories
  • The color field is populated
  • Products have a single reference to Categories.
  • In product template you select an element and assign background color from the referenced category color field.

CloudApp

Is this what you are trying to achieve or am I confused about what you want to do?

1 Like