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 bin/magento s:up - Setup Upgrade | |
| php bin/magento s:up --keep-generated | |
| php bin/magento c:c - Cache Flush | |
| php bin/magento c:f - Cache Flush | |
| php bin/magento c:d - Disable Cache | |
| php bin/magento c:e - Enable Cache | |
| php bin/magento i:rei - Reindexing | |
| php bin/magento i:i - View the list of indexers | |
| php bin/magento i:st - Indexer status | |
| php bin/magento i:res - Indexer Resets |
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
| Compress: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file | |
| Extract: tar -xzvf archive.tar.gz | |
| compress with exclusion of some folders: | |
| tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz . | |
| To find the files using it's name: | |
| find <path> -name "filename-with-extension" |
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
| $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log'); | |
| $logger = new \Zend\Log\Logger(); | |
| $logger->addWriter($writer); | |
| $logger->info('Your text message'); |
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
| //$eavSetup->updateAttribute(Product::ENTITY, $attributeCode, $attributeField, $value); | |
| $eavSetup->updateAttribute('catalog_product', 'price', 'position', 100); |
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 | |
| namespace Gideon\Returns\Setup; | |
| use Magento\Eav\Setup\EavSetupFactory; | |
| use Magento\Framework\Setup\ModuleContextInterface; | |
| use Magento\Framework\Setup\ModuleDataSetupInterface; | |
| use Magento\Framework\Setup\UpgradeDataInterface; | |
| use \Magento\Framework\App\ObjectManager; | |
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 | |
| namespace Company\Module\Block\Product\ProductList; | |
| class Toolbar extends \Magento\Catalog\Block\Product\ProductList\Toolbar | |
| { | |
| public function setCollection($collection) { | |
| $this->_collection = $collection; | |
| $this->_collection->setCurPage($this->getCurrentPage()); | |
NewerOlder