Skip to main content

Access category of product in users email

More
15 years 17 hours ago - 15 years 14 hours ago #26582 by k8fisher
Hi, Im seeing plenty of questions about fields but none mentioning how to pull through the category a product belongs to.

How would I reference the category of the products purchased?

I tried the tip from Nicholas re typing (below)in an email but it just doesnt seem to give access to the category...

<?php echo nl2br(print_r($data,true)); ?>

Is there anyway to get to the category of a product?

Any thoughts very much welcome
Last edit: 15 years 14 hours ago by k8fisher. Reason: realised what I really need is the ability to access the category of the product not a custom variable

Please Log in or Create an account to join the conversation.

More
15 years 13 hours ago #26594 by nicolas
There is indeed no easy access to the categories of a product since the categories are not loaded for the email.
That means that you first need to make a query to the database to load the categories of each product before being able to display them. That will require PHP knowledge to do that.

Please Log in or Create an account to join the conversation.

More
15 years 12 hours ago #26600 by k8fisher
Thanks for the speedy response, I guess theres a limit to the amount of things you can pull in when creating the email. I just thought I would check in case I was missing something obvious.

Much appreciated

Kate

Please Log in or Create an account to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum