Support & Downloads

Quisque actraqum nunc no dolor sit ametaugue dolor. Lorem ipsum dolor sit amet, consyect etur adipiscing elit.

s f

Contact Info
198 West 21th Street, Suite 721
New York, NY 10010
[email protected]
+88 (0) 101 0000 000

How to add update product Tier Price programmatically Magento 2?

You can add/update tier price to the Product from the Admin Panel Manually by click on the Products -> Add or Edit Product -> Price (Click on Advanced Pricing).

If you have to task to add tier price in the product programmatically in Magento using add() method from the ScopedProductTierPriceManagementInterface.

Core Method to add tier price,
public function add($sku, \Magento\Catalog\Api\Data\ProductTierPriceInterface $tierPrice);

$sku is the Product SKU.
$tierPrice is the ProductTierPriceInterface where you need to create ProductTierPriceInterfacefactory with set Qty(float), Price Value(float) and Customer Group id to add tier price.

You can add tier price by call method,
echo $tierPriceData = $this->addTierPrice();

Sagar Doshi

CEO / Managing Partner

[email protected]

Post a Comment