Code Monkey home page Code Monkey logo

islay-shop's People

Contributors

benjamin-hull avatar lukesutton avatar

Watchers

 avatar

islay-shop's Issues

Display stock alerts

They should be displayed pretty much everywhere in the catalogue. Overview, category, product and stock level indexes.

Add summaries to the top of listings

For example, when listing orders, have aggregate counts for things like total orders, pending, cancelled etc.

The same could be done in may other places e.g. promotions.

Promotion overview needs finishing

At the moment it's undercooked. Badly styled and showing enough useful information. Some kind of report/overview of sales would be useful.

Price point validation fails if any other validation fails

When updating a SKU, the validation failing (for example a missing value for Freight Class) will cause an invalid price point to be inserted into the form - in turn this breaks validate_boxed_and_bracketed_overlap or any other method which relies on sorting by volume.

Extend PromotionCondition#check to return :qualification and :count per order item

Currently conditions can optionally include a Hash of targets when returning a result via #check. This count is used by effects to decide the results of their application. For example, the Get N Free effect needs to know how many items qualify.

However, with some conditions there is a difference between the number of order items which are considered as qualifying and a count of qualifications. This is a subtle but important difference.

For example, consider the Quantity conditions. If we configure a condition that says buy at least 5 of SKU foo, and an effect which is 10% off each qualifying item.

  • Customer buys 11 of SKU foo
  • Condition check is successful
  • Number of qualifications is one; the customer did buy at least 5
  • Number of items qualifying is 11; all of them
  • Discount effect knows it needs to apply the discount to all 11

Without this distinction between qualifying and qualifications, the discount effect would only know about the single qualification, not the count of items that were used to determine the qualification.

Here is a slightly more complicated scenario. A condition is specified that says for every 10 of SKU bar, and an effect that says $2 off each.

  • Customer buys 25 of bar
  • Condition check is successful; quantity is over the minimum of 5
  • Number of qualifications is 2; 10 goes into 25 twice
  • Number of items qualifying is 20; the extra 5 items are not qualifying
  • Discount effect knows that it has to discount 20 items

Now, imagine the above scenario, but with a Get N Free effect. In that case the promotion described would be 'For every ten of SKU bar get one free'. In this example, the effect needs to know the number of qualifications, not the count of qualifying items.

Transactional emails should be queued

Currently they're fired off inline with any order processing. This is a problem, since an exception when sending an email can hose an otherwise valid transaction.

Free shipping can't be applied with a code

Because of the condition scope, adding a code which applies free shipping won't work until there are shipping charges (which there often aren't, at the point a code is entered). For now, I'll just remove the condition scope, so we don't require shipping charges before applying the effect.

Add Shipping Condition to promotions

Promotions which have a shipping effect should have a corresponding condition which enforces:

a. Order has shipping service
b. Shipping total is greater than zero

Then the condition_scope for each could be defined as :shipping_service. The end result of this is that discounted shipping can only be offered when orders have shipping charged against them; avoids the nonsensical effect of discounting shipping that is already free.

Spreedly expects amounts in cents for payment

Looks like a regression from an update to SpookAndPuff::Money, which isn't a dependency of SpookAndPay. Islay Shop needs to check the payment provider and provide the right value (bit icky).

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.