This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --restart=unless-stopped --name=container_name_elasticsearch -p 123456:9200 -e "discovery.type=single-node" -v /home/www/project/.es_data:/usr/share/elasticsearch/data elasticsearch:7.6.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -rnw '/var/www/project/vendor/' -e 'toto.log' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE catalog_product_entity_int_old LIKE catalog_product_entity_int; | |
INSERT INTO catalog_product_entity_int_old SELECT * FROM catalog_product_entity_int; | |
DELETE FROM catalog_product_entity_int | |
WHERE value_id IN | |
(SELECT cpei.value_id | |
FROM catalog_product_entity_int_old cpei | |
WHERE cpei.attribute_id NOT IN | |
(SELECT eea.attribute_id | |
FROM eav_entity_attribute eea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sources: https://community.atlassian.com/t5/Bitbucket-questions/Is-there-a-way-to-delete-branches-in-bulk/qaq-p/547331 | |
# Make sure remotes are up to date (with stale remotes purged): | |
git fetch -p | |
# Initial no-op run --- do the branches to delete look correct? | |
# Be careful to omit 'master' from the output. | |
git branch --remote --merged origin/master | grep -v 'master' | cut -b 10- | xargs | |
# Do the bulk delete!!! (can take a long time...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git update-index --assume-unchanged media/downloadable/.htaccess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT e.entity_id AS 'id', | |
v1.value AS 'name', | |
e.sku, | |
d1.value AS 'price', | |
si.qty AS 'qty', | |
t1.value AS 'short_description', | |
t2.value AS 'description', | |
v2.value AS 'image', | |
v3.value AS 'thumbnail', | |
mg.value AS 'media_gallery', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get all product category IDs | |
$categoryIds = $product->getCategoryIds(); | |
// Get category trees, filtered by product category IDs | |
$helper = Mage::helper('catalog/category'); | |
$categoryTreeCollection = $helper->getStoreCategories('path', true, false); | |
$categoryTreeCollection->addAttributeToFilter('entity_id', ['in' => $categoryIds]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -L app/design/frontend -name 'shipping.phtml' -or -name 'billing.phtml' -or -name 'shipping_method.phtml' -or -name 'payment.phtml' -or -name 'addresses.phtml' \ | |
| xargs grep -L formkey \ | |
| xargs perl -i -pe 's/<\/form>/<?php echo \$this->getBlockHtml("formkey") ?>\n<\/form>/g' | |
find -L skin/frontend -name 'opcheckout.js' \ | |
| xargs grep -L form_key \ | |
| xargs perl -i -pe 's/if \(elements\[i\]\.name=='\''payment\[method\]'\''\) \{/if (elements[i].name=='\''payment[method]'\'' || elements[i].name == '\''form_key'\'') {/g' | |
find -L js -name 'payment.js' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################### | |
# Magento .gitignore # | |
###################### | |
# Magento Core unnecessary files # | |
################################## | |
/errors/local.xml | |
/index.php | |
/install.php | |
/mage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "cd /var/www/magento" >> /home/vagrant/.bashrc |
NewerOlder