All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
- Add
active
column toOffers
- it's now possible to deactivate Offers. The default value istrue
(for backwards compatibility).
- Add
product_ids
column toOffers
- it's now possible to limit an Offer to specific products - Multiple Offers can now be applied on the same Order.
- Remove php7.4 support
- Added events:
RemovedFromCart
,CartEmptied
- Override the
OrderItem
model incommerce.php
config.
- New Feature: Restrict a coupon to a specific product!
We added the following columns to the coupons
table: product_type
& product_id
.
If you're upgrading an existing installation, create the following migration:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use YiddisheKop\LaravelCommerce\Models\Coupon;
class AddProductMorphsToCouponsTable extends Migration
{
public function up()
{
Schema::table('coupons', function (Blueprint $table) {
$table->nullableMorphs('product');
});
}
public function down()
{
Schema::table('coupons', function (Blueprint $table) {
$table->dropMorphs('product');
});
}
}
1.0.1-alpha.0 (2020-11-30)
- initial release 🥳
- coupons (31f0099)
- Offer start/expiry dates (610cfe5)
- order appends timeAgo (2c58c51)
- order->timeAgo accessor (c190a7d)
- OrderCompleted event (3b6a18d)
- removeCoupon (41a3681)
- shipping, product options (0278a93)
- special Offers (wip) (ba75d46)
- eventServiceProvider (fbff95e)
- Order paid_at dates (02a09a7)
- pass attributes at cart creation (3291bea)
- recalculate totals after adding/removing item from cart (db56afd)
- remove offer when removing cart-items (f96f1a8)
- reverted to coupon_total (fdaa6d4)
- set default currency at cart creation (c650483)