Featured Module - How to Get Product's Category Name to show
Posted: Mon Feb 13, 2017 5:06 am
I want to be able to display a Product's Category Name as part of the information displayed for a product when displayed by Featured Module.
It seems the difficulty with doing this is that a product can have more than one category, and that a product's category is NOT a single unique piece of info that is stored with a particular product's set of properties such as its price, SKU, or product name.
In my case, I will only be assigning one category to each product, so it would be fine if a query just returned the first category associated with each product.
Can anyone suggest what would be involved to make this work, or what files need to be edited?
Can it be done by editing existing files, or would I need to add a new Model to make this work? I'm guessing this would need a new SQL query that returned the category for each product, and then made that category name available to the Featured Module controller?
It seems the difficulty with doing this is that a product can have more than one category, and that a product's category is NOT a single unique piece of info that is stored with a particular product's set of properties such as its price, SKU, or product name.
In my case, I will only be assigning one category to each product, so it would be fine if a query just returned the first category associated with each product.
Can anyone suggest what would be involved to make this work, or what files need to be edited?
Can it be done by editing existing files, or would I need to add a new Model to make this work? I'm guessing this would need a new SQL query that returned the category for each product, and then made that category name available to the Featured Module controller?