Skip to content

Instantly share code, notes, and snippets.

@jonathandavis
Last active December 19, 2015 15:20
Show Gist options
  • Select an option

  • Save jonathandavis/5975917 to your computer and use it in GitHub Desktop.

Select an option

Save jonathandavis/5975917 to your computer and use it in GitHub Desktop.
<?php
function freebie () {
if ( $this->Cart->orderisfree() ) {
$this->processor = 'FreeOrder';
$this->processor($this->processor);
$this->Billing->cardtype = __('Free Order','Shopp');
} elseif ( 'FreeOrder' == $this->processor ) {
// If the order is not free, but the order processor is still set to free order,
// reset the processor to use the default
return $this->processor = false;
} else return false;
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment