♥Tsimi Posted September 14, 2015 Share Posted September 14, 2015 This following module is based on this Addon.http://addons.oscommerce.com/info/9006This is for osC 2.3.4 BS GOLD and/or EDGE version.It will give you the possibility to "narrow down" the products listed in the product_listing.php page.To setup filters I think you better install the sample filters and look how they are setup.Please backup your files and database before attempting to install this.There are unfortunately file changes necessary but really minor ones.FULL PACKAGE: Filter Module BS.zipEnjoy! Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 16, 2015 Author Share Posted October 16, 2015 Uploaded to the Addons area: http://addons.oscommerce.com/info/9374 *incl. Minor fix inside the install manual Link to comment Share on other sites More sharing options...
radhavallabh Posted October 18, 2015 Share Posted October 18, 2015 Hi, Can we ajax refresh the product listing using the filter rather than getting the whole page to load again? Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 19, 2015 Author Share Posted October 19, 2015 Hi, Can we ajax refresh the product listing using the filter rather than getting the whole page to load again? Can? Probably yes. How? I have no idea. Believe me If I knew how the Ajax stuff works it would have been already inside it. Maybe someone with such skills could look into it once. Link to comment Share on other sites More sharing options...
radhavallabh Posted October 19, 2015 Share Posted October 19, 2015 @@Tsimi Yes! That would be great idea someone with that skills could look into it once... No wonder this addon would become a charm for oscommerce 2.3.4 and BS Link to comment Share on other sites More sharing options...
gadlol Posted October 21, 2015 Share Posted October 21, 2015 Is there an online demo? Check out the great Alternative Administration System addon for osCommerce! Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 21, 2015 Author Share Posted October 21, 2015 @@gadlol No, there is no online demo available. Link to comment Share on other sites More sharing options...
♥Tsimi Posted November 11, 2015 Author Share Posted November 11, 2015 @@radhavallabh Hi!I was thinking about that AJAX thing and I thought since I am not able to do that why not just use the jquery onclick="this.form.submit()"This will reload the page after every checkbox click. So you don't have to click the update button anymore. If you want to try this once follow the instructions below. Open your catalog/includes/modules/content/products_filter/cm_products_filter.php file. FIND $products_filter_content .= tep_draw_checkbox_field('cfil' . $products_options_name['categories_filters_id'] . '[' . $row . ']', (int)$products_options['categories_filters_values_id'], (isset($_GET['cfil' . $products_options_name['categories_filters_id']]) ? (is_array($_GET['cfil' . $products_options_name['categories_filters_id']]) ? (in_array($products_options['categories_filters_values_id'], $_GET['cfil' . $products_options_name['categories_filters_id']]) ? true : false) : false) : false )) . ' ' . $products_options['categories_filters_values_name'] . '<br />'; REPLACE WITH // BACKUP ORIGINAL CODE //$products_filter_content .= tep_draw_checkbox_field('cfil' . $products_options_name['categories_filters_id'] . '[' . $row . ']', (int)$products_options['categories_filters_values_id'], (isset($_GET['cfil' . $products_options_name['categories_filters_id']]) ? (is_array($_GET['cfil' . $products_options_name['categories_filters_id']]) ? (in_array($products_options['categories_filters_values_id'], $_GET['cfil' . $products_options_name['categories_filters_id']]) ? true : false) : false) : false )) . ' ' . $products_options['categories_filters_values_name'] . '<br />'; $products_filter_content .= tep_draw_checkbox_field('cfil' . $products_options_name['categories_filters_id'] . '[' . $row . ']', (int)$products_options['categories_filters_values_id'], (isset($_GET['cfil' . $products_options_name['categories_filters_id']]) ? (is_array($_GET['cfil' . $products_options_name['categories_filters_id']]) ? (in_array($products_options['categories_filters_values_id'], $_GET['cfil' . $products_options_name['categories_filters_id']]) ? true : false) : false) : false ), 'onclick="this.form.submit()"') . ' ' . $products_options['categories_filters_values_name'] . '<br />'; FIND $products_filter_content .= '<div class="buttonSet"> <span class="buttonAction">' . tep_draw_button(IMAGE_BUTTON_UPDATE, 'fa fa-refresh', null, 'primary'); REPLACE WITH /* BACKUP ORIGINAL CODE $products_filter_content .= '<div class="buttonSet"> <span class="buttonAction">' . tep_draw_button(IMAGE_BUTTON_UPDATE, 'fa fa-refresh', null, 'primary'); */ $products_filter_content .= '<div class="buttonSet"><span class="buttonAction">'; That's it. Like I said not AJAX but it still makes filtering lot more comfortable. Link to comment Share on other sites More sharing options...
radhavallabh Posted November 12, 2015 Share Posted November 12, 2015 Hi @@Tsimi, Yes this is a great and seems a very good option ....have got it working this way but still requires page refresh like regular submit ,When it only refresh the Div -That is where the ajax gets complicated .. Here I am not able to fix on how can we use XHR with ajax to get this working?? Link to comment Share on other sites More sharing options...
pberry4032 Posted November 24, 2015 Share Posted November 24, 2015 If you can locate Burt on these forums, he has written something that does this as you wish and may sell you the module. He's also on [email protected] Link to comment Share on other sites More sharing options...
radhavallabh Posted November 26, 2015 Share Posted November 26, 2015 @@pberry4032 Thanks for your valued suggestion..... Right now Actually We are trying to incorporate the Ajax refresh of div in this kind of module itself as I have already installed the filter and made modifications on it..... Link to comment Share on other sites More sharing options...
radhavallabh Posted March 23, 2016 Share Posted March 23, 2016 @@Tsimi Hi, I am a newbie at instructions but have tried to give them at my best! :) Here is what can activate ajax on a filter addon- 1.On the js file of the filter addon......Add below in the function which triggers the form to display results- $("#xxxxxx input[type=checkbox]").change(function(e) { e.preventDefault(); $.get('http://www.xxxxxxxx.com/ajax_index.php', $("#form id").serialize(), function(data){ $('#name of div where it will show').html(data); }) }); 2.Then download the ajax-index.php from http://addons.oscommerce.com/info/9455 --- Do not install the addon in any case (as told to me). 3.Upload it to catalog folder and edit it the lines as per your modified store ( do not include the template top or template bottom files anywhere) Comment out all the lines that refer to the image loader.gif Replace the display divs #name with the one you have already. 4.This should activate the ajax! Link to comment Share on other sites More sharing options...
♥Tsimi Posted March 23, 2016 Author Share Posted March 23, 2016 @@radhavallabh Thanks I will try it out and see where it goes. I'll keep you updated. Thanks for all your efforts in this matter, very much appreciated. :thumbsup: Link to comment Share on other sites More sharing options...
auzStar Posted March 23, 2016 Share Posted March 23, 2016 Hi guys, Just to let you know, since your "Products Filter" is a bootstrap version, then the "Ajax Product Listing" module can be installed on a BS store, since it was designed for the bootstrap version of osC. It would make it easier instead of trying to hash code again. You would still require the script mentioned above though for the filter add-on functions to work, since this is not included in the Ajax module. What it would allow is the std filter, sort and page links to load via ajax also. It wasn't installed on @@radhavallabh's store because it wasn't compatible with his non-BS store. So we had to pull bits of code out of the module to get it to work on the filter add-on, and also got it to work on the sort and page links. The "Ajax Product Listing" module does rely on the BS store not having core changes that could prevent it from working, mainly in the way it pin points certain elements, id's, classes and links, then finds the target container to load the ajax content, otherwise all functions should work correctly. Just thought I'd give you this info, but it's up to you though. cheers My Add-onsAdvanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download SupportAjax Product Listing for osC 2.3.4 (bootstrap) Download SupportCategory New Products Carousel for osC 2.3.4 (bootstrap) Download SupportCategory Popular Products Carousel for osC 2.3.4 (bootstrap) Download SupportCustomer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportFront Page New Products Carousel for osC 2.3.4 (bootstrap) Download SupportIndex Nested - Product Listing for osC 2.3.4 (bootstrap) Download SupportMatch Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download SupportModular Category Page for osC 2.3.4 (bootstrap) Download SupportNEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download SupportNEW Equal Height Module for osC 2.3.4 (bootstrap) Download SupportProducts Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download SupportTwitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportUpcoming Products Modules for osC 2.3.4 (bootstrap) Download Support Assisted Add-onsScroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support Bootstrap Add-ons created by other membersosCommerce Bootstrap Addons and Code Link to comment Share on other sites More sharing options...
♥Tsimi Posted March 23, 2016 Author Share Posted March 23, 2016 @@radhavallabh @@auzStar Sorry if this is some sort of repetition for you guys but right now I don't understand how to implement this. I have a osC BS test store with the Ajax addon and Filter addon installed. On the js file of the filter addon......Add below in the function which triggers the form to display results- As far I know there is no js file for the filter. You guys cut out bits and pieces from the Ajax addon to make it work on a non-BS shop. And you guys put something together or changed files from either addon to make it work. That is the part I need to see. Maybe changed something inside the ajax_index.php ?? How does the includes/functions/filter.php looks like now? Link to comment Share on other sites More sharing options...
auzStar Posted March 24, 2016 Share Posted March 24, 2016 @@Tsimi I've had a quick look at this module's code (not seen this version in operation) and I can see that @radhavallabh's add-on filter has been customised (or is a different module) and nothing seems to match up. From what I can see you'll need to put some js code inside the cm_products_filter.php module file (to add to footer scripts), similar to my ht_ajax_product_listing.php module, using the code under case: 'index.php' section as an example (that's if your module only works for index page, not sure, if it works on all pages where product listing appears then you will have to include all sections). Basically, with the js code you'll have to capture the update and clear button events and then load a page into the target div container, via ajax, that processes the data with the filter parameters being passed to it. And because pages that load via ajax don't recognise scripts that are already sitting in footer, you'll need to include similar js script that you write above at the bottom of that ajax processing page. Look at my files as a guide. Hope you understand all this, little bit complicated I know, but it can be done. I'll try to help when I can. PS. I'll be posting an update to the "Ajax Product Listing" module shortly with some slight changes, mainly just cleaner code and making sure the module only loads for products when on the index page. So you might want to wait for it. cheers My Add-onsAdvanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download SupportAjax Product Listing for osC 2.3.4 (bootstrap) Download SupportCategory New Products Carousel for osC 2.3.4 (bootstrap) Download SupportCategory Popular Products Carousel for osC 2.3.4 (bootstrap) Download SupportCustomer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportFront Page New Products Carousel for osC 2.3.4 (bootstrap) Download SupportIndex Nested - Product Listing for osC 2.3.4 (bootstrap) Download SupportMatch Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download SupportModular Category Page for osC 2.3.4 (bootstrap) Download SupportNEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download SupportNEW Equal Height Module for osC 2.3.4 (bootstrap) Download SupportProducts Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download SupportTwitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportUpcoming Products Modules for osC 2.3.4 (bootstrap) Download Support Assisted Add-onsScroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support Bootstrap Add-ons created by other membersosCommerce Bootstrap Addons and Code Link to comment Share on other sites More sharing options...
radhavallabh Posted March 24, 2016 Share Posted March 24, 2016 @@Tsimi @@auzStar Yes I guess mine is a totally different module altogether, Hence none of the files were matching up when I checked too.... Link to comment Share on other sites More sharing options...
auzStar Posted March 24, 2016 Share Posted March 24, 2016 FYI New version of "Ajax Product Listing" (v1.1) has been uploaded: http://addons.oscomm...9455/#tabs-hist cheers My Add-onsAdvanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download SupportAjax Product Listing for osC 2.3.4 (bootstrap) Download SupportCategory New Products Carousel for osC 2.3.4 (bootstrap) Download SupportCategory Popular Products Carousel for osC 2.3.4 (bootstrap) Download SupportCustomer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportFront Page New Products Carousel for osC 2.3.4 (bootstrap) Download SupportIndex Nested - Product Listing for osC 2.3.4 (bootstrap) Download SupportMatch Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download SupportModular Category Page for osC 2.3.4 (bootstrap) Download SupportNEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download SupportNEW Equal Height Module for osC 2.3.4 (bootstrap) Download SupportProducts Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download SupportTwitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportUpcoming Products Modules for osC 2.3.4 (bootstrap) Download Support Assisted Add-onsScroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support Bootstrap Add-ons created by other membersosCommerce Bootstrap Addons and Code Link to comment Share on other sites More sharing options...
auzStar Posted April 29, 2016 Share Posted April 29, 2016 @@Tsimi Don't know how you got on with this. Sorry for late response, but due to other commitments I'm not getting to spend much time on coding at the moment. But I've attached a sample working copy of your "products filter" module, ajax version. It includes ajax javascript code similar to latest "ajax product listing". At the moment it works with the update and clear buttons (on your original module without the onclick() modification you suggested in an earlier post). If you want the checkboxes to work onclick() just remove these "//" from the section under "// checkboxes", and then remove the update button if you prefer. I haven't modified your original code except for the addition of one global variable and the inclusion of the javascript code which is plugged into footer scripts, I've tested this in a local BS copy only. At least it's a start on this and may require some fine tuning. You'll need to have "images/ajax-loader.gif", either from the "ajax product listing" package or your own. cheers cm_products_filter.php My Add-onsAdvanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download SupportAjax Product Listing for osC 2.3.4 (bootstrap) Download SupportCategory New Products Carousel for osC 2.3.4 (bootstrap) Download SupportCategory Popular Products Carousel for osC 2.3.4 (bootstrap) Download SupportCustomer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportFront Page New Products Carousel for osC 2.3.4 (bootstrap) Download SupportIndex Nested - Product Listing for osC 2.3.4 (bootstrap) Download SupportMatch Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download SupportModular Category Page for osC 2.3.4 (bootstrap) Download SupportNEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download SupportNEW Equal Height Module for osC 2.3.4 (bootstrap) Download SupportProducts Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download SupportTwitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportUpcoming Products Modules for osC 2.3.4 (bootstrap) Download Support Assisted Add-onsScroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support Bootstrap Add-ons created by other membersosCommerce Bootstrap Addons and Code Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 29, 2016 Author Share Posted April 29, 2016 @@auzStar Thank you for not forgetting Dom! :thumbsup: I was/am busy myself at the moment but I look forward to install your file and take a look at it asap. I will report back as soon I can. Again, thank you. Lambros Link to comment Share on other sites More sharing options...
ruprup Posted May 11, 2016 Share Posted May 11, 2016 are you sure that the addon works ? I installed it twice on BS Gold and it filters nothing .... the admin part partly works but seems to have problems with 2 languages Link to comment Share on other sites More sharing options...
Denzel Posted July 8, 2016 Share Posted July 8, 2016 Hi Lambros, is there still no live-demo to see this in action ? SEE YA Denzel. Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 8, 2016 Author Share Posted July 8, 2016 Sorry Denzel no live demo available. Unless someone has this installed in his shop and is willing to share the URL. Link to comment Share on other sites More sharing options...
Denzel Posted July 18, 2016 Share Posted July 18, 2016 Hi @@Tsimi Ok, I have installed it to my testshop, changed the language ids from the demo.sql to 2 (german) an run a test. Looks great till i try to add another filter... Have added "Format" to the Categories Filter in step 1 -> everything fine :) Then I tried to add "16:9" as Filter value, but it appears twice. If I try to delete one of them, I get 1054 - Unknown column 'c.categories_id' in 'field list' select c.categories_id, cd.categories_name, cf.categories_filters_name from categories C, categories_filters_attributes cfa, categories_filters cf, categories_description cd where cd.categories_id = c.categories_id and cd.language_id = '2' and cf.language_id = '2' and cfa.categories_id = c.categories_id and cfa.categories_filters_values_id='8' and cf.categories_filters_id = cfa.categories_filters_id order by cd.categories_name Maybe I have installed something wrong. My Kids were at the door a thousand times. I will try again tonight ;) SEE YA Denzel. Link to comment Share on other sites More sharing options...
Denzel Posted July 18, 2016 Share Posted July 18, 2016 Uppercase spelled query in admin/categories_filters.php change line 848 to $categories = tep_db_query("select c.categories_id, cd.categories_name, cf.categories_filters_name from " . TABLE_CATEGORIES . " c, categories_filters_attributes cfa, categories_filters cf, " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.categories_id = c.categories_id and cd.language_id = '" . (int)$languages_id . "' and cf.language_id = '" . (int)$languages_id . "' and cfa.categories_id = c.categories_id and cfa.categories_filters_values_id='" . (int)$HTTP_GET_VARS['value_id'] . "' and cf.categories_filters_id = cfa.categories_filters_id order by cd.categories_name"); SEE YA Denzel. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.