Merge pull request #6553 from jitendra-webkul/master
Replace findOneByField function call with find
This commit is contained in:
commit
4306ea45a6
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'])) {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue