This commit is contained in:
Joel Male
2024-08-30 09:44:40 +10:00
parent 274a8504af
commit 4a312a37e2
25 changed files with 70 additions and 70 deletions
+8 -8
View File
@@ -33,14 +33,14 @@ ## Installing
Install the package through [Composer](http://getcomposer.org/).
`composer require "wearepixel/laravel-cart"`
`composer require "pixeldigital/laravel-cart"`
## Configuration
You can publish the configuration file to customize various options.
```php
php artisan vendor:publish --provider="Wearepixel\Cart\CartServiceProvider" --tag="config"
php artisan vendor:publish --provider="Pixeldigital\Cart\CartServiceProvider" --tag="config"
```
### Formatting Numbers
@@ -302,7 +302,7 @@ #### Adding a condition to the cart: **Cart::condition()**
```php
// Add a single condition to the cart
$condition = new \Wearepixel\Cart\CartCondition([
$condition = new \Pixeldigital\Cart\CartCondition([
'name' => 'Tax: 10%',
'type' => 'tax',
'target' => 'subtotal', // this condition will be applied to cart's subtotal when getSubTotal() is called.
@@ -315,7 +315,7 @@ #### Adding a condition to the cart: **Cart::condition()**
Cart::condition($condition);
// Add multiple conditions
$tax = new \Wearepixel\Cart\CartCondition([
$tax = new \Pixeldigital\Cart\CartCondition([
'name' => 'Tax: 10%',
'type' => 'tax',
'target' => 'subtotal', // this condition will be applied to cart's subtotal when getSubTotal() is called.
@@ -323,7 +323,7 @@ #### Adding a condition to the cart: **Cart::condition()**
'order' => 2
]);
$shipping = new \Wearepixel\Cart\CartCondition([
$shipping = new \Pixeldigital\Cart\CartCondition([
'name' => 'Shipping: $15',
'type' => 'shipping',
'target' => 'subtotal', // this condition will be applied to cart's subtotal when getSubTotal() is called.
@@ -338,7 +338,7 @@ #### Adding a condition to the cart: **Cart::condition()**
Cart::condition([$tax, $shipping]);
// add condition to only apply on totals, not in subtotal
$shipping = new \Wearepixel\Cart\CartCondition([
$shipping = new \Pixeldigital\Cart\CartCondition([
'name' => 'Express Shipping $15',
'type' => 'shipping',
'target' => 'total',
@@ -429,7 +429,7 @@ ### Condition on items
```php
// lets create first our condition instance
$saleCondition = new \Wearepixel\Cart\CartCondition([
$saleCondition = new \Pixeldigital\Cart\CartCondition([
'name' => '50% Off',
'type' => 'tax',
'value' => '-50%',
@@ -449,7 +449,7 @@ ### Condition on items
Cart::add($product);
// You can of course also do multiple conditions on an item
$saleCondition = new \Wearepixel\Cart\CartCondition([
$saleCondition = new \Pixeldigital\Cart\CartCondition([
'name' => 'SALE 5%',
'type' => 'sale',
'value' => '-5%',