JvdP Posted September 9, 2009 Share Posted September 9, 2009 (edited) I agree that this should work for your Categories mod. I also have no idea why the left join. It should work the same because we always have a category entry for every product, but that also make the left join unnecessary. I'll change that. Regards Jim Not sure about that, without a left join it didn't include all matching products in the count. It appears code has to be changed in catalog/products_filter.php as well starting on line 141: // Start Enable & Disable Categories V1.6.6 (http://addons.oscommerce.com/info/326) $listing_sql .= "p.products_id, p.products_model, p.manufacturers_id, m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id join products_description pd on p.products_id = pd.products_id join products_to_categories p2c on p.products_id = p2c.products_id left join (" . TABLE_CATEGORIES . " c) on (p2c.categories_id = c.categories_id) " . $sql_array['from'] . " where p.products_status = '1' and pd.language_id = '" . (int) $languages_id . "' and c.categories_status = '1' " . $sql_array['where'] . " "; // End Enable & Disable Categories V1.6.6 (http://addons.oscommerce.com/info/326) This is to avoid disabled products are listed in the results after all when same specificaions are in both enabled and disabled categories. Am I correct (not sure on brackets, gave no different testresults)? Is there more code to be changed? Regards, Jerome Edited September 9, 2009 by JvdP Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 10, 2009 Author Share Posted September 10, 2009 You will need to make the change everywhere that we use the products_to_categories table. That would be: catalog/products_filter.php catalog/admin/includes/functions/general.php (Unless you want the admin side to show) catalog/includes/functions/general.php If Eclipse is giving me the correct results, that is. Never trust software, it's treacherous. I don't see why the left join is needed. It should only give different results if there are products that have no category, which I'm not even sure is possible. I'd like to know why this would happen. Maybe I need to do some experimenting. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
JvdP Posted September 10, 2009 Share Posted September 10, 2009 You will need to make the change everywhere that we use the products_to_categories table. That would be:catalog/products_filter.php catalog/admin/includes/functions/general.php (Unless you want the admin side to show) catalog/includes/functions/general.php Thanks Jim for figuring this out, Already did products_filter.php, general.php's are dealed with by the original contribution. Tested join (" . TABLE_SPECIALS . " s) versus LEFT join (" . TABLE_SPECIALS . " s) one more time. I am very positive only LEFT join has the correct counter. Though, don't ask me why. Regards, Jerome Quote Link to comment Share on other sites More sharing options...
[email protected] Posted September 10, 2009 Share Posted September 10, 2009 kymation, I wanted to say thank you for working on getting this setup. Do have the 1.0 version ready for public release? If not do you have an ETA. Thank you again, Adam Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 10, 2009 Author Share Posted September 10, 2009 I'm working on the final version right now. I found a couple more bugs and I need to do some cleanup on some of the code. I expect to release it within a day or two, barring major disaster (or more bugs.) Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥kymation Posted September 10, 2009 Author Share Posted September 10, 2009 Tested join (" . TABLE_SPECIALS . " s) versus LEFT join (" . TABLE_SPECIALS . " s) one more time. I am very positive only LEFT join has the correct counter. Though, don't ask me why. Regards, Jerome My test of the joins showed no difference. There's probably some difference in the data, or possibly some other Contribution that you have installed. I don't know why either, but if it works for you, use it. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 10, 2009 Share Posted September 10, 2009 My test of the joins showed no difference. There's probably some difference in the data, or possibly some other Contribution that you have installed. I don't know why either, but if it works for you, use it. Regards Jim I think there is a misunderstanding with Jerome. The equijoin should only be enforced on the categories table as every product should belong to a category, but definitely not on specials, with specials it should always be a left join, as you want to include all products even the ones that are not on special. Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 10, 2009 Share Posted September 10, 2009 (edited) Not sure about that, without a left join it didn't include all matching products in the count. It appears code has to be changed in catalog/products_filter.php as well starting on line 141: // Start Enable & Disable Categories V1.6.6 (http://addons.oscommerce.com/info/326) $listing_sql .= "p.products_id, p.products_model, p.manufacturers_id, m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id join products_description pd on p.products_id = pd.products_id join products_to_categories p2c on p.products_id = p2c.products_id remove the left here===> join (" . TABLE_CATEGORIES . " c) on (p2c.categories_id = c.categories_id) " . $sql_array['from'] . " where p.products_status = '1' and pd.language_id = '" . (int) $languages_id . "' and c.categories_status = '1' " . $sql_array['where'] . " "; // End Enable & Disable Categories V1.6.6 (http://addons.oscommerce.com/info/326) This is to avoid disabled products are listed in the results after all when same specificaions are in both enabled and disabled categories. Am I correct (not sure on brackets, gave no different testresults)? Is there more code to be changed? Regards, Jerome See above, I think you should just remove "left" where I put the arrow Edited September 10, 2009 by bruyndoncx Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥kymation Posted September 10, 2009 Author Share Posted September 10, 2009 See above, I think you should just remove "left" where I put the arrow That's what I tested and found no difference. Which is what I expected to find. If anyone gets different results, by all means do what works for your situation.. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 10, 2009 Share Posted September 10, 2009 That's what I tested and found no difference. Which is what I expected to find. If anyone gets different results, by all means do what works for your situation.. Regards Jim True, but I think Jerome did not from the posts he made, I think he misunderstood what to replace. Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 11, 2009 Share Posted September 11, 2009 I'm trying, testing out a little more 1) I found that for my setup of brands (multi-select checkboxes), I have a show_all option that is checked by default, if I then check a particular brand and filter again. The filter works and only shows the particular brand, but also the show_all options stays checkmarked. 2) the breadcrumb for the brand reads "Array" , the actual value behind the [x] is recorded correctly and functioning properly when I added another filter (by price) and removed the brand filter again, however, doing the same and removing the price filter gives no results. PS. For convenience I've renamed the emtpy manufacturer to Other for now. Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥kymation Posted September 11, 2009 Author Share Posted September 11, 2009 1. Did you unselect the Show All option when you selected a specific brand? That will work because Show All results in an empty test, but the box will remain checked. I should be able to put in a check for this. It will make the Show All selection override all others. Is that what you would expect? 2. That's definitely a bug. I'll take a look at that. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥kymation Posted September 12, 2009 Author Share Posted September 12, 2009 It's now official: Version 1.0 is out. I'm going to keep this thread open for further development/bug reports/suggestions, as long as anybody wants to post here. The new thread will be for support only. Or so I fondly hope. Thanks again to everyone who helped with this. Now go use it and make lots of money. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 12, 2009 Share Posted September 12, 2009 1. Did you unselect the Show All option when you selected a specific brand? That will work because Show All results in an empty test, but the box will remain checked. I should be able to put in a check for this. It will make the Show All selection override all others. Is that what you would expect? 2. That's definitely a bug. I'll take a look at that. Regards Jim 1. Please ignore, I'm unable to reproduce it now, not sure if I just wasn't really awake anymore, or if I did something different 2. Is this already in your stable release ? In the features list, an add-on to easypopulate is suggested, is this what you are thinking of ? It just occurred to me that with the comparison page, you have an easy way of showing all the available specs for a certain category, you might consider a bulk upload option based on a tabular format like that. It might make it less complex if you assume that all the allowed values must have been predefined, and only the actual product specifications are being bulk uploaded. Just a tought ... Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥kymation Posted September 12, 2009 Author Share Posted September 12, 2009 1. No, it was a real bug. It only showed up under certain conditions. I tracked it down and fixed it. 2. Yes, fixed that one too. An EP addon is planned but not yet started. A table like the Comparison table is what I had in mind. I need to do some other things first, so this will have to wait until I have the time. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
JvdP Posted September 12, 2009 Share Posted September 12, 2009 Hi Jim, Thank you for completing this release. I know it was much more work than you ever expected but you did a great job. I am very happy with the result which is even better than I hoped it would be. It was a pleasure to test your work. Regards, Jerome Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 12, 2009 Share Posted September 12, 2009 Hi Jim, in the provided sql file, besides the default charset setting that I think can be dropped, the autoincrement at the end of the table creation is also unnecessary increasing the starting values for the system generated ids. back to testing now ... Carine Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥kymation Posted September 12, 2009 Author Share Posted September 12, 2009 That's right, both of those can go away. Thanks for reporting that. I've fixed the master. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 12, 2009 Share Posted September 12, 2009 Jim, I have a situation that I have a category with subcategories and products mixed at the same level. In the count e.g. the brand filter, I see it being counted, but when selected to view only that brand, I have no product found. On my test system it is under Pots&Pans / Specialties has both products and subcategories. The brand is Cosy&Trendy that has exactly one Theepot that should be listed. I use this construction quite a lot on my site and have adapted my filter code for it. I'm not sure if others do it also like this, or have everything categorised in subcategories and no mix of both. I understand if this would cause an issue, but I was kinda expecting the count to be consistent with the results returned, even if it would mean in this case 0 count, nothign returned ... Carine Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥kymation Posted September 12, 2009 Author Share Posted September 12, 2009 Do you have Filter Subcategories set to True? That should work. I'll have to take another look at the filter code. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 12, 2009 Share Posted September 12, 2009 Do you have Filter Subcategories set to True? That should work. I'll have to take another look at the filter code. Regards Jim Yes, it is set to true. I've enabled pretty much everything Products Specifications Titel Value Actie Products Info Page Subhead Informatie Minimum Spec Products 1 Informatie Show Specification Name True Informatie Show Spec Box Title True Informatie Spec Box Frame Style Tabs Informatie Products Comparison Page Subhead Informatie Minimum Spec Comparison 2 Informatie Comparison Link in Index True Informatie Comparison Row in Table top Informatie Show Comparison True Informatie Comparison in Index False Informatie Comparison Suffix in Header True Informatie Comparison Box Style Simple Informatie Spec Combo Manufacturer 1 Informatie Spec Combo Weight 0 Informatie Spec Combo Price 9 Informatie Spec Combo Model 2 Informatie Spec Combo Image 1 Informatie Spec Combo Name 1 Informatie Spec Combo Buy Now 9 Informatie Products Filters Subhead Informatie Show Filters Module True Informatie Show Filters Box True Informatie Minimum Spec Filter 1 Informatie Filter Subcategories True Informatie Filter Show Count True Informatie Filter No Result none Filter Show Breadcrumb True Informatie Filter Image Width 20 Informatie Filter Image Height 20 Informatie Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 13, 2009 Share Posted September 13, 2009 (edited) Another small issue, 1) changed the setup for the brands filter to list of links, and it is misaligned, I think the inactive brands throw the formatting off. 2) the filter gives no result on a manufacturers name with an & eg villeroy & boch, salt & pepper, it returns one item without a manufacturer assigned - good to know, I need to fix that :) Edited September 13, 2009 by bruyndoncx Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥kymation Posted September 13, 2009 Author Share Posted September 13, 2009 (edited) Another small issue, I changed the setup for the brands filter to list of links, and it is misaligned, I think the inactive brands throw the formatting off. They definitely do. I'll fix that. Thanks for the bug report. I've also been testing your previous bug, and I'm unable to duplicate it. I see the correct counts and the filter returns the products in the subdirectories. Can you give me any more information that might help? I'm unable to even think of anything that could cause this. Edit: Thought of something.Subdirectories only refers to children of the current category. Deeper categories will not be included. Say you have a category widgets that contains a subcategory foo, and foo has a subcategory bar. A filter set while looking at widgets will return all products in widgets and all products in foo, but no products in bar. Is this what's happening? Regards Jim Edited September 13, 2009 by kymation Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 13, 2009 Share Posted September 13, 2009 They definitely do. I'll fix that. Thanks for the bug report. I've also been testing your previous bug, and I'm unable to duplicate it. I see the correct counts and the filter returns the products in the subdirectories. Can you give me any more information that might help? I'm unable to even think of anything that could cause this. Regards Jim Thanks, please note, I edited the previous post while you replied, there is a 2) added. As for the previous bug, I just noticed, it is caused by 2) I reported just here. It is an & problem. Sorry to have wasted your time :blush: Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 13, 2009 Share Posted September 13, 2009 Edit: Thought of something.Subdirectories only refers to children of the current category. Deeper categories will not be included. Say you have a category widgets that contains a subcategory foo, and foo has a subcategory bar. A filter set while looking at widgets will return all products in widgets and all products in foo, but no products in bar. Is this what's happening? That is also happening on my site. Will you consider including all subdirectories in the logic ? Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.