_oc_2110 Posted October 21, 2020 Share Posted October 21, 2020 Greetings, Today I'm adding visual stickers to my products in order to show the user which carriers will be available, so they won't have a cart with 10 products delivered and 1 to pickup in store. They'll immediately know what they can do. No problem on single product page, adding this in ProductController.php is enough : $this->context->smarty->assign(array( 'pictures' => $pictures, 'textFields' => $text_fields, 'carriers' => $this->product->getCarriers(), )); The point comes to product-list page ... I can't seem to find out what I can do to link the carriers to each product of the category (currently looking in CategoryController). Does anybody have already done something like this ? Link to comment Share on other sites More sharing options...
_oc_2110 Posted October 26, 2020 Author Share Posted October 26, 2020 I could go a little further, in ProductListingFrontController, protected function doProductSearch($template, $params = array(), $locale = null) { if ($this->ajax) { ob_end_clean(); header('Content-Type: application/json'); $this->ajaxRender(json_encode($this->getAjaxProductSearchVariables())); return; } else { $variables = $this->getProductSearchVariables(); ... All listing products are inside $variables, but looking in the documentation of Prestashop, I can't seem to find how to access products and loop through them. Still nobody has a lead to this issue ? 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