Giter Club home page Giter Club logo

little-esty-shop's People

Contributors

alejandrolopez1992 avatar brianzanti avatar cjsim89 avatar jamisonordway avatar jcbeldo avatar megstang avatar mikedao avatar reidsmiller avatar scottalexandra avatar smcphee19 avatar timomitchel avatar

little-esty-shop's Issues

Holidays API

As a merchant
When I visit the discounts index page
I see a section with a header of "Upcoming Holidays"
In this section the name and date of the next 3 upcoming US holidays are listed.

Use the Next Public Holidays Endpoint in the Nager.Date API

View a Holiday Discount

As a merchant (if I have created a holiday discount for a specific holiday),
when I visit the discount index page,
within the Upcoming Holidays section I should not see the button to 'create a discount' next to that holiday,
instead I should see a view discount link.
When I click the link I am taken to the discount show page for that holiday discount.

Merchant Bulk Discount Create

2: Merchant Bulk Discount Create

As a merchant
When I visit my bulk discounts index
Then I see a link to create a new discount
When I click this link
Then I am taken to a new page where I see a form to add a new bulk discount
When I fill in the form with valid data
Then I am redirected back to the bulk discount index
And I see my new bulk discount listed

Merchant Bulk Discount Edit

As a merchant
When I visit my bulk discount show page
Then I see a link to edit the bulk discount
When I click this link
Then I am taken to a new page with a form to edit the discount
And I see that the discounts current attributes are pre-poluated in the form
When I change any/all of the information and click submit
Then I am redirected to the bulk discount's show page
And I see that the discount's attributes have been updated

Merchant Invoice Show Page: Total Revenue and Discounted Revenue

As a merchant
When I visit my merchant invoice show page
Then I see the total revenue for my merchant from this invoice (not including discounts)
And I see the total discounted revenue for my merchant from this invoice which includes bulk discounts in the calculation

Merchant Bulk Discounts Index

1: Merchant Bulk Discounts Index

As a merchant
When I visit my merchant dashboard
Then I see a link to view all my discounts
When I click this link
Then I am taken to my bulk discounts index page
Where I see all of my bulk discounts including their
percentage discount and quantity thresholds
And each bulk discount listed includes a link to its show page

Bulk Discounts Migrations and Table Setup

Bulk Discounts
A “bulk discount” is a discount based on the quantity of items the customer is buying, for example “20% off orders of 10 or more items”. Bulk Discounts are subject to the following criteria:

Bulk discounts should have a percentage discount as well as a quantity threshold
Bulk discounts should belong to a Merchant
A Bulk discount is eligible for all items that the merchant sells. Bulk discounts for one merchant should not affect items sold by another merchant
Merchants can have multiple bulk discounts
If an item meets the quantity threshold for multiple bulk discounts, only the one with the greatest percentage discount should be applied
Bulk discounts should apply on a per-item basis
If the quantity of an item ordered meets or exceeds the quantity threshold, then the percentage discount should apply to that item only. Other items that did not meet the quantity threshold will not be affected.
The quantities of items ordered cannot be added together to meet the quantity thresholds, e.g. a customer cannot order 1 of Item A and 1 of Item B to meet a quantity threshold of 2. They must order 2 or Item A and/or 2 of Item B
Examples
Example 1

Merchant A has one Bulk Discount
Bulk Discount A is 20% off 10 items
Invoice A includes two of Merchant A’s items
Item A is ordered in a quantity of 5
Item B is ordered in a quantity of 5
In this example, no bulk discounts should be applied.

Example 2

Merchant A has one Bulk Discount
Bulk Discount A is 20% off 10 items
Invoice A includes two of Merchant A’s items
Item A is ordered in a quantity of 10
Item B is ordered in a quantity of 5
In this example, Item A should be discounted at 20% off. Item B should not be discounted.

Example 3

Merchant A has two Bulk Discounts
Bulk Discount A is 20% off 10 items
Bulk Discount B is 30% off 15 items
Invoice A includes two of Merchant A’s items
Item A is ordered in a quantity of 12
Item B is ordered in a quantity of 15
In this example, Item A should discounted at 20% off, and Item B should discounted at 30% off.

Example 4

Merchant A has two Bulk Discounts
Bulk Discount A is 20% off 10 items
Bulk Discount B is 15% off 15 items
Invoice A includes two of Merchant A’s items
Item A is ordered in a quantity of 12
Item B is ordered in a quantity of 15
In this example, Both Item A and Item B should discounted at 20% off. Additionally, there is no scenario where Bulk Discount B can ever be applied.

Example 5

Merchant A has two Bulk Discounts
Bulk Discount A is 20% off 10 items
Bulk Discount B is 30% off 15 items
Merchant B has no Bulk Discounts
Invoice A includes two of Merchant A’s items
Item A1 is ordered in a quantity of 12
Item A2 is ordered in a quantity of 15
Invoice A also includes one of Merchant B’s items
Item B is ordered in a quantity of 15
In this example, Item A1 should discounted at 20% off, and Item A2 should discounted at 30% off. Item B should not be discounted.

Merchant Bulk Discount Show

As a merchant
When I visit my bulk discount show page
Then I see the bulk discount's quantity threshold and percentage discount

Merchant Bulk Discount Delete

As a merchant
When I visit my bulk discounts index
Then next to each bulk discount I see a link to delete it
When I click this link
Then I am redirected back to the bulk discounts index page
And I no longer see the discount listed

Create a Holiday Discount

Create a Holiday Discount

As a merchant,
when I visit the discounts index page,
In the Holiday Discounts section, I see a create discount button next to each of the 3 upcoming holidays.
When I click on the button I am taken to a new discount form that has the form fields auto populated with the following:

Discount name: discount
Percentage Discount: 30
Quantity Threshold: 2

I can leave the information as is, or modify it before saving.
I should be redirected to the discounts index page where I see the newly created discount added to the list of discounts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.