Product variables

  • Posts: 1
  • Thank you received: 0
13 years 5 months ago #17963

How can I get out priduct category/subcategories variable.
For example to get product name there is such line:

echo $this->element->product_name;
By what should I replace product_name to get all product parent categoryes?

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #17964

Parent categories are not loaded from the database on the product page. That means that you can't just use $this->element->something.
You need to first do a query in MySQL in order to load the categories data from the database and then you can use the data your loaded to display it.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum