evershopcommerce / evershop

🛍️ NodeJS E-commerce Platform
https://evershop.io/
GNU General Public License v3.0
4.49k stars 1.24k forks source link

[BUG] The product registration does not list all child categories #630

Open leandrosantoss opened 2 months ago

leandrosantoss commented 2 months ago

Describe the bug The product registration does not list all child categories

Screenshots image

image

image This child category was not found in the category tree in product registration

image Clicking to expand "Tabacaria"

In the Data Base the category "Tabacaria" has 75 rows image

Background (please complete the following information):

leandrosantoss commented 2 months ago

Hi @treoden I believe it is the same problem that happens in GraphQL. The query is limited and I need to send the "limit" in the filter for it to work.

leandrosantoss commented 2 months ago

@treoden this is a Critical bug for me

image

Some change was made and it is limiting the system. Here it only lists 20, and in the database I have 114.

image

leandrosantoss commented 1 month ago

@treoden news about this? This is a critical bug

omarsoufiane commented 3 weeks ago

I can help by putting a bounty for solving this issue.

bountyhub-bot commented 3 weeks ago

🚀 Bounty Alert!

💰 A bounty of $30.00 has been created by omarsoufiane on BountyHub for this issue.

🔗 Claim this bounty by submitting a pull request that solves this issue!

Good luck, and happy coding! 💻

rahat2134 commented 3 weeks ago

@leandrosantoss I understand the bug where only 20 child categories are being displayed in the product registration instead of all 75 categories from the database. This appears to be a pagination/limit issue in the GraphQL query. The solution would involve modifying the GraphQL resolver to either remove the default pagination limit or implement proper pagination for the category tree. I'd like to work on this issue. Could you please assign it to me?

leandrosantoss commented 3 weeks ago

This pull request does not solve this problem :(

https://github.com/evershopcommerce/evershop/pull/654

risjai commented 3 weeks ago

@leandrosantoss check this out for the fix : https://github.com/evershopcommerce/evershop/pull/655 I have attached the video for the working solution. Tested it on my system, works well.

https://github.com/user-attachments/assets/1a853d2a-64af-40fe-aa45-19d07ae81a18

Couple of things :

Ping me on discord if you have any doubts.

risjai commented 2 weeks ago

@omarsoufiane @leandrosantoss can we conclude this?

omarsoufiane commented 2 weeks ago

@risjai the issue is about child categories, not main categories, so your pr doesn't fix it ( judging from the code because I didn't test it yet)

leandrosantoss commented 2 weeks ago

Can I test in my environment after generating a new release

risjai commented 2 weeks ago

This fixes the child categories problem as well. Now I feel, I should have made a video directly of child categories but anyways, will wait for Leonardo to test it himself. Leonardo, did you know the problem exists today with parent categories as well?

On Tue, 5 Nov 2024 at 11:50 PM, Leandro Pereira dos Santos < @.***> wrote:

Can I test in my environment after generating a new release

— Reply to this email directly, view it on GitHub https://github.com/evershopcommerce/evershop/issues/630#issuecomment-2457872480, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIFQEPZ2ZWQB3KJUEUQMA7LZ7ED7VAVCNFSM6AAAAABOMGA7N2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJXHA3TENBYGA . You are receiving this because you were mentioned.Message ID: @.***>

risjai commented 1 week ago

@leandrosantoss Did you test this out?

risjai commented 2 days ago

@omarsoufiane how do we conclude this?

omarsoufiane commented 2 days ago

@risjai the PR isn't merged, and I will test it once it's merged