1

how to export product Advance pricing in Magento 2 Currently, I am using profiler to export product price but I didn't get Advance pricing so how can I export Advance pricing store wise in Magento 2 If any programmatically script and any tool then let me know fast. Thank you.

1
  • Yahh good question I also need this... Jan 9, 2020 at 6:37

1 Answer 1

0

Hii Please use this code to get tier price

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product_obj = $objectManager->create('Magento\Catalog\Model\Product')->load(1);                
$tier_price = $product_obj->getTierPrice();
if(count($tier_price) > 0){
    foreach($tier_price as $pirces){
        foreach ( array_reverse($pirces) as $k => $v ) {
            if($k == "price"){
                $tp = number_format($v, 2, '.', '');
                echo $tp;
            }
        }
    }
}
1
  • Thank you I use this code it's working but multiple customer group price can't get and when tire price is empty in product then print price so how can i sorted it.. Jan 9, 2020 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.