Jump to content

Product filter error


Christopher Short

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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);
 
Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...