Changelog

  • No live stream tonight, My internet has been super patchy today so I’m not even going to try.
  • Unfortunately no PHP 8 short this week. It has been recorded, I just haven’t had the chance to upload and do the thumbnail yet.
  • We documented the 7th lesson of the new PHP course. This included some TDD, some array nesting and some PHP 8 array shapes

Shopping carts are hard

A shopping cart needs to be frictional-less to the end user (Customer). The quicker a customer can purchase a product the better.

There are many questions that need to be answered when designing the user flow of a shopping cart

These are just some things to think about:

Shipping

  • Will you be shipping a physical good and if so will the shipping cost be dependent on user location?
  • Will shipping be based on the item(s) weight?
  • Will shipping be discounted in certain regions?
  • Will you require shipping information to make a payment (Security checks)?
  • Will there be discounted shipping based on quantity?
  • Will there be a quantity limit based on different regions?

Currency

  • What currency will you be offering?
  • What is the conversion rate?
  • How will you track that?
  • What are the tax implications for you versus the customer?
  • How are you going to calculate tax?

Users

  • Will you require an actual user to login before and order is created?
  • Can someone make a guest account?
  • Will there be teams or individual accounts?
  • Will you require the customer to be verified before making a purchase. Some places like Stripe require a user email address?

Product

  • Is it a digital good?
  • Will there be stock?
  • How will the stock be recorded/monitored?
  • How will an out of stock product be displayed?
  • Can products be bundled?
  • Do bundled products get a discount?
  • How are products removed from the cart?
  • How are products updated on the cart?
  • How are quantities updated on the cart?

Checkout

  • What happens when a logged out user access the checkout page?
  • What happens to abandoned carts?
  • What defines an abandoned cart?
  • At what point does the cart get created in the database?
  • At what point does the cart get associated with the user?

Other items to consider

  • Refunds
  • Subscriptions
  • Cancelations