Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically loading second-level Marktplaats categories #3773

Open
Pizzabroodje opened this issue Oct 18, 2023 · 6 comments
Open

Dynamically loading second-level Marktplaats categories #3773

Pizzabroodje opened this issue Oct 18, 2023 · 6 comments
Labels
Feature-Request Issue is a feature request

Comments

@Pizzabroodje
Copy link

Hi!

I want to follow up on this issue: #3613
Which was partly resolved in this pull request: #3761

There's two levels of categories: L1 and L2.
There's just a few L1 categories, but every one of those has a ton of L2 categories.
Hardcoding the L1 categories is fine but there's too many L2 categories to hardcode those too.

Perhaps these can be dynamically loaded though?

L2 categories are returned with a GET request to https://www.marktplaats.nl/lrp/api/search?l1CategoryId=1744 and can be searched using https://www.marktplaats.nl/lrp/api/search?l1CategoryId=1744&l2CategoryId=1745

@Pizzabroodje Pizzabroodje added the Feature-Request Issue is a feature request label Oct 18, 2023
@dvikan
Copy link
Contributor

dvikan commented Oct 19, 2023

dynamically loaded is possible but dont like it.

can we please just have two textboxes for the category numbers? or herhaps for the subcategory?

also i might be overreacting but the frontpage have very much html and loads badly for slower devices.

also annoying to scroll through a gigantic <select>.

the html standards do have an autocomplete option for `<input type=text'> but that would require rssbridge core modification.

@Pizzabroodje
Copy link
Author

dynamically loaded is possible but dont like it.

can we please just have two textboxes for the category numbers? or herhaps for the subcategory?

also i might be overreacting but the frontpage have very much html and loads badly for slower devices.

also annoying to scroll through a gigantic <select>.

the html standards do have an autocomplete option for `<input type=text'> but that would require rssbridge core modification.

Way less annoying to scroll through a gigantic <select> than having to check the ID of a certain category every time. The categories are in alphabetical order so not too hard to find one.

Why do you not like dynamically loading them? Then you'd have two <select>s, one with the main categories, and when you select one there it'll load the sub categories into the second <select>. I see this as being the best possible solution. (And Marktplaats themselves do it in a similar way too: first you select a main category, then you search, and then you can choose a subcategory of the chosen main category with that same select box)

@Park0
Copy link
Contributor

Park0 commented Oct 20, 2023

Something like https://select2.org/ or https://dselect.vercel.app/ would be very nice to have as a option. But it would require some JS libraries. It should not slow the loading of the page that much. Maybe the first time when the libraries are loaded. But after that only when u use it.

In case of Marktplaats it could even integrate both levels. So it only requires one select with a search.

@dvikan
Copy link
Contributor

dvikan commented Nov 10, 2023

how is the current solution working out without the convenience of a second-level cat?

@Park0
Copy link
Contributor

Park0 commented Nov 10, 2023

For me it does not matter that much but for users that are less aware of the technical stuff it would be hard i guess.

@Pizzabroodje
Copy link
Author

how is the current solution working out without the convenience of a second-level cat?

I've made a version of my own using hard coded categories. Haven't used marktplaats recently though, only to sell stuff. But when I will have to look for something again I will use that.

Even if you have the knowledge of how to get the category id's it's very nice to be able to get it directly if you search in different categories each time, so you don't have to get the id manually each time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Request Issue is a feature request
Projects
None yet
Development

No branches or pull requests

3 participants