composer require reinvanoyen/dry-ecommerce
<?php
$app = new \Oak\Application();
$app->register([
\Tnt\Ecommerce\EcommerceServiceProvider::class,
]);
$app->bootstrap();
Name | Default |
---|---|
payment | \Tnt\Ecommerce\Payment\NullPayment::class |
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
- Cart
- Discount & Coupon
- Fulfillment
- Customer
- Order
- Payment
- Stock
- Tax
Documentation coming soon
<?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);
Documentation coming soon
Documentation coming soon
Documentation coming soon
Documentation coming soon
Documentation coming soon.
Available payment packages:
Documentation coming soon
Documentation coming soon