bsdll Posted May 29, 2012 Share Posted May 29, 2012 On the product page, I would like to be able to show the other categories that this product exists in. For example, the product exists in category A, B and C. When I click on category B, then click on the product, on the product page I would like it to say: "Also exists in category A, C" I am not sure how to do that with the tpl file or if I need to go further than that to get the list generated first. Thanks, Darren. Link to comment Share on other sites More sharing options...
codegrunt Posted May 29, 2012 Share Posted May 29, 2012 You can probably get category ids as an array using {$product->getCategories()} (which could be cycled through). If you need the complete objects then you probably will have to add a class override for the product controller that calls Product::getProductCategoriesFull() and sets that for Smarty. I would also expect that the stock module that shows products in the same category could be trivially adapted for this purpose. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now