45 $tierPricesQty = count(
$prices);
47 foreach (
$prices as $key => $tierPrice) {
48 if ($customerGroupId ==
'all' && $tierPrice[
'price_qty'] == $qty
49 && $tierPrice[
'all_groups'] == 1 && intval($tierPrice[
'website_id']) === intval(
$websiteId)
52 }
elseif ($tierPrice[
'price_qty'] == $qty && $tierPrice[
'cust_group'] == $customerGroupId
53 && intval($tierPrice[
'website_id']) === intval(
$websiteId)
59 if ($tierPricesQty == count(
$prices)) {
62 'Product hasn\'t group price with such data: customerGroupId = \'%1\'' 63 .
', website = %2, qty = %3',
70 $this->productRepository->save(
$product);
elseif(isset( $params[ 'redirect_parent']))
removeTierPrice(\Magento\Catalog\Model\Product $product, $customerGroupId, $qty, $websiteId)
__construct(\Magento\Catalog\Api\ProductRepositoryInterface $productRepository)