sarah3585 Posted February 12, 2011 Share Posted February 12, 2011 Hi,I have turned on friendly url and generated the htaccess. From what I see all but 2 products are fine, for these 2 products the images in the checkout show the default no image available. It uses the small image here and on the product page which displays just fine, so i don't understand. I have tried regenerating all the images, with no sucess.Any suggestions?Thank you. Link to comment Share on other sites More sharing options...
PrestaShopDeveloper Posted February 12, 2011 Share Posted February 12, 2011 Can you paste the url of the 2 images. Maybe the names interfere with the .htaccess url rewritings. Link to comment Share on other sites More sharing options...
sarah3585 Posted February 12, 2011 Author Share Posted February 12, 2011 95-284-small/crystal-illusion-necklace.jpg35-394-small/traditional-crystal-tiara.jpg Link to comment Share on other sites More sharing options...
sarah3585 Posted February 12, 2011 Author Share Posted February 12, 2011 Here's my htaccess file code # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [QSA,L,E] RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [QSA,L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [QSA,L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E] RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 [QSA,L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$1 [QSA,L,E] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php Link to comment Share on other sites More sharing options...
sarah3585 Posted February 12, 2011 Author Share Posted February 12, 2011 I think the issue may have been because these 2 products friendly urls were edited in the product editing options. I've redone these products now and images work fine.Anyone had issues with editing the friendly url text? Link to comment Share on other sites More sharing options...
merico Posted October 16, 2011 Share Posted October 16, 2011 I have the same issue. Link to comment Share on other sites More sharing options...
Shhhh Posted December 25, 2011 Share Posted December 25, 2011 Somehow my .htaccess was regenerated with two lines missing. I solved the "image not available" missing issue by manually editing the .htaccess file and adding them to it RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2$3.jpg [L] RewriteRule ^([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2.jpg [L] I don't think this is a valid solution but it really helped me out. Was going crazy seeing thos bad links... LE: anyone knows how to make this more "permanent"? As somehow expected, the added content is lost when the .htaccess file gets regenerated LE2: it seems that the rewrite code can be found in the Tools.php file in clasess. I added the following lines around line 1735 (just below // Rewriting for product image id < 100 millions) $tab['RewriteRule']['content']['^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$'] = _PS_PROD_IMG_.'$1-$2$3.jpg [L]'; $tab['RewriteRule']['content']['^([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$'] = _PS_PROD_IMG_.'$1-$2.jpg [L]'; Hope it helps 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