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
<?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. | |
import { Directive, ElementRef, Input } from '@angular/core'; | |
declare var ImgCache: any; | |
@Directive({ | |
selector: '[image-cache]' | |
}) | |
export class ImageCacheDirective { | |
constructor ( | |
private el: ElementRef |
Firstly install Brew on your MAC
Then install PHP
<?php | |
/** | |
* @author Godric Cao | |
*/ | |
namespace Vendor\Namespace\Model\Subscription\Order; | |
class Create | |
{ | |
public function __construct( | |
\Magento\Framework\App\Helper\Context $context, |
########################################################## | |
# PRODUCTS | |
########################################################## | |
DELETE FROM `catalog_product_bundle_option`; | |
DELETE FROM `catalog_product_bundle_option_value`; | |
DELETE FROM `catalog_product_bundle_selection`; | |
DELETE FROM `catalog_product_entity_datetime`; | |
DELETE FROM `catalog_product_entity_decimal`; | |
DELETE FROM `catalog_product_entity_gallery`; | |
DELETE FROM `catalog_product_entity_int`; |
<?php | |
#API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = $_GET['id']; | |
#prep the bundle | |
$msg = array | |
( | |
'body' => 'Body Of Notification', |
<?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(); |
🚨 2020 Update: I recommend using mkcert to generate local certificates. You can do everything below by just running the commands brew install mkcert
and mkcert -install
. Keep it simple!
This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl
, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.
sudo nano /etc/ssl/localhost/localhost.conf
#!/bin/bash | |
# ---------------------------------------------------- | |
# v. 20180308 | |
TARGET=/var/www/html | |
TMPTARGET=/var/www/codedeploy | |
BACKUP=/var/www/html-backup | |
USER=apache | |
GROUP=apache | |
# ---------------------------------------------------- |
<?php | |
/** | |
* Use | |
*/ | |
class Module_Adminhtml_Block_Config_Data extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract | |
{ | |
protected $_textareaRenderer; | |
public function __construct() | |
{ |