Magento 2 Run Code From An External File/Script
-
admin
-
July 17, 2018
-
Magento 2
-
0 Comments
To access the Magento 2 core functionality, we need to include the below code in the top of the external file use Magento\Framework\App\Bootstrap; require __DIR__ . ‘/app/bootstrap.php’; $params = $_SERVER; $bootstrap = Bootstrap::create(BP, $params); Example file path: C:/xampp/htdocs/magento2/script.php <?php use Magento\Framework\App\Bootstrap; require __DIR__ . ‘/app/bootstrap.php’; $params = $_SERVER; $bootstrap = Bootstrap::create(BP, $params); $obj = $bootstrap->getObjectManager(); $state = $obj->get(‘Magento\Framework\App\State’); $state->setAreaCode(‘frontend’); $quoteId …
Continue Reading
How to enable error in Magento 2
-
admin
-
July 17, 2018
-
Magento 2
-
0 Comments
Go to your Magento2 root directory Then, go inside folder pub/errors There, you will see a file named local.xml.sample Rename it to local.xml, i.e. remove the “.sample” from the name of that file. Refresh Cache from your Magento Admin (System -> Tools -> Cache Management).
Continue Reading
Magento 2 reindex all in command line
-
admin
-
July 17, 2018
-
Magento 2
-
0 Comments
To get list of indexer in Magento 2 php bin/magento indexer:info Indexer status check in Magento 2 php bin/magento indexer:status Only one indexer please follow following command: php bin/magento indexer:reindex indexer_name php bin/magento indexer:status catalog_category_product Magento 2 reindex all with following command php bin/magento indexer:reindex If fill memory limit, try with following command php bin/magento -dmemory_limit=2G magento indexer:reindex
Continue Reading
Required parameter ‘theme_dir’ was not passed in magento 2
-
admin
-
July 16, 2018
-
Magento 2
-
0 Comments
It’s very simple. go to database and open “theme” table and delete all rows which theme are not exist. I think it will solve the issue.
Continue Reading
Magento 2 show template path hints
-
admin
-
July 16, 2018
-
Magento 2
-
0 Comments
For frontend: Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront > Yes For admin: Stores > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Admin > Yes With CLI: php bin/magento dev:template-hints:enable php bin/magento dev:template-hints:disable
Continue Reading
Image & js not working in admin & frontend in magento 2
-
admin
-
July 16, 2018
-
Magento 2
-
0 Comments
Run below command from your root folder. php bin/magento setup:static-content:deploy It will download the all content in respective folders. If you are in default or development mode use -f to forcefully download static content. php bin/magento setup:static-content:deploy -f It will download the all content in respective folders.
Continue Reading
One or more integrations have been reset because of a change to their xml configs
-
admin
-
July 16, 2018
-
Magento 2
-
0 Comments
This is not a bug. In Magento 2.2 makes new default integration. You can activate the link you shop to your Facebook Page and sync your Shop to the Shop on the Facebook page. You can ignore the message if you don’t want to use. You can disable with below command …………………………………………………………….. php bin/magento module:disable Shopial_Facebook
Continue Reading
Magento 2 cache clear with CLI
-
admin
-
July 16, 2018
-
Magento 2
-
0 Comments
Flush Cache Storage ……………………………….. php bin/magento cache:clean Short form flush Cache Storage …………………………………………………. php bin/magento c:c Flush Magento cache …………………………………. php bin/magento cache:flush short form flush Magento cache …………………………………………………… php bin/magento c:f How to check cache status ………………………………………… php bin/magento cache:status Disable Cache command line ……………………………………………… php bin/magento cache:disable Enable all cache types ………………………………….. …
Continue Reading
Uncaught exception ‘Magento\Framework\Exception\LocalizedException’ with message in Magento 2
-
admin
-
March 19, 2018
-
Magento 2
-
227 Comments
It’s only permission related issue. In CLI mode just follow the following command sudo chmod -R 777 <your folder>
Continue Reading
Libraries for data science in Python
-
admin
-
March 15, 2018
-
Python
-
0 Comments
Fundamental Libraries for Scientific Computing IPython Notebook NumPy pandas SciPy Math and Statistics SymPy Statsmodels Machine Learning Scikit-learn Shogun PyBrain PyLearn2 PyMC Plotting and Visualization Bokeh d3py ggplot matplotlib plotly prettyplotlib seaborn Data formatting and storage csvkit PyTables sqlite3
Continue Reading