Skip to content

Instantly share code, notes, and snippets.

View cgsmith's full-sized avatar
👋
Available to work on your projects!

Chris Smith cgsmith

👋
Available to work on your projects!
View GitHub Profile
<?php
namespace Application\Router;
/**
* Class RestRoute
*
* Extends \Zend_Controller_Router_Route and handles methods in the router
*
* @author Chris Smith
*/
<?=('services' == $navigationPage)?'class="active"':;?>
@cgsmith
cgsmith / vagrant.log
Created August 26, 2014 16:08
Vagrant Debug
$ VAGRANT_LOG=debug vagrant package --base freebsd-9.2 --vagrantfile freebsd-9.2.box
INFO global: Vagrant version: 1.6.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant"
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Linux"
INFO global: VAGRANT_INSTALLER_ENV="1"
<?php
// This is what the delete method looks like now
function delete($id) {
$bean = R::load($this->className,$id);
R::trash($bean);
$this->render($this->className.'/all','deleted');
}
<input id="qty" type="text" value="" name="qty[]">
<input id="upc" type="text" value="" name="upc[]" disabled>
<input id="name" type="text" value="" name="name[]" disabled>
<input id="price" type="text" value="" name="price[]" disabled>
<input id="extprice" type="text" value="" name="extprice[]" disabled>
<br/>
@cgsmith
cgsmith / info.php
Created October 8, 2013 17:39
PHP Info Test
<?php
echo phpinfo();
?>
@cgsmith
cgsmith / header.php
Created October 4, 2013 00:16
Standard Jetz File
<link rel="stylesheet" href = "<?php echo $this->getThemePath(); ?>/css/jetz_css.css" />
<link href='http://fonts.googleapis.com/css?family=Audiowide' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Alex+Brush' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="header-container"><!-- start main container -->
<!-- logo section -->
@cgsmith
cgsmith / config.php
Created August 22, 2013 14:27
PHP Mail Configuration
<?php
/*
=========================================================================
General settings for language and database
=========================================================================
<?php
$proxy = new SoapClient($host.$path);
$session = $proxy->login($user,$pass);
try {
$order = $proxy->salesOrderInfo($session,$increment_id,array(),'Test Addition',1);
try {
$shipmentId = $proxy->salesOrderShipmentCreate($session,$increment_id);
try {
$proxy->salesOrderShipmentAddTrack($session, $shipmentId, $carrier, 'FedEx Ground', $tracking_id);
echo 'Tracking created for '.$increment_id.'<br>';
@cgsmith
cgsmith / paypal.php
Last active December 20, 2015 03:19
<?php
# Prepare Data to send
$params = array(
'USER' => trim($this->config->get($classname . '_mid')),
'VENDOR' => trim($this->config->get($classname . '_vendor')),
'PARTNER' => trim($this->config->get($classname . '_partner')),
'PWD' => trim($this->config->get($classname . '_key')),
'CREATESECURETOKEN' => 'Y',
'TRXTYPE' => $this->config->get($classname . '_mode'),
'AMT' => $amount,