bozboz/products

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (v1.0.0) of this package.

v1.0.0 2018-08-21 10:20 UTC

This package is auto-updated.

Last update: 2021-06-04 10:20:51 UTC


README

Installation

See http://gitlab.lab/laravel-packages/ecommerce

Usage

There's an awful lot of stuff in here that's never been used and you can and probably should just ignore it. Unless what you need is the exact setup contained within this package (it's very unlikely that it is) you're much better off setting up your products manually. Provided they implement the Orderable interface in the orders package it should all work fine.

There are some useful bits in the package, though. These are:

  • Bozboz\Ecommerce\Products\Pricing\PriceTrait
  • Bozboz\Ecommerce\Products\Pricing\PriceField #TODO: Move this to admin.
  • Bozboz\Ecommerce\Products\OrderableProduct

OrderableProduct

While you're probably better off not actually using this class it's a good example of implementing an orderable/shippable model.

Price

Prices should be stored as pence. Ideally in a field called price_pence. In order to calculate the tax the priced model should have a field called tax_rate. The PriceTrait will handle the conversion from pence to pounds for you and calculate the tax rate.