lmejia Posted March 10, 2021 Share Posted March 10, 2021 Good afternoon I am trying to add images to my prestashop products. The issue I have is that in the back the image looks good but when I enter the Front there the image does not appear. But if I click on the update button of the product at that moment the image starts to appear on the front. I leave here below my code: $image = new Image(); $image->id_product = $product->id; $image->position = Image::getHighestPosition($product->id) + 1; $image->cover = true; $image->legend = substr($name,0,14); $image->add(); $img = new MyAdminImportController(); $img->copyImg($product->id, $image->id, $img_url, 'products', true); 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