Jump to content

Recommended Posts

  • 1 year later...

Bonjour,

En se greffant au hook "actionAdminProductsListingResultsModifier" c'est possible :

    public function hookActionAdminProductsListingResultsModifier(array &$paramsHook){
        $image_type = 'small_default';
        $context = Context::getContext();
        foreach($paramsHook['products'] as &$product){
            $productObj = new Product($product['id_product']);
            $img = $productObj->getCover($productObj->id);
            $product['image'] = '<img src="' . $context->link->getImageLink($productObj->name[$context->language->id], (int) $img['id_image'], $image_type) . '">';
        }
    }

Testé sur une version 1.7.8.7

Link to comment
Share on other sites

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...