Firstly install Brew on your MAC
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install PHP
- brew update
- brew tap homebrew/dupes
- brew tap homebrew/php
- brew install php56
SELECT sub_query.month_ordered, | |
sub_query.year_ordered, | |
SUM(sub_query.base_subtotal) AS sum_base_subtotal, | |
SUM(sub_query.discount_amount) AS sum_discount_amt, | |
SUM(sub_query.order_qty) AS sum_total_item_count, | |
COUNT(sub_query.entity_id) AS total_orders | |
FROM | |
(SELECT so.entity_id, | |
MONTH(so.created_at) AS month_ordered, | |
YEAR(so.created_at) AS year_ordered, |
<?php | |
/****************************************************************************************************************** | |
* Source: http://www.emvee-solutions.com/blog/magento-custom-reindex-script/ | |
* | |
* Custom Magento re-indexing script | |
******************************************************************************************************************/ | |
//Place this file in your Magento root folder, or modify the require once to match your directory. | |
<?php | |
/** | |
* Copyright © Magento, Inc. All rights reserved. | |
* See COPYING.txt for license details. | |
*/ | |
declare(strict_types=1); | |
namespace Magento\MediaStorage\Service; | |
use Magento\Catalog\Helper\Image as ImageHelper; |
<?php | |
defined('STDIN') or die(_("Access Denied. CLI Only")); | |
// execute from the command line: php <path to magento root>/cli/create_attributes.php | |
require __DIR__.'/../app/bootstrap.php'; // assuming this file is in /cli under the root magento dir | |
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); | |
$installer = $bootstrap->getObjectManager()->create('Magento\Catalog\Setup\CategorySetup'); | |
$objectManager = $bootstrap->getObjectManager(); |
<?php | |
define('MAGENTO', realpath(dirname(__FILE__))); | |
require_once MAGENTO . '/app/Mage.php'; | |
Mage::app(); | |
$category = Mage::getModel ('catalog/category'); | |
$tree = $category->getTreeModel(); | |
$tree->load(); |
<?php | |
/** | |
* Use | |
*/ | |
class Module_Adminhtml_Block_Config_Data extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract | |
{ | |
protected $_textareaRenderer; | |
public function __construct() | |
{ |
<?php | |
/** | |
* @author Godric Cao | |
*/ | |
namespace Vendor\Namespace\Model\Subscription\Order; | |
class Create | |
{ | |
public function __construct( | |
\Magento\Framework\App\Helper\Context $context, |
#!/bin/bash | |
# ---------------------------------------------------- | |
# v. 20180308 | |
TARGET=/var/www/html | |
TMPTARGET=/var/www/codedeploy | |
BACKUP=/var/www/html-backup | |
USER=apache | |
GROUP=apache | |
# ---------------------------------------------------- |
Firstly install Brew on your MAC
Then install PHP