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

Add store promotion rule #2552

Merged
merged 1 commit into from
Feb 24, 2018
Merged

Add store promotion rule #2552

merged 1 commit into from
Feb 24, 2018

Conversation

adammathys
Copy link
Contributor

@adammathys adammathys commented Feb 2, 2018

Introduces a new promotion rule (originally part of solidus_multi_domain) that allows for scoping promotions to specific stores.

store-promo-rule

promotable.is_a?(Spree::Order)
end

def eligible?(order, options = {})

Choose a reason for hiding this comment

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

Unused method argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used.

Introduces a new promotion rule (originally part of
`solidus_multi_domain`) that allows for scoping promotions to specific
stores.
end

def eligible?(order, _options = {})
stores.none? || stores.include?(order.store)
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems really weird to check stores.none? here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a little odd. I'm not sure why it was originally written this way in solidus_multi_domain, but I figured it would be best to keep it the same.

@tvdeyen tvdeyen merged commit 44335f6 into solidusio:master Feb 24, 2018
@tvdeyen
Copy link
Member

tvdeyen commented Feb 24, 2018

Thanks

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.

5 participants