curl -LO https://deployer.org/deployer.phar && sudo mv deployer.phar /usr/local/bin/dep && sudo chmod +x /usr/local/bin/dep
composer require deployer/recipes --dev
composer require rafaelstz/deployer-magento2 dev-master --dev
This file contains 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 | |
return array ( | |
'backend' => | |
array ( | |
'frontName' => 'admin', | |
), | |
'crypt' => | |
array ( | |
'key' => '2c4f7c9688dc808fe2e23935f7eeb255', | |
), |
This file contains 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
# Get the each customer sales and orders total | |
SELECT | |
-- Round to two decimal places and prepend with $ | |
CONCAT('$', FORMAT(SUM(sales_flat_order.`grand_total`), 2)) AS 'Lifetime Sales', | |
COUNT(sales_flat_order.entity_id) AS 'Orders', | |
customer_entity.email AS 'Email', | |
MAX(sales_flat_order.created_at) AS 'Most Recent Order Date' | |
FROM `customer_entity` | |
LEFT JOIN sales_flat_order ON customer_entity.entity_id = sales_flat_order.customer_id |
This file contains 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
{"http-basic": {"repo.magento.com": {"username":"4663362708601ec0c460a36edf59c70d","password":"f30b05a56f3b06d8b134ef93da73be5e"}}} |
This file contains 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
SET FOREIGN_KEY_CHECKS = 0; | |
-- Truncate order tables | |
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`; |
This file contains 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
# Allow Full Access | |
User-agent:* | |
Disallow: | |
# Disallow Access to All Folders | |
User-agent:* | |
Disallow: / |
This file contains 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
$params = $_SERVER; | |
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'website_code'; | |
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website'; | |
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params); |
This file contains 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 | |
function sign($method, $url, $data, $consumerSecret, $tokenSecret) | |
{ | |
$url = urlEncodeAsZend($url); | |
$data = urlEncodeAsZend(http_build_query($data, '', '&')); | |
$data = implode('&', [$method, $url, $data]); | |
$secret = implode('&', [$consumerSecret, $tokenSecret]); | |
This file contains 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 | |
// Created by Rafael Corrêa Gomes | |
// Reference http://devdocs.magento.com/guides/m1x/api/rest/introduction.html#RESTAPIIntroduction-RESTResources | |
// Custom Resource | |
$apiResources = "products?limit=2"; | |
// Custom Values | |
$isAdminUser = true; | |
$adminUrl = "admin"; |