Daily Archives: January 21, 2020
I created a new order status called Printed that has to be assigned after the mass action Print invoices on sales_order_grid. I created all the custom logic to achieve the result. The only problem is that the controller returns an instance of MagentoFrameworkAppResponseHttpFileFactory which sets in the headers 200 as […]
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 […]
I have a custom Luma theme I use for my store, for whatever reason sign in link is missing but I do have Create an Account on the header – where should I start looking to resolve this issue. I see system error report, “main.CRITICAL: Broken reference: No element found […]
< ?php if($_product->getTierPrice()){ $tierPrice = $_product->getTierPrice(); foreach ($tierPrice as $key => $value) { $qty = (int)$value['price_qty']; $price = $value['price']; $formattedTierPrice = $this->helper('MagentoFrameworkPricingHelperData')->currency(number_format($price, 2), true, false); $savePercentage = ceil(100 - ( (100 / $_product->getPrice())* $value['price']) ) ."%"; echo "Buy $qty for ".$formattedTierPrice." each and save ".$savePercentage.""; } } ?>**what we can […]