Addded cifurl and -cable url to Preordercampaign
This commit is contained in:
@@ -358,7 +358,7 @@ class Preorder extends mfBaseModel {
|
||||
|
||||
public function createCiftoken() {
|
||||
$ciftoken = $this->generateNewCiftoken();
|
||||
while(PreorderModel::search(['ciftoken' => $ciftoken])) {
|
||||
while(PreorderModel::getFirst(['ciftoken' => $ciftoken])) {
|
||||
$ciftoken = $this->generateNewCiftoken();
|
||||
}
|
||||
$this->ciftoken = $ciftoken;
|
||||
@@ -375,6 +375,24 @@ class Preorder extends mfBaseModel {
|
||||
return $ciftoken;
|
||||
}
|
||||
|
||||
public function generateCifUrl() {
|
||||
$campaign = $this->getProperty("campaign");
|
||||
|
||||
$cifurl = $campaign->cifurl;
|
||||
str_replace("{{CIFTOKEN}}", $this->ciftoken, $cifurl);
|
||||
|
||||
return $cifurl;
|
||||
}
|
||||
|
||||
public function generateCifCableUrl() {
|
||||
$campaign = $this->getProperty("campaign");
|
||||
|
||||
$cifcableurl = $campaign->cifcableurl;
|
||||
str_replace("{{}}", $this->ciftoken, $cifcableurl);
|
||||
|
||||
return $cifcableurl;
|
||||
}
|
||||
|
||||
public function getCifdataApiArray() {
|
||||
if(!$this->id) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user