Skip to content

Instantly share code, notes, and snippets.

@enminc
enminc / putMethodsInYourClass .php
Last active August 29, 2015 14:00
modx.getSnippet
<?php
/**
* Similar in practice to localizing getChunk and _getChunkTpl
* in your class to pull chunks from disk but for snippet code
*/
class putMethodsInYourClass {
/**
@enminc
enminc / onelementnotfound.plugin.php
Created December 17, 2015 17:49
MODX OnElementNotFound plugin demo
<?php
/**
* MODX Revolution OnElementNotFound plugin
* Add static elements inside categories for defined packages OnElementNotFound
*
* Author: Jeroen Kenters / www.kenters.com
* Version: 1.0.0-beta
* License: GPL
*
* Warning:
@enminc
enminc / README.md
Created March 6, 2017 21:47 — forked from lavaxun/README.md
Rancher on docker-for-mac with xhyve

Install Docker for Mac (http://beta.docker.com)

Install docker-machine-driver-xhyve (https://github.com/zchee/docker-machine-driver-xhyve)

brew install docker-machine-driver-xhyve
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

Deploy the latest release

<?php
$feeds = array(
array('transaction_id' => 123,'customer' => array('...customer data...'),'details' => array('...line items...')),
array('transaction_id' => 456,'customer' => array('...customer data...'),'details' => array('...line items...'))
);
foreach($feeds as $transaction) {
$detailTrans = array();
<?xml version="1.0" encoding="UTF-8"?>
<model package="gbfoxycart" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
<object class="FCartTransactionCustomer" table="gbfoxycart_transaction_customer" extends="xPDOSimpleObject">
<field key="transaction_id" dbtype="int" precision="11" phptype="integer" null="false" index="index" />
<field key="transaction_date" dbtype="timestamp" phptype="timestamp" null="false" default="CURRENT_TIMESTAMP" index="index" extra="on update current_timestamp" />
<field key="customer_id" dbtype="int" precision="11" phptype="integer" null="false" />
<field key="is_anonymous" dbtype="tinyint" precision="1" phptype="integer" null="false" />
<field key="customer_first_name" dbtype="varchar" precision="50" phptype="string" null="false" />
<field key="customer_last_name" dbtype="varchar" precision="50" phptype="string" null="false" />