Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Filter Cart Types in CSR UI (Commerce 13.6.0)

Vote:
 

In the CSR UI it's showing all of the cart types but I only want to show the ones that are actual carts rather than the one used for storing favourites.

Is there a config/code option to filter these?

#206725
Aug 29, 2019 10:51
Vote:
 

By " one used for storing favourites" did you mean wishlists? because right now it excludes that.

Except if you are using different name for wishlists ...

#206726
Aug 29, 2019 10:56
Vote:
 

Yes we have a different name as we might end up with multiple "wishlists" they are used to store favourite items rather than wishlists.

We have the episerver:ExpiredCartsRemovalJobExcludedCartName set up to change the removal of these as documented, is there no way of configuring the CSR UI to hide ones with custom names?

#206728
Aug 29, 2019 10:59
Vote:
 

No, CSR UI is using the default one, which, by the way, Wishlist.

Just to be clear, you have Wishlist, and another cart (with different name) for "favourite items"?

#206729
Aug 29, 2019 11:03
Vote:
 

Okay no worries. Yes, it's something I raised previously about episerver:ExpiredCartsRemovalJobExcludedCartName on supporting one name as an issue.

As the documentation says the carts are just lists managed by the key name it makes sense to be that each key would map to their intention like any collection of dictionaries.

E.g if you have Favourite Courses, Favourite Products, Wishlists any other non cart item you'd separate them by the cart name for loading as that's what the commerce API supports. Else you'd have to jam them all in one wishlist and then load them all out and filter them which seems couter intuative.

Unless I'm missing something in the Cart system for this?

#206732
Aug 29, 2019 11:20
Vote:
 

I'm not worried to start with :). But I understand the need for having ability to define "excluded" cart names. I will look into that if time permits  

#206738
Aug 29, 2019 11:55
Marcus B - Aug 30, 2019 6:34
you wouldn't last very long over here in Aus, Q - we use the phrase 'No worries' like literally every other sentence.

But nobody ever 'throws another shrimp on the barbie' (just so you know, cobber!)
- Aug 30, 2019 9:15
Yeah us Pommies use it a fair bit too. Fair Dinkum eh
Marcus B - Aug 30, 2019 9:20
You Poms speak Aussie? Whatever next? I don't know if this link will work but if it does you should take a test https://nomadsworld.com/wp-content/uploads/2017/08/aussie_lingo_test_commons.jpg
- Aug 30, 2019 9:24
Haha well I do as I've watched OzzyMan for many many years and he does a regular Aussie lingo test to big celebs. I think on that list I could do at least 1/2 if not more . We use Noggin, Barbie, Gander, Bonza a fair bit too. I think in the age of movies and television being everywhere on steams it's all diluting. Like I love Glitch which is a bloody good Aussie drama
Marcus B - Aug 30, 2019 9:28
Good Aussie TV? a massive contradiction! I'll have to have a gander at these shows (see what i did there?)
- Aug 30, 2019 9:30
Well a lot of your stars have become mega movie stars now so there must be something going on right. Then again maybe I'm just being a drongo
Marcus B - Aug 30, 2019 9:30
X-D
Vote:
 

Thanks Quan :-) 

#206739
Aug 29, 2019 11:59
Vote:
 

Just a FYI: I made a POC that is kind of working. It's tricky to define the cart names to ignore, however. I'm currently going with a setting named episerver:Commerce.WishListCartNames but that might change. Introducing a service like ICartFilter is also an option but where to put it (within CSR UI, which is technically not a public API, or in a more "core" project) is also complicated. That said, when we do something there is a lot to consider :) 

#206821
Aug 30, 2019 13:25
Vote:
 

Thanks Quan, will this apply to code that was using episerver:ExpiredCartsRemovalJobExcludedCartName as well? Obviously we don't want wishlists removed and currently that propty only supports a single name.

I guess that's one of the things to consider with all of this.

Thanks for investigating :-)

#206822
Aug 30, 2019 13:27
Vote:
 

Yes I also made changes to that so you can define multiple names with semicolon separator. The idea is to check for the new "setting", if there is none then fall back to the old setting for removing expired carts. But that needs some considerations... (out of my head, "should we imply that "wishlist" should not be removed or managed?")  

#206823
Aug 30, 2019 13:32
Vote:
 

I think leaving wishlist as the default makes sense as for simple processes it's going to be often used plus when upgrading users won't need to implement any new settings but I like having the comma separated setting makes it easy to set these up. Having it with the CSR UI and expired carts I think should catch everything a multi (non basket) cart would need to handle.

Nice work :-)

#206824
Aug 30, 2019 13:36
Vote:
 

Do you think there needs to be a checkbox in the CSR UI to "Show hidden carts"? You might still want to delete these or view them in some scenarios?

#206825
Aug 30, 2019 13:37
Vote:
 

Well that's one thing to consider (which will involve UX decsions at least). I'll probably leave that for now.  

#206826
Aug 30, 2019 13:39
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.