solidus

https://github.com/solidusio/solidus

Ruby

🛒 Solidus, the open-source eCommerce framework for industry trailblazers.

Spree::Promotion::Rules::FirstRepeatPurchaseSince#eligible?

This is never eligible if the order does not have a user, and that user does not have any previous completed orders.

This is eligible if the user's most recently completed order is more than the preferred days ago

Source | Google | Stack overflow

Edit

git clone [email protected]:solidusio/solidus.git

cd solidus

open legacy_promotions/app/models/spree/promotion/rules/first_repeat_purchase_since.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Spree--Promotion--Rules--FirstRepeatPurchaseSince-eligible--for-pr


# Commit to git

git add legacy_promotions/app/models/spree/promotion/rules/first_repeat_purchase_since.rbgit commit -m "better docs for Spree::Promotion::Rules::FirstRepeatPurchaseSince#eligible?"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Spree--Promotion--Rules--FirstRepeatPurchaseSince-eligible--for-pr

hub pull-request


# Celebrate!