I will try get total stock product qty. I use this below code: < ?php echo "Total qty: "; ?> < ?php $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $StockState = $objectManager->get('MagentoCatalogInventoryApiStockStateInterface'); echo $StockState->getStockQty($productId); ?> But script display 0 qty for all products. Here is full file code: < ?php $_helper = MagentoFrameworkAppObjectManager::getInstance()->get('MagentoCatalogHelperOutput'); $_product […]
Magento2
I am trying to change how the order overview page found in the admin looks when it physically prints out on a printer. I have been inspecting the print preview page popup in Chrome, and I have no idea how to do it. In the print preview, some changes I […]
I have migrated one of my projects into 2.3.3 from 1.9.3.2 recently using data migration tool https://github.com/magento/data-migration-tool/. I am facing one weird issue with product description which got migrated. The migrated product description display straight on product page without reflecting any html tags which used in editor in admin. Can […]
We use free extension pdf catalog generator. https://snm-portal.com/pdfpublication-templates But this extension generated all products also out of stock. Code is full open source. Any one help how can we change to generate products only in stock? Here is extension files: gofile.io/?c=Mz1hv6
I’m trying to compare the current date timestamp with product special price end date. to get current date I use : $currentDate = Mage::getModel('core/date')->timestamp(time()); and for specialToDate : $promoEndDate = strtotime($product->getSpecialToDate() ); the problem is that magento changes the date format when someone changes the admin locale and then strtotime […]
i want to create new customer section example sampleorder url like : customer/account/sampleorders/ i tried below method that is working but it is wrong way to modify core magento files, what i tried is below, but i want to do it vai module 1: created a file Sampleorders.php vendor/magento/module-customer/Controller/Account/Sampleorders.php < […]
I’m looking for a way to display address fields on the customer registration form. In previous versions of Magento 2, I was able to add them using the below snippet in the customer_account_create.xml file: true Since the release of Magento 2.3.1, this snippet doesn’t seem to have any impact, has […]
I have an online store with 3 different currencies. I fetch the prices of each product from an external web-service. A weird thing is happening, when I switch the currency from the store, the prices of items that are already in the cart are not updated. How do I force […]
How get “Sort By” value “Relevance” in this page. Using $productListToolbar return only price, name, position value, but i need relevance.