♥kymation Posted July 28, 2015 Author Share Posted July 28, 2015 I wish I knew what you are talking about. Where are you seeing all languages at once? What are you trying to do with this information? 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 July 28, 2015 Share Posted July 28, 2015 I wish I knew what you are talking about. Where are you seeing all languages at once? What are you trying to do with this information? Regards Jim Jim, when you edit a product - you have to supply each value for each language 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 July 28, 2015 Author Share Posted July 28, 2015 Now I understand what you are saying. It should be possible to do this with JavaScript, but I have never done it, and I don't know of anybody who has. 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 July 28, 2015 Share Posted July 28, 2015 I have been troubled by this issue too, but my lists are not that long ... I looked at the code and found that 1) the specification_values_id is the same for the different values in the different langues 2) this is currently not part of the product edit screen, but pretty sure that is easy to add I have found a fiddle that demonstrates a javascript solution to sync radio buttons, I think using data-sync="specification_values_id" does the trick for radio buttons and probably checkboxes at the same time as a specification_values_id is specific to a specification id (stored in specification_values) http://jsfiddle.net/cTQeJ/2/ So it seems pretty easy to implement this. It is after midnight here, perhaps someone else has more hours left in their day :- 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 July 29, 2015 Share Posted July 29, 2015 Hmm couldn't sleep :D Here is what I've done on my admin to get this working for radio buttons and checkboxes, (NOT for selection fiellds) file admin/includes/modules/product_specifications_input in mine around line 80 find this section added sv.specification_values_id to the first line added 'data-sync' => $values_data['specification_values_id'], to the values_select_array $values_query_raw = "select svd.specification_value, sv.specification_values_id from " . TABLE_SPECIFICATIONS_VALUES . " sv, " . TABLE_SPECIFICATIONS_VALUES_DESCRIPTION . " svd where svd.specification_values_id = sv.specification_values_id and sv.specifications_id = '" . $id . "' and svd.language_id = '" . (int) $languages[$i]['id'] . "' order by sv.value_sort_order, svd.specification_value "; // print $values_query_raw . "<br>\n"; $values_query = tep_db_query ($values_query_raw); $values_select_array = array(); if (tep_db_num_rows ($values_query) > 0) { while ($values_data = tep_db_fetch_array ($values_query) ) { if ($values_data['specification_value'] != '') { $values_select_array[] = array ('id' => $values_data['specification_value'], 'data-sync' => $values_data['specification_values_id'], 'text' => $values_data['specification_value'] ); } } // while ($values_data echo tep_get_values_menu ($enter_values, $values_select_array, 'products_specification[' . $id . '][' . $languages[$i]['id'] . ']', $products_specification); Next change the tep_get_values_menu to output the data-sync attribute file admin/includes/functions/products_specifications I'm assuming that this won't have any side effects, if it does have side effects another function needs to be created and called in the above code block. the default radio field and checkbox functions won't work, so explicitly spelled out what it needs to be, so the changes are only in the section just below the commented out tep_draw lines case 'radio': foreach ($values_select_array as $value) { $checked = ($value['id'] == $specification_value) ? true : false; // $box_text .= tep_draw_radio_field ($specification_name, $value['id'], $checked) . ' ' . $value['text']; $box_text .= '<input type="radio" name="' . tep_output_string($specification_name) . '"'; if (tep_not_null($value['id'])) $box_text .= ' value="' . tep_output_string($value['id']) . '"'; if (tep_not_null($value['data-sync'])) $box_text .= ' data-sync="' . tep_output_string($value['data-sync']) . '"'; if($checked == true) $box_text .= ' checked="checked"'; $box_text .= '> ' . $value['text'].'<br>' . "\n"; } break; case 'checkbox': $checkbox_id = 0; foreach ($values_select_array as $value) { $checked = false; if (is_array ($specification_value) ) { foreach ($specification_value as $spec) { if ($spec['id'] == $value['id']) { $checked = true; break; } } } else { $checked = ($value['id'] == $specification_value[$checkbox_id] ) ? true : false; } // if (is_array ... else ... // $box_text .= tep_draw_checkbox_field ($specification_name . '[' . $checkbox_id . ']', $value['id'], $checked) . ' ' . $value['text']; $box_text .= '<input type="checkbox" name="' . tep_output_string($specification_name. '[' . $checkbox_id . ']') . '"'; if (tep_not_null($value['id'])) $box_text .= ' value="' . tep_output_string($value['id']) . '"'; if (tep_not_null($value['data-sync'])) $box_text .= ' data-sync="' . tep_output_string($value['data-sync']) . '"'; if($checked == true) $box_text .= ' checked="checked"'; $box_text .= '> ' . $value['text'].'<br>' . "\n"; $checkbox_id++; } // foreach ($values_select_array break; lastly, add the javascript in the admin/categories.php I added it just below the call for inclusion of the products_specifications_input file <?php // Products Specifications require (DIR_WS_MODULES . FILENAME_PRODUCTS_SPECIFICATIONS_INPUT); ?> <script> var $radios = $('input[type=radio][data-sync]'); $radios.change(function() { $radios.filter('[data-sync="' + $(this).attr('data-sync') + '"]').attr('checked', true); }); var $checks = $('input[type=checkbox][data-sync]'); $checks.change(function() { $checks.filter('[data-sync="' + $(this).attr('data-sync') + '"]').attr('checked', $(this).attr('checked')); }); </script> 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...
Denzel Posted July 29, 2015 Share Posted July 29, 2015 First of all: Im very impressed, that you both take care of my problems so quickly :thumbsup: :D At second goes the biggest THANK YOU to Carine (Ive robbed her sleep o:) ) With your code you save me a lot of time ! Maybe it really was too late yesterday... I found a little mistake in the script in admin/categories.php: <script> var $radios = $('input[type=radio][data-sync]'); $radios.change(function() { $radios.filter('[data-sync="' + $(this).attr('data-sync') + '"]').prop('checked', true); }); var $checks = $('input[type=checkbox][data-sync]'); $checks.change(function() { $checks.filter('[data-sync="' + $(this).attr('data-sync') + '"]').prop('checked', $(this).prop('checked')); }); </script> With this corrections it did exactly what I want (w00t) :thumbsup: Once again: Thank you very much ! SEE YA ! Denzel. bruyndoncx 1 Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted July 29, 2015 Share Posted July 29, 2015 I'm not sure about the mistake, when I used prop my debugger complained. Not 100% sure on how/what exactly when to use prop vs attr - tricky one. I changed to attr and it worked, so I was happy about it :) 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...
Denzel Posted July 29, 2015 Share Posted July 29, 2015 Hi Carine ! With attr in the sourcecode only the radiobuttons changed once together. But nothing other happened. So I changed to prop and everything goes :D Maybe the php version is interessting for this issue ? Got 5.3.15 on my server. SEE YA ! Denzel. Quote Link to comment Share on other sites More sharing options...
Psytanium Posted August 14, 2015 Share Posted August 14, 2015 Hello, I have a question. I applied a filter named "Generation" to the category Processors (CPU) The values are intel i3 / intel i5 / intel i7 When i go to the backend to edit a CPU product i can see the filter drop down with i3 selected by default. is there a way to leave a product with Null value ? because not all processors belong to i3 or i5 or i7 I modified the files admin/includes/modules/products_specifications_input.php I added under if ($values_data['specification_value'] != '') { this line $values_select_array[0] = array('id' => '0', 'text' => 'None'); Seems working fine. Now by default, I have 'None' as a first option in the backend, without any changes in the front end. But i need the author advice, I'm afraid this will lead to some problems. Do you think this is safe ? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted August 14, 2015 Author Share Posted August 14, 2015 Why not just add a value of None to the list of values for this Specification? 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...
Psytanium Posted August 14, 2015 Share Posted August 14, 2015 @@kymation if i add it as a value it will appear in the front end filter, then i will have: Show All None value1 value2... now i can exclude a product from the filter. what do you think ? Quote Link to comment Share on other sites More sharing options...
volupp Posted September 2, 2015 Share Posted September 2, 2015 (edited) Hi @kymation, thanks for this great addon. As you can see i have some problems with your addon. The specifications don't show in the bm_products_filter.php and the products_filter.php.In the backendarea and in the productsite everything ist fine.Please take a look at my sites:http://www.erotikshop-liebe.de/products_filter.php?cPath=10&sort=products_name(on the top and in the box no specifications are showing)andhttp://www.erotikshop-liebe.de/testkategorie(on the top and in the box no specifications are showing)andhttp://www.erotikshop-liebe.de/testkategorie/analzapfen.html(on products-site under "Merkmale" you will see my specifications)The box is only showing after setting the "Minimum Spec Filter" to value 0.I hope you know this problem because i need urgently the "specification-function".PHP-Version: 5.6.10, MySQL-Version: 5.5, Oscommerce: 2.3.4, Products Specification-Addon: 1.1.11 without "products tabs-function"Many thanks Edited September 2, 2015 by volupp Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 2, 2015 Share Posted September 2, 2015 must be something todo with your products if the backside works and the front doesn't (w00t) - WAD (WorkingAsDesigned) 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 2, 2015 Author Share Posted September 2, 2015 It sounds like you don't have any products that meet the filter criteria. Check that you have products in that category and that the values for the Specifications are filled in for those products. 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...
volupp Posted September 3, 2015 Share Posted September 3, 2015 Hi Jim,thanks for your answer. I checked everything but the problem is always still the same.Do you have any other ideas?Are screenshots helpfully?Best Greetings and thanks for your helping. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 3, 2015 Author Share Posted September 3, 2015 At least some of those filters should work. For example, your price filter: do you have the Price specification linked to the existing Final Price field? It needs that link to find products to match the filter criteria. 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...
volupp Posted September 3, 2015 Share Posted September 3, 2015 (edited) Hi Jim, now i checked the functions of our great addon. I forgot to set the filters. :-I have only one last question:The counter in the box and on the top are differently. Do you have any ideas? Edited September 3, 2015 by volupp Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 3, 2015 Author Share Posted September 3, 2015 It's the Specification Name for that specification. 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...
volupp Posted September 3, 2015 Share Posted September 3, 2015 Hi Jim, i promise you this is my last question:in page http://www.erotikshop-liebe.de/products_filter.phpi get the error message: Fatal error: Call to a member function getFilterCount() on null in /erorsvbu/www.eroversandhaus.de/neu/includes/modules/products_filter.php on line 87 Any Idea? Quote Link to comment Share on other sites More sharing options...
volupp Posted September 3, 2015 Share Posted September 3, 2015 hi Jim, Everything is fine. This Problem was a problem by myself too. Thanks you very much for your helping and this great addon. Best Greetings Volker Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 3, 2015 Author Share Posted September 3, 2015 I have no idea how you got that error. Care to share, for the benefit of future readers? 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...
Frisser Posted November 12, 2015 Share Posted November 12, 2015 The filter works great - but only if I select 5 options (colour blue, size XXL, brande Y etc.), if I select a 6th selection it becomes very slow (high load on my MySQL server). It's always the 6th (and later off course). I've tried to optimize the code (not really necessary) but can't find why the sixth selection (and later) is a problem. Anyone any idea why this is? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 12, 2015 Author Share Posted November 12, 2015 All filters place an extra load on the database server, since they create the need for a temporary table. The more filters you add, the worse the load. The number of products will also increase the size of the temp table. I'm going to guess that the load of six filters is hitting a limit on your database server; probably a memory limit. If I'm right, only increasing the memory available to the database process will help. I've used filters on various websites many times, and I can't remember ever using more that 2 or 3. I doubt very many customers are going to bother to set 6. 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 November 12, 2015 Share Posted November 12, 2015 I managed to set 8 with no difference in time. But my result set has become small along the way http://www.keukenlust.be<<remove these spaces> /products_filter.php?cPath=60_51_250&f60=Fissler&sort=3&f167=Original%20Pro%20Collection&f58=20-24&f59=Inductie&f78=Kookpot&f170=25-50&f53=150-200&f95=3-4.5 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...
centrman Posted March 13, 2016 Share Posted March 13, 2016 I have question regarding filter by price (high to low and low to high). I want make the price filter connected with current filter that i have input in database so every filter depand one with another.Let say i choose filter by colour and in colour filter, it's can filter by price (high to low and low to high).Do it's possible to create directly in admin panel? Current i only think it's possible via range ($0 - $100 and so on). Thanks. Quote 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.