Issue #3723 fixed
This commit is contained in:
parent
bed01ea9c9
commit
3a2998cab1
|
|
@ -11,6 +11,7 @@ use Webkul\Product\Repositories\ProductDownloadableLinkRepository;
|
|||
use Webkul\Product\Repositories\ProductDownloadableSampleRepository;
|
||||
use Webkul\Attribute\Repositories\AttributeFamilyRepository;
|
||||
use Webkul\Inventory\Repositories\InventorySourceRepository;
|
||||
use Webkul\Product\Repositories\ProductAttributeValueRepository;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class ProductController extends Controller
|
||||
|
|
@ -64,6 +65,13 @@ class ProductController extends Controller
|
|||
*/
|
||||
protected $inventorySourceRepository;
|
||||
|
||||
/**
|
||||
* ProductAttributeValueRepository object
|
||||
*
|
||||
* @var \Webkul\Product\Repositories\ProductAttributeValueRepository
|
||||
*/
|
||||
protected $productAttributeValueRepository;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
|
|
@ -73,6 +81,7 @@ class ProductController extends Controller
|
|||
* @param \Webkul\Product\Repositories\ProductDownloadableSampleRepository $productDownloadableSampleRepository
|
||||
* @param \Webkul\Attribute\Repositories\AttributeFamilyRepository $attributeFamilyRepository
|
||||
* @param \Webkul\Inventory\Repositories\InventorySourceRepository $inventorySourceRepository
|
||||
* @param \Webkul\Product\Repositories\ProductAttributeValueRepository $productAttributeValueRepository
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
|
|
@ -81,7 +90,8 @@ class ProductController extends Controller
|
|||
ProductDownloadableLinkRepository $productDownloadableLinkRepository,
|
||||
ProductDownloadableSampleRepository $productDownloadableSampleRepository,
|
||||
AttributeFamilyRepository $attributeFamilyRepository,
|
||||
InventorySourceRepository $inventorySourceRepository
|
||||
InventorySourceRepository $inventorySourceRepository,
|
||||
ProductAttributeValueRepository $productAttributeValueRepository
|
||||
)
|
||||
{
|
||||
$this->_config = request('_config');
|
||||
|
|
@ -97,6 +107,8 @@ class ProductController extends Controller
|
|||
$this->attributeFamilyRepository = $attributeFamilyRepository;
|
||||
|
||||
$this->inventorySourceRepository = $inventorySourceRepository;
|
||||
|
||||
$this->productAttributeValueRepository = $productAttributeValueRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -372,7 +384,7 @@ class ProductController extends Controller
|
|||
*/
|
||||
public function download($productId, $attributeId)
|
||||
{
|
||||
$productAttribute = $this->productAttributeValue->findOneWhere([
|
||||
$productAttribute = $this->productAttributeValueRepository->findOneWhere([
|
||||
'product_id' => $productId,
|
||||
'attribute_id' => $attributeId,
|
||||
]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue