Shwamateur Posted March 4, 2014 Share Posted March 4, 2014 (edited) Hi everyone!I'm having a weird issue:I'm trying to display the attribute group of each product on the product list. (in our store we use only one attribute combinations) so we can show something like " Choose size" or "Choose color" (a link that goes to the product page).I modified Category.php (function getProducts) in order to properly retrieve via sql the attribute group name.In CategoryController.php (at the end of the assignProductList method) I use print_r to display all the products in order to confirm that I am retrieving well the atribute group name, and it is there ant it is correct.The issue is that I can't manage to display this via product-list.tpl: it is showing just "Choose" and blank. I can display any other attribute retrieved via Category.php getProducts (visibility, name, meta_keywords) but I can't manage to display this one...Can someboy help me?Thank you very much. Edited March 4, 2014 by Shwamateur (see edit history) Link to comment Share on other sites More sharing options...
Shwamateur Posted March 4, 2014 Author Share Posted March 4, 2014 I discovered something, if I go to Category.php, method getProducts and I assign a new name to any of the fields in the SELECT statement ( I tried pl.`meta_title` metatitle), I can't display them either on the product list... Any idea? Link to comment Share on other sites More sharing options...
Shwamateur Posted March 4, 2014 Author Share Posted March 4, 2014 It looks like I'm not calling properly the "$this->category->getProducts($this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay);" method on CategoryController (If I print_r $this->cat_products the attribute group name doesn't appear). I'm sure it has something to do with the actionProductListOverride hook, but I don't know how this works. Any help would be very appreciated. Link to comment Share on other sites More sharing options...
Shwamateur Posted March 4, 2014 Author Share Posted March 4, 2014 I finally find the solution, since I was using layered navigation, I had to include the mentioned SQL there, that way it works perfect. Link to comment Share on other sites More sharing options...
ck-iridium Posted March 11, 2014 Share Posted March 11, 2014 And the solution?, how u did that? Thanks! 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