SQL Query:
SELECT t1.stone FROM newatt t1 LEFT JOIN att t2 ON t2.stone = t1.stone WHERE t2.stone IS NULL
newatt = new table (contains updated extra rows)
att = old table
stone = column name on both tables
SQL Query:
SELECT t1.stone FROM newatt t1 LEFT JOIN att t2 ON t2.stone = t1.stone WHERE t2.stone IS NULL
newatt = new table (contains updated extra rows)
att = old table
stone = column name on both tables
Connect to your server’s database using mysql cli or phpmyadmin and use the following query
INSERT INTO `directory_country_region` VALUES (NULL,"IN","AP","Andhra Pradesh"), (NULL,"IN","AR","Arunachal Pradesh"), (NULL,"IN","AS","Assam"), (NULL,"IN","BR","Bihar"), (NULL,"IN","CG","Chhattisgarh"), (NULL,"IN","GA","Goa"), (NULL,"IN","GJ","Gujarat"), (NULL,"IN","HR","Haryana"), (NULL,"IN","HP","Himachal Pradesh"), (NULL,"IN","JK","Jammu and Kashmir"), (NULL,"IN","JH","Jharkhand"), (NULL,"IN","KA","Karnataka"), (NULL,"IN","KL","Kerala"), (NULL,"IN","MP","Madhya Pradesh"), (NULL,"IN","MH","Maharashtra"), (NULL,"IN","MN","Manipur"), (NULL,"IN","ML","Meghalaya"), (NULL,"IN","MZ","Mizoram"), (NULL,"IN","NL","Nagaland"), (NULL,"IN","OD","Odisha"), (NULL,"IN","PB","Punjab"), (NULL,"IN","RJ","Rajasthan"), (NULL,"IN","SK","Sikkim"), (NULL,"IN","TN","Tamil Nadu"), (NULL,"IN","TL","Telangana"), (NULL,"IN","TR","Tripura"), (NULL,"IN","UK","Uttarakhand"), (NULL,"IN","UP","Uttar Pradesh"), (NULL,"IN","WB","West Bengal"), (NULL,"IN","AN","Andaman and Nicobar Islands"), (NULL,"IN","CH","Chandigarh"), (NULL,"IN","DH","Dadra and Nagar Haveli"), (NULL,"IN","DD","Daman and Diu"), (NULL,"IN","DL","Delhi"), (NULL,"IN","LD","Lakshadweep"), (NULL,"IN","PY","Puducherry");
Use this code:
<?php use \Magento\Framework\App\Bootstrap; echo 'code by harshvardhanmalpani'; include('./app/bootstrap.php'); $bootstrap = Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->getObjectManager(); function createCategory($a='',$b=2,$c=true,$d='',$e='',$f='',$g='') { global $objectManager; $category = $objectManager->get('\Magento\Catalog\Model\CategoryFactory')->create(); $category->setName($a); $category->setParentId($b); // 1: root category. $category->setIsActive($c); $category->setCustomAttributes([ 'description' => $d, 'meta_title' => $e, 'meta_keywords' => $f, 'meta_description' => $g, ]); $objectManager->get('\Magento\Catalog\Api\CategoryRepositoryInterface')->save($category); } createCategory("Abc"); createCategory("Xyz",4,false,"description","m title"); ?>
The process involves matching all requests for an
RewriteCond %{REMOTE_ADDR} !^120\.120\.120\.120 RewriteRule ^admin/.* - [L,R=403] RewriteCond %{REMOTE_ADDR} ^120\.120\.120\.120 RewriteRule ^admin$ - [L,R=403]
If you want to control this IP using a script, you can add 2 lines
###CUSTOM RULES### # your rules will appear here using php script ###CUSTOM RULES###
Now add a script, say happy.php
and use the following code:
$htaccess = file_get_contents('.htaccess'); $ip= str_replace(".","\.",$_SERVER['REMOTE_ADDR']); $rules="RewriteCond %{REMOTE_ADDR} !^".$ip." RewriteRule ^admin/.* - [L,R=403] RewriteCond %{REMOTE_ADDR} !^".$ip." RewriteRule ^admin$ - [L,R=403]"; $problem="###CUSTOM RULES###\r\n".$rules. "\r\n###CUSTOM RULES###"; #please copy the next line carefully, no extra spaces or new lines $solution=preg_replace('/###CUSTOM RULES###.*?###CUSTOM RULES###/sm',$problem,$htaccess); file_put_contents('.htaccess', $solution);
you can also specify your error page for specific http code: 403ErrorDocument 403 /er.htm
=IF(COUNTIF($B:$B, $A1)=0, $A1, “”)
Go to the attribute edit page using magento 2 admin panel (Stores > Attributes > Product > Edit attribute)
Use console – ctrl + shift + J
Edit the js array mimim and then paste the following code in console.
$jq=new jQuery.noConflict(); var mimim=["Black","Blue","Blue Black"]; $jq.each(mimim,function(a,b){ $jq("#add_new_option_button").click(); $jq("#manage-options-panel tbody tr:last-child td:nth-child(3) input").val(b); });
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 777 {} \;
find ./media -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
php bin/magento deploy:mode:show
php bin/magento deploy:mode:set production
php bin/magento deploy:mode:set developer
composer require magento/product-community-edition 2.1.9 --no-update composer update rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* php bin/magento cache:clean php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy php bin/magento indexer:reindex
cd ~/public
chmod 750 mage
./mage mage-setup .
./mage config-set preferred_state stable
./mage sync
./mage install https://connect20.magentocommerce.com/community Mage_All_Latest --force
php shell/indexer.php reindexall
rm -rf downloader/.cache/ var/cache/