diff --git a/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php b/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php index 27a9ba471..7512f5c38 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php @@ -67,7 +67,7 @@ class WishlistController extends Controller */ public function add($itemId) { - $product = $this->productRepository->findOneByField('id', $itemId); + $product = $this->productRepository->find($itemId); if ( $product == null ) { session()->flash('error', trans('customer::app.product-removed')); @@ -92,7 +92,7 @@ class WishlistController extends Controller $product->parent && $product->parent->type !== 'configurable' ) { - $product = $this->productRepository->findOneByField('id', $product->parent_id); + $product = $this->productRepository->find($product->parent_id); $data['product_id'] = $product->id; } diff --git a/packages/Webkul/Payment/src/Listeners/GenerateInvoice.php b/packages/Webkul/Payment/src/Listeners/GenerateInvoice.php index 1eda85851..7853feab5 100644 --- a/packages/Webkul/Payment/src/Listeners/GenerateInvoice.php +++ b/packages/Webkul/Payment/src/Listeners/GenerateInvoice.php @@ -41,7 +41,8 @@ class GenerateInvoice ) { $this->invoiceRepository->create( $this->prepareInvoiceData($order), - core()->getConfigData('sales.paymentmethods.cashondelivery.invoice_status'), core()->getConfigData('sales.paymentmethods.cashondelivery.order_status') + core()->getConfigData('sales.paymentmethods.cashondelivery.invoice_status'), + core()->getConfigData('sales.paymentmethods.cashondelivery.order_status') ); } @@ -51,7 +52,8 @@ class GenerateInvoice ) { $this->invoiceRepository->create( $this->prepareInvoiceData($order), - core()->getConfigData('sales.paymentmethods.moneytransfer.invoice_status'), core()->getConfigData('sales.paymentmethods.moneytransfer.order_status') + core()->getConfigData('sales.paymentmethods.moneytransfer.invoice_status'), + core()->getConfigData('sales.paymentmethods.moneytransfer.order_status') ); } } diff --git a/packages/Webkul/Product/src/Http/Controllers/ReviewController.php b/packages/Webkul/Product/src/Http/Controllers/ReviewController.php index 4e472b32e..50ccf5090 100755 --- a/packages/Webkul/Product/src/Http/Controllers/ReviewController.php +++ b/packages/Webkul/Product/src/Http/Controllers/ReviewController.php @@ -143,7 +143,7 @@ class ReviewController extends Controller $indexes = explode(',', request()->input('indexes')); foreach ($indexes as $key => $value) { - $review = $this->productReviewRepository->findOneByField('id', $value); + $review = $this->productReviewRepository->find($value); try { if (! isset($data['massaction-type'])) { diff --git a/packages/Webkul/Product/src/Type/Configurable.php b/packages/Webkul/Product/src/Type/Configurable.php index dfe774318..e5384a9a7 100644 --- a/packages/Webkul/Product/src/Type/Configurable.php +++ b/packages/Webkul/Product/src/Type/Configurable.php @@ -742,7 +742,7 @@ class Configurable extends AbstractType */ public function getAdditionalOptions($data) { - $childProduct = app('Webkul\Product\Repositories\ProductRepository')->findOneByField('id', $data['selected_configurable_option']); + $childProduct = app('Webkul\Product\Repositories\ProductRepository')->find($data['selected_configurable_option']); foreach ($this->product->super_attributes as $attribute) { $option = $attribute->options()->where('id', $childProduct->{$attribute->code})->first();