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?
If you know some PHP and can create a VQMod yourself, this won't be too hard for you to implement. You need to additionally query product categories in catalog/controller/module/featured.php, then just add category name (call it "category", for example) to the products array. When you done, you'll have "category" index to display anywhere you want.
Just open the file mentioned above and corresponding template and see, how any other product parameter is added and displayed. Do the same for category.
Just open the file mentioned above and corresponding template and see, how any other product parameter is added and displayed. Do the same for category.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Who is online
Users browsing this forum: No registered users and 4 guests