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

[4.x]: Discount performance in CP #3347

Closed
ragnarfrosti opened this issue Dec 5, 2023 · 2 comments
Closed

[4.x]: Discount performance in CP #3347

ragnarfrosti opened this issue Dec 5, 2023 · 2 comments
Assignees
Labels
bug commerce4 Issues related to Commerce v4

Comments

@ragnarfrosti
Copy link

What happened?

I have a couple of points about the handling of Discounts in the Control Panel:

1) The Discounts overview

The Commerce > Promotions > Discounts view has very poor performance when there are many discounts in the system. This problem existed in Commerce 3 and is still an issue in Commerce 4. Our client has ~16.000 discounts in the system at the moment and the Discounts view lists all discounts on the same page which makes the browser either crash or lock up for a couple of minutes.

We were forced to build a custom plugin for the customer with pagination search/filter to be able to list and handle the discounts since that is not possible in Craft with a large number of discounts.

Screenshot 2023-12-05 at 10 39 12

Being able to handle all discounts should work in Commerce out of the box, and some filter/searching would also be a nice feature.

2) Coupons on a Discount: Generating codes

I love that you can add multiple coupons on a single discount, that is a huge step forward from Commerce 3. But why is there a limit of only creating 400 coupons on a single discount?

Screenshot 2023-12-05 at 10 46 11

Is this a Craft limitation because it can't handle calculating the order adjustments when there are too many coupons on a discount or is it because of something else?

In Commerce 3 our customers often create 5000 unique coupons at each time and it would be nice to be able to add ~5000 codes on each discount instead of creating new discounts for each code or needing to split it between multiple discounts.

Importing codes to a discount would also be a nice to-have function ;)

Running the code generator twice with 400 codes each is possible but 800 rows in the table messes up the browser performance so this would need some kind of pagination as well.

3) Coupons on a Discount: Administration of codes

It is great that you can generate multiple codes on a single discount but if you create 100 codes on a discount there is no way to export/copy a list of the codes so you would need to copy each code manually to send it to the customer or to export it to another system.

And same thing applies to the "Max uses"-field. There is no way to add a maximum use for all the codes at the same time (not even when creating those) so this requires manually changing the "max use" for one code at a time.

We've extended the Discount view with a basic "Copy codes"-button below the table that copies all the codes to the clipboard and a field that helps update the maximum use for all the codes at the same time. But this is something that should be there out of the box in my opinion.

Screenshot 2023-12-05 at 10 58 07

Our client uses discounts quite a lot for different purposes but at the moment the discount part of Craft is not up to standard and hasn't been for quite some time, so I hope that this is something that you can improve pretty soon. The functionality for using Discounts and codes is already in place but it just seems that you have disregarded the idea of people having more than just a few codes. That can't be the real scenario for a larger site.

Unfortunately, it also makes it hard for us to sell Craft Commerce as a great platform for our customers when the business expands.

How does your timeline look for the above issues?

Craft CMS version

4.5.11.1

Craft Commerce version

4.3.2

PHP version

8.1

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@ragnarfrosti ragnarfrosti added commerce4 Issues related to Commerce v4 bug labels Dec 5, 2023
@lukeholder
Copy link
Member

@ragnarfrosti Thanks for the information and feedback.

We have spent some time as a team looking into improving the performance of discount listings and coupon listings, and have some solutions in the works that we will share here soon. Thanks.

@nfourtythree
Copy link
Contributor

Hi @ragnarfrosti

Thank you for raising this.

Commerce 4.4.0 has just been released which includes improvements to the coupons table as well as a paginated and searchable index for discounts.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce4 Issues related to Commerce v4
Projects
None yet
Development

No branches or pull requests

3 participants