Skip to content

Commit

Permalink
conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
vinvin27 committed Jun 25, 2015
1 parent af69057 commit e9cee05
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 112 deletions.
40 changes: 1 addition & 39 deletions classes/Campaign.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<?php


<<<<<<< HEAD
require_once (dirname(__FILE__) . '/../superabandonedcart.php');
=======
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469

class Campaign extends ObjectModel {

Expand Down Expand Up @@ -66,29 +63,6 @@ class Campaign extends ObjectModel {
'type' => ObjectModel::TYPE_STRING,
'required' => true
)
<<<<<<< HEAD
=======
/*,
'voucher_name' => array(
'type' => ObjectModel::TYPE_STRING,
'required' => true
),
'voucher_code' => array(
'type' => ObjectModel::TYPE_STRING
),
'voucher_amount_type' => array(
'type' => ObjectModel::TYPE_STRING,
'required' => true
),
'voucher_amount_value' => array(
'type' => ObjectModel::TYPE_STRING,
'required' => true
),
'voucher_date_to' => array(
'type' => ObjectModel::TYPE_STRING,
'required' => true
)*/
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
)
);

Expand Down Expand Up @@ -120,32 +94,20 @@ public function getFileName($ext = ''){
$tpl_file_name = $this->name;
$except = array('\\', '/', ':', '*', '?', '"', '<', '>', '|',' ');
$tpl_file_name = strtolower(str_replace($except, '', $tpl_file_name));
<<<<<<< HEAD
$unwanted_array = array(
'Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
=======
$unwanted_array = array( 'Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U',
'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c',
'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o',
'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y' );
$tpl_file_name = strtr( $tpl_file_name, $unwanted_array );
if( !empty($ext) ) { $ext = '.'.$ext; }
<<<<<<< HEAD

=======
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
return $tpl_file_name.$ext;

}

<<<<<<< HEAD
public function getCartContentHeader(){
$module = new superabandonedcart();
return $module->getCartContentHeader();
}

=======
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
}
}
9 changes: 1 addition & 8 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@
<module>
<name>superabandonedcart</name>
<displayName><![CDATA[Super Abandoned Cart]]></displayName>
<<<<<<< HEAD
<version><![CDATA[1.1.1]]></version>
<description><![CDATA[Increase your sales thanks to abandoned cart]]></description>
<author><![CDATA[Vince4digitalife]]></author>
<tab><![CDATA[checkout]]></tab>
=======
<version><![CDATA[1.0.1]]></version>
<description><![CDATA[Increase your sales thanks to abandoned cart]]></description>
<author><![CDATA[Vince4digitalife]]></author>
<tab><![CDATA[front_office_features]]></tab>
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>
</module>
65 changes: 0 additions & 65 deletions controllers/admin/AdminSuperAbandonedCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,12 @@ public function renderList() {
$cron_url = Tools::getHttpHost(true).'/modules/superabandonedcart/launch_campaings.php';

$header = '<div class="alert alert-info">
<<<<<<< HEAD
<p> '. $this->l('Don\'t forget to set cron task :') .' </p>
<p><b> 30 * * * * '.$cron_url.'</b></p>
<br/>
<p><b>'. $this->l('All email send is also send to : ') . Configuration::get('PS_SHOP_EMAIL') .'</b></p>
=======
<p>Don\'t forget to set cron task : </p>
<p><b> 30 * * * * '.$cron_url.'</b></p>
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
</div>';
return $header . parent::renderList();
}
Expand Down Expand Up @@ -159,13 +154,8 @@ public function renderForm() {
'label' => $this->l('Campaign name : '),
'name' => 'name',
'required' => true,
<<<<<<< HEAD
'class' => 't',
'desc' => 'Also mail subject'

=======
'class' => 't'
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
),
array(
'type' => 'select',
Expand Down Expand Up @@ -201,7 +191,6 @@ public function renderForm() {
'class' => 'rte',
'autoload_rte' => true,
'required' => true,
<<<<<<< HEAD
'desc' => $this->l('Available variables : {firstname} , {lastname} , {coupon_name} , {coupon_code} , {coupon_value} , {coupon_valid_to} , {campaign_name}, {cart_content}')
),
array(
Expand All @@ -223,45 +212,29 @@ public function renderForm() {
'label' => $this->l('Disabled')
)
)
=======
'desc' => $this->l('Available variables : {firstname} , {lastname} , {coupon_name} , {coupon_code} , {coupon_value} , {coupon_valid} , {campaign_name}, {cart_content}')
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
),
array(
'type' => 'text',
'label' => $this->l('Voucher name : '),
'name' => 'voucher_name',
'size' => 60,
<<<<<<< HEAD
'class' => 'voucher_mode',
=======
'required' => true,
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
'desc' => $this->l('Name of the voucher')
),
array(
'type' => 'text',
'label' => $this->l('Voucher code : '),
'name' => 'voucher_code',
'size' => 60,
<<<<<<< HEAD
'class' => 'voucher_mode',
=======
'required' => true,
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
'desc' => $this->l('If empty, code will automatically generated.')
),
array(
'type' => 'select',
'label' => $this->l('Voucher percent or fixed : '),
'name' => 'voucher_amount_type',
<<<<<<< HEAD
'desc' => $this->l('Is an percentage or fixe voucher?'),
'class' => 'voucher_mode',
=======
'required' => true,
'desc' => $this->l('Is an percentage or fixe voucher?'),
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
'options' => array(
'query' => $voucher_type,
'id' => 'voucher_type',
Expand All @@ -272,36 +245,22 @@ public function renderForm() {
'type' => 'text',
'label' => $this->l('Voucher value : '),
'name' => 'voucher_amount_value',
<<<<<<< HEAD
'class' => 'voucher_mode',
'size' => 60,
=======
'size' => 60,
'required' => true,
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
'desc' => $this->l('Voucher value ?')
),
array(
'type' => 'text',
'label' => $this->l('Voucher valid to : '),
'name' => 'voucher_date_to',
'size' => 60,
<<<<<<< HEAD
'class' => 'datepicker input-medium voucher_mode',
=======
'class' => 'datepicker input-medium',
'required' => true,
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
'desc' => $this->l('If empty, code will automatically generated.')
),
array(
'type' => 'radio',
'label' => $this->l('Status'),
'name' => 'active',
<<<<<<< HEAD
=======
'required' => false,
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
'class' => 't',
'is_bool' => true,
'values' => array(
Expand Down Expand Up @@ -337,7 +296,6 @@ public function renderForm() {
'class' => 'button'
);

<<<<<<< HEAD
//update way :
$extra = '';
if ($id_campaign = Tools::getValue('id_campaign')){
Expand All @@ -355,12 +313,10 @@ public function renderForm() {
}

return $extra . parent::renderForm();
=======



return parent::renderForm();
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
}


Expand All @@ -375,7 +331,6 @@ public function postProcess() {

if (count($this->errors))
return false;
<<<<<<< HEAD

// ADD WAY
if ( ( !$id_campaign = (int) Tools::getValue('id_campaign') ) && empty($this->errors) ) {
Expand Down Expand Up @@ -417,9 +372,6 @@ public function postProcess() {

}


=======


//if( !Tools::getIsset('voucher_name') OR Tools::isEmpty(Tools::getValue('voucher_name')) ){ $this->errors[] = Tools::displayError('Voucher name can\'t be empty'); }

Expand Down Expand Up @@ -452,7 +404,6 @@ public function postProcess() {
}

$new_voucher->save();
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469

// Create campaign :
$campaign = new Campaign();
Expand All @@ -461,15 +412,11 @@ public function postProcess() {
$campaign->execution_time_day = Tools::getValue('execution_time_day');
$campaign->execution_time_hour = Tools::getValue('execution_time_hour');
$campaign->voucher_amount_type = Tools::getValue('voucher_amount_type');
<<<<<<< HEAD
if( isset($new_voucher->id) ){
$campaign->id_voucher = $new_voucher->id;
}else{
$campaign->id_voucher = 0;
}
=======
$campaign->id_voucher = $new_voucher->id;
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
$campaign->active = Tools::getValue('active');

// Create email files :
Expand Down Expand Up @@ -508,7 +455,6 @@ public function postProcess() {
} elseif ($id_campaign = Tools::getValue('id_campaign')) {

$defaultLanguage = new Language((int)(Configuration::get('PS_LANG_DEFAULT')));
<<<<<<< HEAD

// Include voucher :

Expand Down Expand Up @@ -547,7 +493,6 @@ public function postProcess() {
}
}

=======
$voucher_name = Tools::getValue('voucher_name');
$voucher_code = Tools::getValue('voucher_code');
$voucher_amount_type = Tools::getValue('voucher_amount_type');
Expand Down Expand Up @@ -579,7 +524,6 @@ public function postProcess() {
if( ! $new_voucher->save() ){
$this->errors[] = Tools::displayError('An error has occured : when saved voucher');
}
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469

// Create campaign :

Expand All @@ -588,17 +532,12 @@ public function postProcess() {
$campaign->execution_time_day = Tools::getValue('execution_time_day');
$campaign->execution_time_hour = Tools::getValue('execution_time_hour');
$campaign->voucher_amount_type = $voucher_amount_type;
<<<<<<< HEAD

if( isset($new_voucher->id) ){
$campaign->id_voucher = $new_voucher->id;
}else{
$campaign->id_voucher = 0;
}

=======
$campaign->id_voucher = $new_voucher->id;
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469
$campaign->active = Tools::getValue('active');

$path = _PS_ROOT_DIR_.'/modules/superabandonedcart/mails/'.$defaultLanguage->iso_code.'/';
Expand Down Expand Up @@ -719,8 +658,4 @@ public function postProcess() {
}
}
} */
<<<<<<< HEAD
}
=======
}
>>>>>>> 3bc118cb15124b2e0c83671f7268f2be768bd469

0 comments on commit e9cee05

Please sign in to comment.