way1 Posted September 1, 2013 Share Posted September 1, 2013 I would like show pictures of the products along with the name of their names in the fast search results . For Prestashop 1.5.4.1 I used the following hack in the file \ modules \ blocksearch \ blocksearch-instantsearch.tpl ( 75th row) : replaced : return value; on return "<img src=\"" + baseDir + "img/tmp/" + "product_mini_" + data.id_product + ".jpg\" alt=\"" + value + "\" />" + value; NOTE : As the pictures of the products used a picture with the name product_mini_, that Prestashop are used to display images of the products in the catalog of the admin area. Let me explain: they are generated automatically in the folder \ img \ tmp \ when your open products listing in the admin area. They can be removed and they will be automatically regenerated at the first re-entry administrator to catalog in the admin area . Everything worked perfectly on 1.5.4.1 - see enclosed picture. But in Prestashop 1.5.5.0. this hack does not work. I noticed that the numbering product_mini images from the folder \ img \ tmp \ changed its format in Prestashop 1.5.5.0. In Prestashop 1.5.4.1 files are numbered as follows: product_mini_1.jpg product_mini_2.jpg product_mini_3.jpg etc. In Prestashop 1.5.5.0 numbering was this: product_mini_1_1.jpg product_mini_2_1.jpg product_mini_3_1.jpg etc. What _1 at the end of names ? The developers have added some ID? For exampleб ID store (as 1.5.x - is multishop)? I can not understand how to change this hack that product's images to be shown again in Prestashop 1.5.5.0? Can someone tell me how to correct the hack for Prestashop 1.5.5.0? Or maybe you advice how to use any a small product's image instead product_mini_? It would be nice to add a hack not only to results of a fast search for products, but also when editing the order. For example, when adding a new item in the order. Visual image facilitates quick selection from a list of similar names. Also in other parts of Prestashop like adding accessories or related products. So the hack will be useful to everyone. Please help! 1 Link to comment Share on other sites More sharing options...
pietter Posted September 4, 2013 Share Posted September 4, 2013 Hi Lion1, Try this one: return "<img src=\"" + baseDir + "img/tmp/" + "product_mini_" + data.id_product + "_1.jpg?time\" alt=\"" + value + "\" />" + value; I modified the code, and try it. The prefix "_1" is hardcoded since I'm newbie and still do not know what the meaning of it. Possibly it is shop id, but I only tried on 1 shop setting only. Good luck. Link to comment Share on other sites More sharing options...
tapuknight Posted March 22, 2014 Share Posted March 22, 2014 Did you get any solution for the 1.5.5+ version? i am facing same problem in 1.5.6 Link to comment Share on other sites More sharing options...
The Ge Posted April 8, 2014 Share Posted April 8, 2014 The added ID is the shop ID. In AdminProductsController.php the files are accessed using _PS_TMP_IMG_DIR_.'product_mini_'.$productId.'_'.$this->context->shop->id.'.jpg' 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