Giter Site home page Giter Site logo

little_shop_base_small's People

Contributors

bradniedt avatar iandouglas avatar

Watchers

 avatar

little_shop_base_small's Issues

Cart Discount Message

The cart show page should show a small message on the item if that item has a discount.

cart test

add test to show that if an item was added at qty 10 a discount message shows, and if you reduce by one, the discount message disappears.

Create Discount Resource

Create Discount table
has an integer and a user_id
has a threshold integer OR RANGE (so you can say is item.qty in range?)
belongs to item

Discount Edit

Discount index page - each discount has a link to edit that discount

Merchants can only have one type of discount

merchant's discounts can only be all dollars or all percents.
If a merchant adds one discount, every discount they create after that will need to be the same type.
When they create their first discount, they can choose any type.

Discount index page

discount index page has a card for each discount with its id, type, and amount. Also each has a link to edit and delete that discount.

cart item discount check

a method that takes a cart item ID and qty as an argument. The method checks if that item's merchant has discounts, then if the quantity qualifies it for any discounts. If it does, get the cart item subtotal, reduce it by the discount, then divide the subtotal by the quantity, and set the new cart item price. this should run for every item every time you visit the cart show page.

Cart Checkout with Discount

When a user checks out and creates order items, the order item's price should be reduced by the discount divided by the quantity.

If no discount is present, just keep the same item price.

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.