How To Code Well
139 - Shopping carts are hard

Episode 139 · Season 4

139 - Shopping carts are hard

How To Code Well

28:00

About this episode

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

More from How To Code Well

Let's talk about how to test code that you don't controlShow notes: https://howtocodewell.net/podcast/episode/219Support the show and get early access to tutorials courses and moreYouTube membership h…

39m

In today's I practice a new PHP talk that I am hoping to give to PHP user groups this year. The talk is called how to make your PHPUnit tests smarter. Show notes: https://howtocodewell.net/podcast/epi…

50m

In today's show we discuss more Laravel tutorials and look at what is coming in Laravel 12 Show notes: https://howtocodewell.net/podcast/episode/217Support the show and get early access to tutorials c…

23m

In today's show we discuss more Laravel tutorials and dip our toes deeper into the world of OOP. Support the show and get early access to tutorials courses and more YouTube membership https://www.yout…

41m

Today we are going to talk about Laravel collections, conferences and object orientation. Show notes: https://howtocodewell.net/podcast/episode/215 Support the show and get early access to tutorials c…

41m