diff --git a/Changelog.md b/Changelog.md index 6a4bd940..e61d86a6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -17,7 +17,7 @@ - Added the `withImages` method to the product search class (eager loads media) - Added the `channelables` table for being many-to-many polymorphic relationships with channels and arbitrary models - Added the `mapInto()` method to the `RelationAdjustmentCollection` class, which forwards the call to the underlying Eloquent collection -- Added the `Channelable` behavior to Foundation Product, MasterProduct and Taxonomy classes +- Added the `Channelable` behavior to Foundation Product, MasterProduct, PaymentMethod, ShippingMethod and Taxonomy classes - Added and extended Foundation Channel model that contains the known relationships to the "channelable" models - Added the `withinChannel[s]` methods to the ProductSearch class - Added the `Features` accessor class, which is a syntactic sugar for areas of the configuration diff --git a/src/Foundation/Models/PaymentMethod.php b/src/Foundation/Models/PaymentMethod.php new file mode 100644 index 00000000..fac66653 --- /dev/null +++ b/src/Foundation/Models/PaymentMethod.php @@ -0,0 +1,23 @@ +concord->registerModel(ShipmentContract::class, Shipment::class, $registerRouteModels); $this->concord->registerModel(MasterProductContract::class, MasterProduct::class, $registerRouteModels); $this->concord->registerModel(MasterProductVariantContract::class, MasterProductVariant::class, $registerRouteModels); + $this->concord->registerModel(ShippingMethodContract::class, ShippingMethod::class, $registerRouteModels); + $this->concord->registerModel(PaymentMethodContract::class, PaymentMethod::class, $registerRouteModels); Relation::morphMap([ // @todo remove this bullshit in v4. It's not event part of the interface @@ -97,6 +105,8 @@ public function boot() 'order' => OrderProxy::modelClass(), 'cart' => CartProxy::modelClass(), 'shipment' => ShipmentProxy::modelClass(), + 'shipping_method' => ShippingMethodProxy::modelClass(), + 'payment_method' => PaymentMethodProxy::modelClass(), 'channel' => ChannelProxy::modelClass(), ]);