Access category of product in users email

  • Posts: 45
  • Thank you received: 0
13 years 1 month ago #26582

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: 13 years 1 month 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.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 1 month ago #26594

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.

  • Posts: 45
  • Thank you received: 0
13 years 1 month ago #26600

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.046 seconds
Powered by Kunena Forum