Christopher Short Posted November 11, 2013 Share Posted November 11, 2013 When you filter products by category in the admin panel and the select a leter filter, it does not update to a new category filter without clicking on the produsts tab again. (click product, filter category,select a leter, then try to change to a different category). It does this only when the new category doesn't have a product with the letter you had selected first. Any fixes yet? Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 11, 2013 Share Posted November 11, 2013 There appears to be two independent filters in the Product Inventory listing: * by Category or Any * by first character of the product Name (or code) or Any. Changing one does not change the other. What I would like to see is that the other filter be more representative of the result. For example: Apples in Fruit Carrots in Vegetable If I select category Fruit, I do not expect to see C in the Name filter. If I select name C, I do not expect to see Fruit in the Category Filter. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted November 12, 2013 Author Share Posted November 12, 2013 There appears to be two independent filters in the Product Inventory listing: * by Category or Any * by first character of the product Name (or code) or Any. Changing one does not change the other. What I would like to see is that the other filter be more representative of the result. For example: Apples in Fruit Carrots in Vegetable If I select category Fruit, I do not expect to see C in the Name filter. If I select name C, I do not expect to see Fruit in the Category Filter. Is this supposed to be a question or just a comment? Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 12, 2013 Share Posted November 12, 2013 It's an invitation to engage in a conversation. I think that what I described as happening in my installation is not what you are experiencing. Or is it? I assume you assert that what you are experiencing is a bug -- and that it's an obvious bug. My reply suggests maybe it is not a bug, but rather an intentional programming decision -- one that I disagree with. I've expressed what I would like to experience. Please let us know what you think would be the better approach to using these filters. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted November 12, 2013 Author Share Posted November 12, 2013 It's an invitation to engage in a conversation. I think that what I described as happening in my installation is not what you are experiencing. Or is it? I assume you assert that what you are experiencing is a bug -- and that it's an obvious bug. My reply suggests maybe it is not a bug, but rather an intentional programming decision -- one that I disagree with. I've expressed what I would like to experience. Please let us know what you think would be the better approach to using these filters. I think the filter should reset from letter selection when you change category filters. That would get rid of the nothing found message. It isn't like you can manually clear the filter out either without clicking the product tab and fully starting over. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 12, 2013 Share Posted November 12, 2013 I think I understand what you are saying. You should also look for Any to the far, far right of the list of letters, and Any as the top choice in the drop-down selector. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted November 12, 2013 Author Share Posted November 12, 2013 I think I understand what you are saying. You should also look for Any to the far, far right of the list of letters, and Any as the top choice in the drop-down selector. It doesn't work. I tried that. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 12, 2013 Share Posted November 12, 2013 According to your first post: 1. Filter by a category - let's say Fruit. CubeCart will automatically submit the form and the resulting list will contain only those products in Fruit -- Apples. The list of letters at the top of the list, however, still has A, C and Any. 2. Select a letter - let's say C (even though we know there are no products in this current list that start with C). The letter C is a link that submits the form and the resulting list is empty. CubeCart displays a red banner that says 'No products start with 'C'. Any has now moved to the far left above the table and there are no other letters. 3. Then try to change to a different category - let's say Any in the drop-down. We are still filtering on C, however. CubeCart will automatically submit the form and the resulting list will contain only those products that start with C, which may be found in any category. Works for me. (I get all the letters and Any above the table.) "I think the filter should reset when you from letter selection when you change category filters." (This sentence may need fixing -- it's confusing.) Are you wanting only the category filter to work, or only the letter filter to work, but never both at the same time? Are you also saying that clicking Any, then choosing Any from the drop-down, still returns an empty list and red banner? Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted November 12, 2013 Author Share Posted November 12, 2013 According to your first post: 1. Filter by a category - let's say Fruit. CubeCart will automatically submit the form and the resulting list will contain only those products in Fruit -- Apples. The list of letters at the top of the list, however, still has A, C and Any. 2. Select a letter - let's say C (even though we know there are no products in this current list that start with C). The letter C is a link that submits the form and the resulting list is empty. CubeCart displays a red banner that says 'No products start with 'C'. Any has now moved to the far left above the table and there are no other letters. 3. Then try to change to a different category - let's say Any in the drop-down. We are still filtering on C, however. CubeCart will automatically submit the form and the resulting list will contain only those products that start with C, which may be found in any category. Works for me. (I get all the letters and Any above the table.) "I think the filter should reset when you from letter selection when you change category filters." (This sentence may need fixing -- it's confusing.) Are you wanting only the category filter to work, or only the letter filter to work, but never both at the same time? Are you also saying that clicking Any, then choosing Any from the drop-down, still returns an empty list and red banner? I fixed the typo. If I had that setup, when I get the red banner for clicking on C, then click on any, i still have the red banner. It doesn't update. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 12, 2013 Share Posted November 12, 2013 Please tell us what the URL that is the Any link looks like (only the parts after the admin.php part). It should look like: ?_g=products&node=index&sort[updated]=DESC Please make this change to the Store Settings, Advanced tab, Enable Caching: Disabled. Do the results of clicking Any change from before? Please let us know the exact version of CubeCart you are running. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted November 12, 2013 Author Share Posted November 12, 2013 Please tell us what the URL that is the Any link looks like (only the parts after the admin.php part). It should look like: ?_g=products&node=index&sort[updated]=DESC Please make this change to the Store Settings, Advanced tab, Enable Caching: Disabled. Do the results of clicking Any change from before? Please let us know the exact version of CubeCart you are running. Please tell us what the URL that is the Any link looks like (only the parts after the admin.php part). It should look like: ?_g=products&node=index&sort[updated]=DESC Please make this change to the Store Settings, Advanced tab, Enable Caching: Disabled. Do the results of clicking Any change from before? Please let us know the exact version of CubeCart you are running. store/admin.php?_g=products&cat_id=27&sort%5Bupdated%5D=DESC&char=G No change by enabling it. I have the current v5. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 12, 2013 Share Posted November 12, 2013 store/admin.php?_g=products&cat_id=27&sort%5Bupdated%5D=DESC&char=G The Any link should not have either a page or char key in the querystring. Your Any link still has char. No change by enabling it. Actually, I wanted you to disable it. Regardless, I think we found the true symptom. In the file /admin/sources/products.index.inc.php, near lines 1230-1232, verify that your code looks exactly like this: if ($int) $char_list_array = array_merge(array('0' => '#'),$char_list_array); $char_link = currentPage(array('char','page')); $GLOBALS['smarty']->assign('SORT_CHARS_RESET_LINK', $char_link); Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted November 12, 2013 Author Share Posted November 12, 2013 store/admin.php?_g=products&cat_id=27&sort%5Bupdated%5D=DESC&char=G The Any link should not have either a page or char key in the querystring. Your Any link still has char. No change by enabling it. Actually, I wanted you to disable it. Regardless, I think we found the true symptom. In the file /admin/sources/products.index.inc.php, near lines 1230-1232, verify that your code looks exactly like this: if ($int) $char_list_array = array_merge(array('0' => '#'),$char_list_array); $char_link = currentPage(array('char','page')); $GLOBALS['smarty']->assign('SORT_CHARS_RESET_LINK', $char_link); Diabled again. Code is exact. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 12, 2013 Share Posted November 12, 2013 (I'll have to pick this up tomorrow.) I'll have you add some diagnostic code to this file, as well as /includes/functions.inc.php, the currentPage() function. 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.