Jump to content

How to get packs containing the product


Recommended Posts

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

  • 7 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...