Search the Community
Showing results for tags 'bottom'.
-
Hello devs, todays quick tip from me is how to move products not available for order to the end of search results. I am working 1.6 but I think that is similiar to 1.7. I am not making overrides, I will just tell You how to set this up. I was annoyed that I have all not available for orders products at the end of categories but in search results thing was bit more complicated and lot of old products not available for order were somewhere at the begining. Solution to this is quite simple. In Search.php in override\classes\Search.php or classes\Search.php search for "public static function find" and in this try to find something like this: SELECT SUM(weight) FROM '._DB_PREFIX_.'search_word sw LEFT JOIN '._DB_PREFIX_.'search_index si ON sw.id_word = si.id_word WHERE sw.id_lang = '.(int)$id_lang.' AND sw.id_shop = '.$context->shop->id.' AND si.id_product = p.id_product AND ('.implode(' OR ', $score_array).') ) position'; and just simply replace the first line of it with this SELECT SUM(CASE WHEN p.available_for_order = 1 THEN weight ELSE 0 END) FROM '._DB_PREFIX_.'search_word sw LEFT JOIN '._DB_PREFIX_.'search_index si ON sw.id_word = si.id_word WHERE sw.id_lang = '.(int)$id_lang.' AND sw.id_shop = '.$context->shop->id.' AND si.id_product = p.id_product AND ('.implode(' OR ', $score_array).') ) position'; and now You will have all not available products in search results at then end. Now You know how to edit this as well to move products with stock_quantity <= 0 at the end. Try it to figure it out for yourself If You will figure out few more good ideas about it feel free to share it here. For more cool things about Prestashop Search engine go to ->
- 2 replies
-
- 2
-
-
- end
- available for order
-
(and 3 more)
Tagged with:
-
Dear all, I've a strange problem. The "Screen to top" button in my prestashop www.kaffeefleck24.de doesn't work. In German it's called "nach oben". The link is only "javascript" and I don't know where to change this manually. Could you please help me? Thanks a lot! Jens
-
Hi everyone! After searching for a while, i come here for some help... How to place footer at very bottom on all pages? My prestashop is v.1.5.6.1 Many thanks!
-
Hello, I am new to prestashop and I am trying to figure out how to move the Seach block on top of the Cart block in the header of the page. I am running Prestashop 1.6.0.9 with the default-bootstrap theme. I found this similar thread but my files are not the same probably due to updates to the theme or modules This was the fix on that thread: The problem with my blocksearch-top.tpl file is that the file shows this: <div id="search_block_top"> instead of this: <div id="search_block_top" class="col-sm-8 clearfix"> Any suggestions? Thanks in advance Edit: I forgot to mention that the div shows as the following, when inspected in the browser through firebug. <div id="search_block_top" class="col-sm-4 clearfix">
-
Hi, Id like to edit the file that limits the characters size for the related products on each articule as you can see in this image: http://puu.sh/bidMJ/dbabeae04f.png As you can see thats on the bottom of each product and its a list of related articules but the names are shortened does anybody know where can I edit the shortness limit so i can show more title thanks
-
Hola a todos, Necesito hacer algo que se parece mucho al botón de la parte de abajo de la página que estáis viendo ahora en prestashop. Subo una imagen también ¿sabéis si algún módulo lo hace? Necesito que vaya al formulario de contacto. Muchas gracias. Fedeque
-
I have a deleted everything from my PrestaShop expect a few things such as the logo needs to be replaced, but when adding new categories and products, the front page never updates on the bottom left front. In preview mode it does, and when you go and click on an item in the store, but other than that, it's the same sample shop categories. Any advice?
-
hello alls, i've succeeded to change bar's color at the top and on the left side, but i have been struggling for hours to change color of the bar at the bottom of my page, please see attachment and my live site here : http://www.baliolala.com/content/4-a-propos-de-nous but didn't manage to succeed.... firebug told me that it's located in global.css, but i'm not sure the color setting is over there, i've changed stuff, but didn't work at all.... any ideas ? i'd really appreciate it... cheers !