reinvanoyen / dry-ecommerce
There is no license information available for the latest version (1.0.12) of this package.
E-commerce package
1.0.12
2021-01-29 09:46 UTC
Requires
- reinvanoyen/oak: ^1.0.8
README
E-commerce platform
Index
Installation
composer require reinvanoyen/dry-ecommerce
Register the service provider
<?php $app = new \Oak\Application(); $app->register([ \Tnt\Ecommerce\EcommerceServiceProvider::class, ]); $app->bootstrap();
Config options
Careful! Payment can be set from configuration. the default value of the "payment" config property provides a default NullPayment which basically gives everything away for free. For more info on payments check out the topic payments below.
Buyable
Documentation coming soon
Cart
<?php $cart = $app->get(CartInterface::class); $cart->add($buyable, 2); $cart->remove($buyable); $cart->clear(); $items = $cart->items(); $cart->setFulfillment($shipping); $fulfillment = $cart->getFulfillment(); $fulfillmentCost = $cart->getFulfillmentCost(); $cart->addDiscount($discountCode); $discountCode = $cart->getDiscount(); $subTotal = $cart->getSubTotal(); $total = $cart->getTotal(); $reduction = $cart->getReduction(); $order = $cart->checkout($customer);
Discount & Coupon
Documentation coming soon
Fulfillment
Documentation coming soon
Customer
Documentation coming soon
Order
Documentation coming soon
Stock
Documentation coming soon
Tax
Documentation coming soon