Skip to content

Instantly share code, notes, and snippets.

<?php
if (!empty($settings->discountReplace->enable) && $product['id'] == $settings->discountReplace->productId && $transType == $settings->discountReplace->type) {
$discounts = array(
'location' => $settings->discountReplace->location,
'division' => $settings->discountReplace->division,
'subdistributor' => $settings->discountReplace->subdistributor,
'distributor' => $settings->discountReplace->distributor
);
}
?>
<?php
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// BEGIN LOGIC TO ADD ACCOUNT
try {
$accountRes = self::createAccount($productDef, '1' . $phone, $productDef['apiServiceId'], $amount, true);
} catch (Exception $e) {
switch ($e->getCode()) {
case XXXX:
@kevinwritescode
kevinwritescode / Util_Svn.php
Created November 1, 2011 18:05
Quickly get the SVN revision number at the application level of a ZEND project
<?php
class Util_Svn
{
protected static $_revision;
/**
* Get the current SVN version at the application path folder
*
* @return string Revision Number
@kevinwritescode
kevinwritescode / Util_Lang.php
Created November 1, 2011 17:52
Translation Init Example with Abstract DIP
<?php
class Util_Lang
{
protected static $_class;
protected static $_session;
/**
* Get a translated value and possibly replace with real time data
* If the value does not exist, a phrase will be auto generated from key