magento , sales order save after how correctly update order data

How correctly update status for order? i have this code, but it’s not working for me public function salesOrderSaveAfter($event){ //check for fires twice if(!Mage::registry(‘backorder_daniilkrok_observer’)){ $order = $event->getOrder(); $orderIncrementId = $order->getIncrementId(); Mage::register(‘backorder_daniilkrok_observer’,true); Mage::log(‘i here’); foreach ($order->getAllVisibleItems() as $item){ $oldQty = (int)$item->getProduct()->getStockItem()->getQty(); $qtyOrdered = (int)$item->getQtyOrdered(); $differenceQty = $oldQty – $qtyOrdered; //increase the price by 25% if($oldQty >…

how to show tier price with tax in magento 2 catalog listing page?

<?php if($_product->getTierPrice()){ $tierPrice = $_product->getTierPrice(); foreach ($tierPrice as $key => $value) { $qty = (int)$value[‘price_qty’]; $price = $value[‘price’]; $formattedTierPrice = $this->helper(‘Magento\Framework\Pricing\Helper\Data’)->currency(number_format($price, 2), true, false); $savePercentage = ceil(100 – ( (100 / $_product->getPrice())* $value[‘price’]) ) .”%”; echo “Buy $qty for “.$formattedTierPrice.” each and save “.$savePercentage.”<br>”; } } ?>**what we can add in this code for the…