Tips Blog

Welcome to our technical tips blog – solutions and answers for numerous Joomla, Wordpress, Magento, Linux, MySQL and other problems.

Reset MySQL root password in Ubuntu Linux

1. Stop MySQL sudo /etc/init.d/mysql stop 2. Start MySQL with the –skip-grant-tables option Ensure the directory /var/run/mysqld exists and correct owner set. sudo mkdir /var/run/mysqld sudo chown mysql /var/run/mysqld sudo mysqld_safe –skip-grant-tables & 3. Login to MySQL as root This will

read more

How to get and update stock status in Magento 2.3 MSI

The Old Way The old way of getting stock info from Magento 2 was using stockRegistry and it would output or input an array. $productRepository = $objectManager->get(‘\Magento\Catalog\Api\ProductRepositoryInterface’); $stockRegistry = $objectManager->create(‘\Magento\CatalogInventory\Api\StockRegistryInterface’); $sku=”STARTNET_ITEM_123″; $product=$productRepository->get($sku); $stockdata = $stockRegistry->getStockStatus($product->getId(), 1); // for store id

read more