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

A promotion without actions should log errors #3365

Closed
wants to merge 1 commit into from

Conversation

johnny243
Copy link

Description

The following PR fixes #2777

When a customer tries to apply a promotion coupon code that has no actions, the following will occur:

  • They should get the The coupon code you entered doesn't exist. error message
  • A warning is logged mentioning said coupon

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some change requests, can you please also rebase and squash commit in a single one with a more descriptive message and description? Thanks for your contribution!

core/app/models/spree/promotion_handler/coupon.rb Outdated Show resolved Hide resolved
guides/source/users/promotions/promotion-actions.html.md Outdated Show resolved Hide resolved
Logs a warning when a customer tries to use a coupon code from a
promotion that has no actions.
@spaghetticode
Copy link
Member

@johnny243 is this PR still WIP?

I am asking because the current implementation does not reflect what you wrote on the issue at #2777 (comment)... curious to know if you're interested in going that way... thank you 😄

@johnny243
Copy link
Author

@johnny243 is this PR still WIP?

I am asking because the current implementation does not reflect what you wrote on the issue at #2777 (comment)... curious to know if you're interested in going that way... thank you

@spaghetticode I would like to go that way, but I was waiting on some kind of approval/feedback/ideas to make sure I was implementing something that made sense.

I will get back on this issue today. Thanks for following up!

@aldesantis
Copy link
Member

This seems to be similar to #3596.

@seand7565
Copy link
Contributor

Adding more info to this - #2777 initially proposed logging an error (which this PR handles) but it seems the discussion has since been moved elsewhere (for the reason that admin users rarely have access to logs - which makes sense to me).

#3596 handles the issue in line with the new discussion from #2777

@kennyadsl
Copy link
Member

Closed with #3749

@kennyadsl kennyadsl closed this Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A promotion without actions should log errors
5 participants