Entries by puneetk00

Product saleable qty not showing and update in magento 2.x

 I have same issue with resolved, take inventory_source_item table backup first. Run sql query: INSERT IGNORE INTO `inventory_source_item` (source_code, sku, quantity, status) select ‘default’, sku, qty, stock_status from (`cataloginventory_stock_status` as `lg` join `catalog_product_entity` as `prd` on((`lg`.`product_id` = `prd`.`entity_id`))) Apply command: php bin/magento indexer:reindex php bin/magento cache:flush Puneet Kumar Magento Developer

Magento 2 Java Script Bundling

JavaScript Bundling Java-Script bundling is an optimization technique, you can use to reduce the number of files server requests for JavaScript requests. Bundling accomplishes this by merging files multiple JavaScript files together into one file to reduce the number of page requests. Enable Java-Script bundling JavaScript bundling does not work unless Magento is in production mode. […]

Magento 2 Error ERR_TOO_MANY_REDIRECTS

 ‘m new to Magento, after installation of Magento 2 community edition.I am not able to access the admin panel. I am getting below error. This web page has a redirect loop Error ERR_TOO_MANY_REDIRECTS Please help me to resolve the issue. Advance thanks to all. Solution php bin/magento config:set web/unsecure/base_url http://example.local/ php bin/magento config:set web/secure/base_url https://example.local/ […]

Magento 2 giving error in plugin beforegetName

I am getting error while using plugin before have any one idea why it is happening?  Fatal error: Uncaught ArgumentCountError: Too few arguments to function PuneetTestModelPluginName::beforegetName(), 1 passed in /var/www/html/m2/vendor/magento/framework/Interception/Interceptor.php on line 121 and exactly 2 expected in /var/www/html/m2/app/code/Puneet/Test/Model/Plugin/Name.php:15 Stack trace: #0 /var/www/html/m2/vendor/magento/framework/Interception/Interceptor.php(121): PuneetTestModelPluginName->beforegetName(Object(MagentoCatalogModelProductInterceptor)) #1 /var/www/html/m2/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogModelProductInterceptor->MagentoFrameworkInterception{closure}() #2 /var/www/html/m2/generated/code/Magento/Catalog/Model/Product/Interceptor.php(26): MagentoCatalogModelProductInterceptor->___callPlugins(‘getName’, Array, Array) #3 /var/www/html/m2/vendor/magento/module-catalog/Helper/Product/View.php(119): MagentoCatalogModelProductInterceptor->getName() […]

What is Factory class in Magento 2

  Click here for real example video What is Factory class in Magento 2 Overview Factory classes are service class that instantiate non-injectable classes, that is, models that represent a database entity. They create a layer of abstraction between the ObjectManager and business code. Relationship to ObjectManager The MagentoFrameworkObjectManager is the class responsible for instantiating objects in the Magento application. Magento […]

MySQL: Cloning a MySQL database on the same MySql instance

 As the manual says in Copying Databases you can pipe the dump directly into the mysql client: mysqldump db_name | mysql new_db_name If you’re using MyISAM you could copy the files, but I wouldn’t recommend it. It’s a bit dodgy. Integrated from various good other answers Both mysqldump and mysql commands accept options for setting connection details (and much more), like: mysqldump -u […]