prestashop_newuser Posted January 29, 2014 Share Posted January 29, 2014 Hi, I am doing a small module.In that I have a input field for product name and one button. So when someone enters some words from the product name and click on the button then it shows all the products matching with that letters. For that I have made simple ajax queries and I am getting the values like product name and description from ps_product_lang table. Here my question is how can I get the product price, product image, add to cart button and view link for the matching product name? I want my output result should be like the reference image. So can someone kindly tell me how to make this possible? Any help and suggestions will be really appreciable. Link to comment Share on other sites More sharing options...
selectshop.at Posted January 29, 2014 Share Posted January 29, 2014 (edited) Sorry for my curiosity, but why a new module, when users can use search on top of page ? If you want a filtering of your content, please use the block layered navigation module. There you can add filters and users can navigate to products also by this way. The reference image will be shown if it has the same name as of the product itself (metas) Edited January 29, 2014 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
prestashop_newuser Posted January 29, 2014 Author Share Posted January 29, 2014 Sorry for my curiosity, but why a new module, when users can use search on top of page ? If you want a filtering of your content, please use the block layered navigation module. There you can add filters and users can navigate to products also by this way. The reference image will be shown if it has the same name as of the product itself (metas) I am doing this new module to know more about prestashop. Want to know about filters using module. So can you tell me how to make that possible? Link to comment Share on other sites More sharing options...
selectshop.at Posted January 29, 2014 Share Posted January 29, 2014 (edited) Play by yourself with module block layered navigation (http://doc.prestashop.com/display/PS15/Making+the+Native+Modules+Work - section Layered Navigation). It is a self-instructed module. BUT first of all you should add attributes to your products that can be filtered: http://doc.prestashop.com/display/PS15/A+Look+Inside+the+Catalog - search there "layered navigation" For more about the module you can read on the designer guide: http://doc.prestashop.com/display/PS15/Implementing+layered+navigation+in+a+theme Edited January 29, 2014 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 you can create an array with products based on foreach loop $array[]=new Product(id); then you will have an array with all products array[0]= product 1; array[1]= product 2; ... then you will be able to use an array element as a product object $array[1]->price etc. Link to comment Share on other sites More sharing options...
Recommended Posts