zeraist Posted April 4, 2013 Share Posted April 4, 2013 In product list the product image don't show for new inserted products With default products $product.link_rewrite returns per example 5-7 but with new products inserted $product.link_rewrite returns en-default So the image link returned with $link->getImageLink($product.link_rewrite, $product.id_image, 'home_default') is "img/p/en-default-home_default.jpg" Can you please tell me what the problem is? Thanks Link to comment Share on other sites More sharing options...
zeraist Posted April 8, 2013 Author Share Posted April 8, 2013 help please Link to comment Share on other sites More sharing options...
mastobuuth Posted May 12, 2013 Share Posted May 12, 2013 Hi, I have exactly the same problem. I wonder if something is wrong in the database and which table to check. Cordially, Link to comment Share on other sites More sharing options...
yaniv14 Posted May 12, 2013 Share Posted May 12, 2013 Did you try with freindly url's turned off, maybe its a problem with mod rewrite/htaccess? can you post a url to your site Link to comment Share on other sites More sharing options...
yassoni Posted December 4, 2013 Share Posted December 4, 2013 I have have the same probleme and it's the same when rewrite is desactivated. My website : http://www.e-i.ma/projets/deal_s/101-mobiles-without-contract Please help Link to comment Share on other sites More sharing options...
vekia Posted December 4, 2013 Share Posted December 4, 2013 have you got "home_default" image defined under preferences > images tab in your back office? Link to comment Share on other sites More sharing options...
yassoni Posted December 5, 2013 Share Posted December 5, 2013 Yes vekia, actually i have done a script that import products from an XML. It's working but the only thing is thoses images I think that there is some thing missing here ; function AddImages($images){global $product;echo $product->id; if(!is_array($images) OR count($images)==0) return; $_warnings = array(); $_errors = array(); $productHasImages = (bool)Image::getImages(1, (int)($product->id)); if ($productHasImages){ $product->deleteImages(); } foreach ($images AS $key => $url) { if (!empty($url)) { $image = new Image(); $image->id_product = (int)($product->id); $image->position = 1; $image->cover = true; $image->legend = createMultiLangField($product->name[1]); //print_r($image); if (($field_error = $image->validateFields(UNFRIENDLY_ERROR, true)) === true && ($lang_field_error = $image->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $image->add()) { $image->associateTo($product->id_shop_list); if (!copyImg($product->id, $image->id, $url)){ $image->delete(); $_warnings[] = Tools::displayError('Error copying image: ').$url; } } else { $_warnings[] = $image->legend[$defaultLanguageId].(isset($image->id_product) ? ' ('.$image->id_product.')' : '').' '.Tools::displayError('cannot be saved'); $_errors[] = ($fieldError !== true ? $fieldError : '').($langFieldError !== true ? $langFieldError : '').mysql_error(); } //$image->updatePosition(Tools::getValue('imgDirection'), Tools::getValue('imgPosition')); } }} Link to comment Share on other sites More sharing options...
yassoni Posted December 6, 2013 Share Posted December 6, 2013 any help please ? Link to comment Share on other sites More sharing options...
Recommended Posts