sitte Posted August 11, 2020 Share Posted August 11, 2020 I'm trying to prepare module to display packs/sets that contains product. It will be displayed in hookDisplayFooterProduct. I have category and product info but I'm struggling with getting packs (product sets) that contains product. $product = $this->context->controller->getProduct(); $category = new Category((int)$product->id_category_default, (int)$this->context->language->id); $pack = new Pack(); $PacksContainingItem=$pack->getPacksContainingItem($product->id, 2 , (int)$this->context->language->id); $PacksContainingItem contains info that I need but it is in different format then Product (for example it contains no product id). Does somebody has any example how to get such packs or can tell me how to convert such data? Link to comment Share on other sites More sharing options...
Daaaaad Posted March 24, 2021 Share Posted March 24, 2021 Hello @sitte, I managed to do that by creating my own ProductSearchProvider called PackProductSearchProvider 👍 I've packaged that in a module I sell on Addons : https://addons.prestashop.com/fr/ventes-croisees-packs-produits/50136-affichage-des-packs-sur-les-fiches-produits.html (If you don't want to develop it by yourself 😉) Regards, David. 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