Sharly Nite Posted March 25, 2014 Share Posted March 25, 2014 (edited) Hi! How can I remove category in Ajax search results??? ( ipod > ipod nano). I want show product name only. (ipod nano)- Thanks! PS1.4.8 Edited March 26, 2014 by Sharly Nite (see edit history) Link to comment Share on other sites More sharing options...
Sharly Nite Posted March 26, 2014 Author Share Posted March 26, 2014 Please help me... Link to comment Share on other sites More sharing options...
vekia Posted March 26, 2014 Share Posted March 26, 2014 blocksearch-top.tpl located in modules/blocksearch/ directory change mytab[mytab.length] = { data: data[i], value: data[i].cname + ' > ' + data[i].pname }; to mytab[mytab.length] = { data: data[i], value: data[i].pname }; Link to comment Share on other sites More sharing options...
Sharly Nite Posted March 26, 2014 Author Share Posted March 26, 2014 thanks Vekia! Solved. Link to comment Share on other sites More sharing options...
vekia Posted March 27, 2014 Share Posted March 27, 2014 thank you for confirmation any chance to see it live somewhere? Link to comment Share on other sites More sharing options...
Sharly Nite Posted April 1, 2014 Author Share Posted April 1, 2014 Hi Vekia.... I have been working in Localhost. I 'll be looking for a hosting service soon. I wonder if I can add price product in ajax results list... Is that possible??? Have I open a new post with this topic? Link to comment Share on other sites More sharing options...
vekia Posted April 2, 2014 Share Posted April 2, 2014 by default you cant, modification like that needs modification in SearchController (controllers/front/SearchController.php) Link to comment Share on other sites More sharing options...
EasyUdaan.com Posted October 28, 2014 Share Posted October 28, 2014 Hello vekia, You are doing a wonderful job.Helping people build their websites.I have a problem too. I also want to hide categories from ajax search. How can it be achieved in prestashop 1.6.0.9? I cannot find this kind of code in my blocksearch-top.tpl mytab[mytab.length] = { data: data[i], value: data[i].cname + ' > ' + data[i].pname }; Thanks Link to comment Share on other sites More sharing options...
vekia Posted October 28, 2014 Share Posted October 28, 2014 Hello vekia, You are doing a wonderful job.Helping people build their websites.I have a problem too. I also want to hide categories from ajax search. How can it be achieved in prestashop 1.6.0.9? I cannot find this kind of code in my blocksearch-top.tpl mytab[mytab.length] = { data: data, value: data.cname + ' > ' + data.pname }; Thanks what theme you use? Link to comment Share on other sites More sharing options...
EasyUdaan.com Posted October 28, 2014 Share Posted October 28, 2014 (edited) Dear Vekia, I am using default theme. Thanks Edited October 28, 2014 by EasyUdaan.com (see edit history) Link to comment Share on other sites More sharing options...
EasyUdaan.com Posted October 30, 2014 Share Posted October 30, 2014 (edited) Anybody who can help? Edited October 31, 2014 by EasyUdaan.com (see edit history) Link to comment Share on other sites More sharing options...
Stofferdreng Posted November 8, 2014 Share Posted November 8, 2014 I have the same issue in 1.6 Link to comment Share on other sites More sharing options...
Ash.Krish Posted November 13, 2014 Share Posted November 13, 2014 (edited) guys, any update on 1.6? i found this on modules/blocksearch/blocksearch-instantsearch.tpl line 80: mytab[mytab.length] = { data: data, value: data.cname + ' > ' + data.pname }; but i tried to edit the values and its not working... Also, i tried to check jquery.autocomplete.js file, i don't fine the particular string instead of that, i came across Line 645: var formatted = options.formatItem(data.data, i+1, max, data.value, term); i hope someone can really help out on this :-) Cheers!! Edited November 13, 2014 by Ash.Krish (see edit history) Link to comment Share on other sites More sharing options...
Ash.Krish Posted November 18, 2014 Share Posted November 18, 2014 guys, any update on 1.6? i found this on modules/blocksearch/blocksearch-instantsearch.tpl line 80: mytab[mytab.length] = { data: data, value: data.cname + ' > ' + data.pname }; but i tried to edit the values and its not working... Also, i tried to check jquery.autocomplete.js file, i don't fine the particular string instead of that, i came across Line 645: var formatted = options.formatItem(data.data, i+1, max, data.value, term); i hope someone can really help out on this :-) Cheers!! solved by editing themes/yourthemefolder/js/module/blocksearch/blocksearch.js go to line 63: change var i =0 to var i=1 then, go to line 64 and remove data.cname dont change anything else and its works like a gem :-) cheers!! Link to comment Share on other sites More sharing options...
lbogdan Posted December 19, 2014 Share Posted December 19, 2014 solved by editing themes/yourthemefolder/js/module/blocksearch/blocksearch.js go to line 63: change var i =0 to var i=1 then, go to line 64 and remove data.cname dont change anything else and its works like a gem :-) cheers!! Thanks ! I was looking for this too but why changing var i to 1 ? You are loosing the first result doing this. Am I wrong ? Link to comment Share on other sites More sharing options...
Nikhil Kumar Posted December 5, 2015 Share Posted December 5, 2015 what theme you use? Hi vekia how can i print category and product name seperately in this context and category must appear only once. what theme you use? blocksearch-top.tpl located in modules/blocksearch/ directory change mytab[mytab.length] = { data: data[i], value: data[i].cname + ' > ' + data[i].pname }; to mytab[mytab.length] = { data: data[i], value: data[i].pname }; Hi vekia how can i print category and product name seperately in this context and category must appear only once. Link to comment Share on other sites More sharing options...
Recommended Posts