Created
March 26, 2014 03:18
-
-
Save jimbojsb/9776400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function getActionText() | |
{ | |
session_start(); | |
if($this->coupon_image) { | |
$action = 'view coupon'; | |
} else if($this->in_store) { | |
if($this->product_deal) { | |
$action = 'get deal'; | |
} else { | |
$action = 'view coupon'; | |
} | |
} else if($this->hasCoupon()) { | |
if($_SESSION['button-test'] == 1) { | |
$action = 'get code'; | |
} else { | |
$action = 'reveal code'; | |
} | |
} else if($this->isFree() && $this->format == Offers_Model_Offer::FORMAT_PROMO) { | |
$action = 'get offer'; | |
} else if($this->isDeal()) { | |
if($_SESSION['button-test'] == 2) { | |
$action = 'score deal'; | |
} else { | |
$action = 'get deal'; | |
} | |
} else if ($this->action) { | |
//OFR-13358 | |
$action = $this->action; | |
} else if ($this->format == Offers_Model_Offer::FORMAT_PROMO) { | |
if($_SESSION['button-test'] == 3) { | |
$action = 'get savings'; | |
} else { | |
$action = 'apply savings'; | |
} | |
} else { | |
$action = 'get offer'; | |
} | |
return ucwords(strtolower($action)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment