#Inspection Tools with homebrew-php#
##Prerequisites##
- Homebrew is installed
##Step 1: Installing homebrew-php##
brew tap homebrew/dupesbrew tap josegonzalez/homebrew-phpbrew install PHP53(or other version of your choice)
#Inspection Tools with homebrew-php#
##Prerequisites##
##Step 1: Installing homebrew-php##
brew tap homebrew/dupesbrew tap josegonzalez/homebrew-phpbrew install PHP53 (or other version of your choice)| { | |
| // http://eslint.org/docs/rules/ | |
| "ecmaFeatures": { | |
| "binaryLiterals": false, // enable binary literals | |
| "blockBindings": false, // enable let and const (aka block bindings) | |
| "defaultParams": false, // enable default function parameters | |
| "forOf": false, // enable for-of loops | |
| "generators": false, // enable generators | |
| "objectLiteralComputedProperties": false, // enable computed object literal property names |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /Users/YOUR_USERNAME/Sites; | |
| access_log /Library/Logs/default.access.log main; | |
| location / { | |
| include /usr/local/etc/nginx/conf.d/php-fpm; | |
| } |
| find . -type f -exec chmod 644 {} \; // 644 permission for files | |
| find . -type d -exec chmod 755 {} \; // 755 permission for directory | |
| find ./var -type d -exec chmod 777 {} \; // 777 permission for var folder | |
| find ./pub/media -type d -exec chmod 777 {} \; | |
| find ./pub/static -type d -exec chmod 777 {} \; |
The array of data you can pass to the \Magento\Eav\Setup\EavSetup::addAttribute() method is as follows:
$data = [
'group' => 'General', // Name ofgroup in product admin page to place attribtue
'type' => 'varchar', // database storeage type (varchar|int|text|decimal)
'sort_order' => 1000,
'backend' => '', // backend_model: class name used to retrieve/save the attribute data to the db
'frontend' => '', // frontend_model: ????
'label' => 'UPC', // frontend_label: the label text
| <?php | |
| use Magento\Framework\App\Bootstrap; | |
| include('app/bootstrap.php'); | |
| $bootstrap = Bootstrap::create(BP, $_SERVER); | |
| $objectManager = $bootstrap->getObjectManager(); | |
| $state = $objectManager->get('Magento\Framework\App\State'); | |
| $state->setAreaCode('frontend'); |
| <?xml version="1.0"?> | |
| <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd"> | |
| <acl> | |
| <resources> | |
| <resource id="Magento_Backend::admin"> | |
| </resource> | |
| </resources> | |
| </acl> | |
| </config> |
| setup | |
| ----- | |
| php bin/magento setup:upgrade | |
| php bin/magento setup:static-content:deploy | |
| php bin/magento setup:di:compile | |
| module | |
| ------ | |
| php bin/magento module:status | |
| php bin/magento module:enable Kahanit_TableRateShipping |
| SET FOREIGN_KEY_CHECKS = 0; | |
| #clear orders | |
| 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`; |