Magento 2 delete all Orders/Invoices data from database
-
admin
-
February 3, 2019
-
Magento 2
-
0 Comments
SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE `gift_message`; TRUNCATE TABLE `quote`; TRUNCATE TABLE `quote_address`; TRUNCATE TABLE `quote_address_item`; TRUNCATE TABLE `quote_id_mask`; TRUNCATE TABLE `quote_item`; TRUNCATE TABLE `quote_item_option`; TRUNCATE TABLE `quote_payment`; TRUNCATE TABLE `quote_shipping_rate`; TRUNCATE TABLE `reporting_orders`; TRUNCATE TABLE `sales_bestsellers_aggregated_daily`; TRUNCATE TABLE `sales_bestsellers_aggregated_monthly`; TRUNCATE TABLE `sales_bestsellers_aggregated_yearly`; TRUNCATE TABLE `sales_creditmemo`; TRUNCATE TABLE `sales_creditmemo_comment`; TRUNCATE TABLE `sales_creditmemo_grid`; TRUNCATE TABLE `sales_creditmemo_item`; TRUNCATE TABLE `sales_invoice`; TRUNCATE TABLE …
Continue Reading
Magento 2.x auto mini cart open extension
-
admin
-
January 31, 2019
-
Magento 2
-
0 Comments
I have been develop an extension for mini cart alert after adding product in Magento 2.x. It will focus to customer for attention. Customer can check what he added product into cart. Specially it will help to B2B customer. Download here After install the extension run following command with cli mode. php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f php bin/magento …
Continue Reading
Magento 2 add simple product programmatically
-
admin
-
January 30, 2019
-
Magento 2
-
0 Comments
just create a file like upload.php and run from root directory. <?php use \Magento\Framework\App\Bootstrap; include(‘app/bootstrap.php’); $bootstraps = Bootstrap::create(BP, $_SERVER); $object_Manager = $bootstraps->getObjectManager(); $app_state = $object_Manager->get(‘\Magento\Framework\App\State’); $app_state->setAreaCode(‘frontend’); $set_product = $object_Manager->create(‘\Magento\Catalog\Model\Product’); try{ $set_product->setWebsiteIds(array(1)); $set_product->setAttributeSetId(4); $set_product->setTypeId(‘simple’); $set_product->setCreatedAt(strtotime(‘now’)); $set_product->setName(‘BD product simple product’); $set_product->setSku(‘bd-pro-simple’); $set_product->setWeight(1.0000); $set_product->setStatus(1); $category_id= array(4,5,6,7); $set_product->setCategoryIds($category_id); $set_product->setTaxClassId(0); $set_product->setVisibility(4); $set_product->setManufacturer(29); $set_product->setColor(20); $set_product->setPrice(1999); $set_product->setCost(1800); $set_product->setMsrpDisplayActualPriceType(1); $set_product->setMetaTitle(‘BD product simple product’); $set_product->setMetaKeyword(‘BD product simple product’); $set_product->setMetaDescription(‘BD …
Continue Reading
Magento 2 install with cli mode
-
admin
-
January 30, 2019
-
Magento 2
-
0 Comments
Go to your root directory C:\xampp\htdocs\magento2> and run following command php bin/magento setup:install –base-url=”http://127.0.0.1/magento2/” –db-host=”localhost” –db-name=”databasename” –db-user=”databaseuser” –db-password=”databasepass” –admin-firstname=”Yourname” –admin-lastname=”Yourname” –admin-email=”borntowinanwar@gmail.com” –admin-user=”admin” –admin-password=”strongpassword” –backend-frontname=”admin”
Continue Reading
Magento 2 after install shows blank page
-
admin
-
January 30, 2019
-
Magento 2
-
0 Comments
Please below instruction hope it will resolve. Just got to vendor/magento/framework/View/Element/Template/File/validation.php And go to line 138 lines Replace $realPath = $this->fileDriver->getRealPath($path); foreach ($directories as $directory) { if (0 === strpos($realPath, $directory)) { return true; } } With $realPath = $this->fileDriver->getRealPath($path); foreach ($directories as $directory) { $directory = $this->fileDriver->getRealPath($path); if (0 === strpos($realPath, $directory)) { return true; } }
Continue Reading
Notice: unserialize(): Unexpected end of serialized data in Magento 2 data migration
-
admin
-
January 27, 2019
-
Magento 2
-
0 Comments
Just follow the following step. Go to /yii/caching/CCache.php file and replace with following code. $value=unserialize($value); Change to : $value=unserialize(base64_decode($value)); It will work fine. hope so
Continue Reading
magento 2 not working after the command bin/magento setup:di:compile
-
admin
-
January 21, 2019
-
Magento 2
-
0 Comments
Very simple. please run following command: php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f php bin/magento cache:clean php bin/magento cache:flush 🙂
Continue Reading
Deprecated: The each() function is deprecated. C:\xampp\apps\magento\htdocs\vendor\colinmollenhour\cache-backend-file\File.php on line 81
-
admin
-
January 14, 2019
-
Magento 2
-
0 Comments
This is probably because you use php 7.2 which Magento doesn’t support currently, even in 2.3 pre-release. You can downgrade to php 7.1.X and use Magento 2.2.X or downgrade to php 7.0.7.X and use Magento 2.1.X.
Continue Reading
django.db.utils.OperationalError: no such table: auth_user
-
admin
-
December 26, 2018
-
Python
-
0 Comments
just run below command from root directory.>>>python manage.py migrate
Continue Reading
scrapy version check with CLI mode
-
admin
-
December 24, 2018
-
Python
-
0 Comments
It’s very simple, just run below command.>>> scrapy version
Continue Reading