Edge_jr Posted August 16, 2022 Share Posted August 16, 2022 (edited) How can I get the cover image of the product? From PHP file, not tpl file. I saw a post regarding getting the image in tpl file. Edited August 16, 2022 by Edge_jr (see edit history) Link to comment Share on other sites More sharing options...
knacky Posted August 16, 2022 Share Posted August 16, 2022 Product::getCover($id_product) 1 Link to comment Share on other sites More sharing options...
Zohaib-fk Posted August 16, 2022 Share Posted August 16, 2022 try below code, $id_product = Tools::getValue('id_product'); $product = new Product($id_product); $product_cover_id = Product::getCover($id_product)['id_image']; $link_obj = new Link(); $product_cover = $link_obj->getImageLink($product->link_rewrite[1], $product_cover_id); 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