Version Notes
Fixed minor bugs
Download this release
Release Info
Developer | Rodrigo |
Extension | clever_adwords |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- app/code/local/Rodrigo/Munoz/Block/Adminhtml/Form.php +120 -3
- app/code/local/Rodrigo/Munoz/Model/Keyword.php +74 -3
- app/code/local/Rodrigo/Munoz/controllers/Adminhtml/ExcelsheetController.php +22 -8
- app/code/local/Rodrigo/Munoz/controllers/Adminhtml/IndexController.php +305 -23
- app/code/local/Rodrigo/Munoz/controllers/IndexController.php +78 -0
- app/code/local/Rodrigo/Munoz/etc/config.xml +3 -0
- app/code/local/Rodrigo/Munoz/sql/keyword_setup/mysql4-install-0.1.0.php +70 -0
- app/design/adminhtml/default/default/layout/munoz.xml +36 -3
- app/design/adminhtml/default/default/template/munoz/accurate.phtml +216 -0
- app/design/adminhtml/default/default/template/munoz/dashboard.phtml +116 -0
- app/design/adminhtml/default/default/template/munoz/step1.phtml +33 -8
- app/design/adminhtml/default/default/template/munoz/step2.phtml +2 -2
- app/design/adminhtml/default/default/template/munoz/step3.phtml +3 -1
- app/design/adminhtml/default/default/template/munoz/step4.phtml +4 -20
- app/design/adminhtml/default/default/template/munoz/step5.phtml +8 -6
- app/design/adminhtml/default/default/template/munoz/switch.phtml +96 -0
- app/design/adminhtml/default/default/template/munoz/waiting.phtml +55 -1
- app/design/adminhtml/default/default/template/munoz/welcome.phtml +3 -2
- app/design/frontend/base/default/template/munoz/google/adwords/conversion.phtml +9 -18
- app/design/frontend/base/default/template/munoz/google/adwords/remarket_tag.phtml +15 -19
- media/munoz/Selecci/303/263n_007.png +0 -0
- media/munoz/age.png +0 -0
- media/munoz/checked_rmkt.png +0 -0
- media/munoz/computer.png +0 -0
- media/munoz/devices.png +0 -0
- media/munoz/female.png +0 -0
- media/munoz/gender.png +0 -0
- media/munoz/male.png +0 -0
- media/munoz/mobile.png +0 -0
- package.xml +11 -43
- shell/abstracts.php +225 -0
- shell/countryLanguadge.php +237 -0
- shell/createInstance.php +202 -47
- skin/adminhtml/default/default/munoz/css/jquery-ui.css +10 -10
- skin/adminhtml/default/default/munoz/css/progress-bar.png +0 -0
- skin/adminhtml/default/default/munoz/css/simple_container_bg.gif +0 -0
- skin/adminhtml/default/default/munoz/css/styles.css +257 -4
- skin/adminhtml/default/default/munoz/images/simple_container_bg.gif +0 -0
- skin/adminhtml/default/default/munoz/js/build/jquery.easyswitch.js +94 -0
- skin/adminhtml/default/default/munoz/js/build/jquery.steps.js +29 -0
- skin/adminhtml/default/default/munoz/js/jquery.easyswitch.js +69 -0
- skin/adminhtml/default/default/munoz/js/priceslider.js +18 -5
app/code/local/Rodrigo/Munoz/Block/Adminhtml/Form.php
CHANGED
@@ -12,7 +12,6 @@
|
|
12 |
*/
|
13 |
class Rodrigo_Munoz_Block_Adminhtml_Form extends Mage_Core_Block_Template
|
14 |
{
|
15 |
-
|
16 |
public function __construct()
|
17 |
{
|
18 |
parent::__construct();
|
@@ -23,7 +22,7 @@ class Rodrigo_Munoz_Block_Adminhtml_Form extends Mage_Core_Block_Template
|
|
23 |
return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'munoz/';
|
24 |
}
|
25 |
|
26 |
-
public function
|
27 |
return Mage::helper("adminhtml")->getUrl("munoz/adminhtml_".$url);
|
28 |
}
|
29 |
public function getCategoryKeywords(){
|
@@ -43,8 +42,126 @@ class Rodrigo_Munoz_Block_Adminhtml_Form extends Mage_Core_Block_Template
|
|
43 |
$collection->addFieldToFilter('keyword_type','success');
|
44 |
return count($collection);
|
45 |
}
|
|
|
|
|
|
|
|
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
?>
|
12 |
*/
|
13 |
class Rodrigo_Munoz_Block_Adminhtml_Form extends Mage_Core_Block_Template
|
14 |
{
|
|
|
15 |
public function __construct()
|
16 |
{
|
17 |
parent::__construct();
|
22 |
return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'munoz/';
|
23 |
}
|
24 |
|
25 |
+
public function getUrls($url){
|
26 |
return Mage::helper("adminhtml")->getUrl("munoz/adminhtml_".$url);
|
27 |
}
|
28 |
public function getCategoryKeywords(){
|
42 |
$collection->addFieldToFilter('keyword_type','success');
|
43 |
return count($collection);
|
44 |
}
|
45 |
+
|
46 |
+
public function CampaignStatus(){
|
47 |
+
$res= Mage::getModel('munoz/keyword')->load('chm_status','category_id');
|
48 |
+
return $res->getKeywordType();
|
49 |
|
50 |
+
}
|
51 |
+
public function add_keywords(){
|
52 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
53 |
+
$collection->addFieldToFilter('keyword_type','category');
|
54 |
+
|
55 |
+
$all_cat = Mage::getModel('catalog/category')->getCollection()->addAttributeToSelect('*')->addIsActiveFilter();
|
56 |
+
$all_cat->addAttributeToFilter('is_active', 1)
|
57 |
+
->addAttributeToFilter('include_in_menu', 1);
|
58 |
+
foreach($all_cat as $keywords){
|
59 |
+
$collection->addFieldToFilter('category_id',$keywords->getId());
|
60 |
+
if(count($collection) >0){
|
61 |
+
$res= Mage::getModel('munoz/keyword')->load($keywords->getId(),'category_id');
|
62 |
+
$res->setCategoryId($keywords->getId());
|
63 |
+
$res->setKeywordTitle($keywords->getName());
|
64 |
+
$res->setKeywordType('category');
|
65 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
66 |
+
}
|
67 |
+
else{
|
68 |
+
$res= Mage::getModel('munoz/keyword');
|
69 |
+
$res->setCategoryId($keywords->getId());
|
70 |
+
$res->setKeywordTitle($keywords->getName());
|
71 |
+
$res->setKeywordType('category');
|
72 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
73 |
+
}
|
74 |
|
75 |
+
$result = $res->save();
|
76 |
+
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
public function add_tips(){
|
86 |
+
//print_r($this->getAddTip());
|
87 |
+
|
88 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
89 |
+
$collection->addFieldToFilter('keyword_type','calltoaction');
|
90 |
+
if(count($collection) >0){
|
91 |
+
|
92 |
+
}else{
|
93 |
+
foreach($this->getAddTip() as $tips){
|
94 |
+
$res= Mage::getModel('munoz/keyword');
|
95 |
+
|
96 |
+
$res->setCategoryId('tips');
|
97 |
+
$res->setKeywordTitle($tips);
|
98 |
+
$res->setKeywordType('calltoaction');
|
99 |
+
|
100 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
101 |
+
$res->save();
|
102 |
+
}
|
103 |
+
|
104 |
+
|
105 |
+
//}
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
public function add_Age(){
|
110 |
+
$age='["18-24","25-34","35-44","45-54","55-64","65-more"]';
|
111 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
112 |
+
$collection->addFieldToFilter('keyword_type','age');
|
113 |
+
if(count($collection) >0){
|
114 |
+
|
115 |
+
}else{
|
116 |
+
$res= Mage::getModel('munoz/keyword');
|
117 |
+
$res->setKeywordTitle($age);
|
118 |
+
$res->setKeywordType('age');
|
119 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
120 |
+
$res->save();
|
121 |
+
|
122 |
+
|
123 |
+
//}
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
public function getAddTip(){
|
130 |
+
return $adtips=array('Best prices for you','Free shipping and always return','Best Brands, huge catalog');
|
131 |
+
|
132 |
+
}
|
133 |
+
public function getGender(){
|
134 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
135 |
+
$collection->addFieldToFilter('keyword_type','gender');
|
136 |
+
if($collection >0){
|
137 |
+
foreach($collection as $data){
|
138 |
+
|
139 |
+
$value =$data->getKeywordTitle();
|
140 |
+
}
|
141 |
+
}
|
142 |
+
return $value;
|
143 |
+
}
|
144 |
+
public function getDevice(){
|
145 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
146 |
+
$collection->addFieldToFilter('keyword_type','device');
|
147 |
+
if($collection >0){
|
148 |
+
foreach($collection as $data){
|
149 |
+
|
150 |
+
$value =$data->getKeywordTitle();
|
151 |
+
}
|
152 |
+
}
|
153 |
+
return $value;
|
154 |
+
}
|
155 |
+
public function getAge(){
|
156 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
157 |
+
$collection->addFieldToFilter('keyword_type','age');
|
158 |
+
if($collection >0){
|
159 |
+
foreach($collection as $data){
|
160 |
+
|
161 |
+
$value =$data->getKeywordTitle();
|
162 |
+
}
|
163 |
+
}
|
164 |
+
return json_decode($value);
|
165 |
+
}
|
166 |
}
|
167 |
?>
|
app/code/local/Rodrigo/Munoz/Model/Keyword.php
CHANGED
@@ -38,7 +38,14 @@ class Rodrigo_Munoz_Model_Keyword extends Mage_Core_Model_Abstract{
|
|
38 |
}
|
39 |
|
40 |
if($result->getId()){
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
|
44 |
}
|
@@ -60,7 +67,12 @@ class Rodrigo_Munoz_Model_Keyword extends Mage_Core_Model_Abstract{
|
|
60 |
}
|
61 |
|
62 |
if($result->getId()){
|
63 |
-
$
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
}
|
66 |
|
@@ -100,7 +112,66 @@ class Rodrigo_Munoz_Model_Keyword extends Mage_Core_Model_Abstract{
|
|
100 |
}
|
101 |
return true;
|
102 |
}
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
|
106 |
}
|
38 |
}
|
39 |
|
40 |
if($result->getId()){
|
41 |
+
if($data['type']=='calltoaction'){
|
42 |
+
$msg="Tips Update successfully";
|
43 |
+
}
|
44 |
+
else{
|
45 |
+
$msg="Keyword Update successfully";
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
}
|
50 |
|
51 |
}
|
67 |
}
|
68 |
|
69 |
if($result->getId()){
|
70 |
+
if($data['type']=='calltoaction'){
|
71 |
+
$msg="Tips Update successfully";
|
72 |
+
}
|
73 |
+
else{
|
74 |
+
$msg="Keyword Inserted successfully";
|
75 |
+
}
|
76 |
}
|
77 |
}
|
78 |
|
112 |
}
|
113 |
return true;
|
114 |
}
|
115 |
+
public function saveCampaignStatus($data){
|
116 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
117 |
+
$collection->addFieldToFilter('keyword_title',$data['account']);
|
118 |
+
if(count($collection)>0){
|
119 |
+
$res= Mage::getModel('munoz/keyword')->load($data['account'],'keyword_title');
|
120 |
+
$res->setCategoryId('chm_status');
|
121 |
+
$res->setKeywordTitle($data['account']);
|
122 |
+
$res->setKeywordType($data['status']);
|
123 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
124 |
+
}
|
125 |
+
else{
|
126 |
+
$res =Mage::getModel('munoz/keyword');
|
127 |
+
$res->setCategoryId('chm_status');
|
128 |
+
$res->setKeywordTitle($data['account']);
|
129 |
+
$res->setKeywordType($data['status']);
|
130 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
131 |
+
}
|
132 |
+
try
|
133 |
+
{
|
134 |
+
$result = $res->save();
|
135 |
+
}
|
136 |
+
catch(Exception $e)
|
137 |
+
{
|
138 |
+
$error=$e;
|
139 |
+
}
|
140 |
+
return true;
|
141 |
+
|
142 |
+
}
|
143 |
+
|
144 |
+
public function saveAccuRate($param){
|
145 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
146 |
+
$collection->addFieldToFilter('keyword_type',$param['values']);
|
147 |
+
|
148 |
+
$response= json_encode($param['slide']);
|
149 |
+
if(count($collection)>0){
|
150 |
+
|
151 |
+
$res= Mage::getModel('munoz/keyword')->load($param['values'],'keyword_type');
|
152 |
+
$res->setKeywordTitle($response);
|
153 |
+
$res->setKeywordType($param['values']);
|
154 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
155 |
+
|
156 |
+
|
157 |
+
}else{
|
158 |
+
$res =Mage::getModel('munoz/keyword');
|
159 |
+
$res->setKeywordTitle($response);
|
160 |
+
$res->setKeywordType($param['values']);
|
161 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
162 |
+
}
|
163 |
+
|
164 |
+
try
|
165 |
+
{
|
166 |
+
$result = $res->save();
|
167 |
+
}
|
168 |
+
catch(Exception $e)
|
169 |
+
{
|
170 |
+
echo $error=$e;
|
171 |
+
}
|
172 |
+
return true;
|
173 |
+
|
174 |
+
}
|
175 |
|
176 |
|
177 |
}
|
app/code/local/Rodrigo/Munoz/controllers/Adminhtml/ExcelsheetController.php
CHANGED
@@ -15,21 +15,35 @@ class Rodrigo_Munoz_Adminhtml_ExcelsheetController extends Mage_Adminhtml_Contro
|
|
15 |
|
16 |
|
17 |
public $prd_atr_code=Array();
|
18 |
-
|
19 |
public function IndexAction(){
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
23 |
|
24 |
|
25 |
|
26 |
public function CreateExelShetAction(){
|
27 |
-
|
28 |
$wholekeyword=$this->getRequest()->getParams();
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
}
|
15 |
|
16 |
|
17 |
public $prd_atr_code=Array();
|
|
|
18 |
public function IndexAction(){
|
19 |
+
|
20 |
+
$this->loadLayout();
|
21 |
+
$this->renderLayout();
|
22 |
+
|
23 |
+
}
|
24 |
|
25 |
|
26 |
|
27 |
public function CreateExelShetAction(){
|
28 |
+
|
29 |
$wholekeyword=$this->getRequest()->getParams();
|
30 |
+
//$wholekeyword['budget'];
|
31 |
+
//$wholekeyword['countries'];
|
32 |
+
//$wholekeyword['checkecCat'];
|
33 |
+
//$wholekeyword['unselectCat'];
|
34 |
+
|
35 |
+
$parameters =array('budget'=>$wholekeyword['budget'],'countries'=>$wholekeyword['countries'],'checkecCat'=>$wholekeyword['checkecCat'],'unselectCat'=>$wholekeyword['unselectCat']);
|
36 |
+
|
37 |
+
//$data=json_encode($wholekeyword);
|
38 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('The whole process takes usually 2 working days.Please be patient, we do great things.'));
|
39 |
+
$this->_redirect('*/*/index',$parameters);
|
40 |
|
41 |
}
|
42 |
+
public function getAccurateAction(){
|
43 |
+
$this->loadLayout();
|
44 |
+
$this->renderLayout();
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
|
49 |
}
|
app/code/local/Rodrigo/Munoz/controllers/Adminhtml/IndexController.php
CHANGED
@@ -12,14 +12,67 @@
|
|
12 |
*/
|
13 |
class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
|
14 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
public function indexAction()
|
16 |
-
{
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
public function getFormAction(){
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
$this->renderLayout();
|
24 |
}
|
25 |
|
@@ -103,12 +156,11 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
103 |
|
104 |
public function getCurlresponseAction(){
|
105 |
$data = $this->getRequest()->getParams();
|
106 |
-
|
107 |
-
|
|
|
108 |
$data = file_get_contents($url);
|
109 |
$json_a=json_decode($data,true);
|
110 |
-
|
111 |
-
|
112 |
echo $messaage= $json_a['message'];
|
113 |
if($messaage=='success'){
|
114 |
$session_id =$this->getSessionId();
|
@@ -155,8 +207,9 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
155 |
return $data =Mage::getModel('munoz/keyword')->saveResponse($messaage,$session_id);
|
156 |
|
157 |
}
|
|
|
158 |
public function getSessionId(){
|
159 |
-
$domain= Mage::getBaseUrl
|
160 |
return md5($domain);
|
161 |
}
|
162 |
|
@@ -164,38 +217,267 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
164 |
$client_info= $this->getDetail();
|
165 |
$params=['client_info'=>json_encode($client_info)];
|
166 |
$ch = curl_init();
|
167 |
-
curl_setopt($ch, CURLOPT_URL,
|
168 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
169 |
-
|
170 |
curl_setopt($ch, CURLOPT_POST, true);
|
171 |
-
|
172 |
-
|
173 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
174 |
-
// $output contains the output string
|
175 |
$output = curl_exec($ch);
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
$json_a =json_decode($output, true);
|
181 |
-
|
182 |
-
echo $messaage= $json_a['message'];
|
183 |
|
184 |
}
|
|
|
185 |
public function getDetail(){
|
186 |
$userArray = Mage::getSingleton('admin/session')->getData();
|
187 |
$user = Mage::getSingleton('admin/session');
|
188 |
$userEmail = $user->getUser()->getEmail();
|
189 |
$userName = $user->getUser()->getFirstname()." ".$user->getUser()->getLastname();
|
|
|
190 |
$countryCode = Mage::getStoreConfig('general/country/default');
|
191 |
$domain= Mage::getBaseUrl (Mage_Core_Model_Store::URL_TYPE_WEB);
|
192 |
|
193 |
-
return $clint_info=array('email'=>$userEmail,'
|
194 |
|
195 |
}
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
-
}
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
?>
|
12 |
*/
|
13 |
class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
|
14 |
{
|
15 |
+
|
16 |
+
const check_dasboard_ready = 'http://manager.cleverppc.com/api/ecommerce/v1/check_dasboard_ready';
|
17 |
+
const last_step_status = 'http://manager.cleverppc.com/api/ecommerce/v1/last_step_status';
|
18 |
+
const save_magento_client_user = "http://manager.cleverppc.com/api/magento/v1/save_magento_client_user";
|
19 |
+
const get_shop_stats_data="http://manager.cleverppc.com/api/ecommerce/v1/get_shop_stats_data";
|
20 |
+
const create_ecommerce_info ="manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_info";
|
21 |
+
const check_adwords_user_status ="http://manager.cleverppc.com/api/magento/v1/check_adwords_user_status";
|
22 |
+
const change_account_status ="http://manager.cleverppc.com/api/magento/v1/change_account_status.json";
|
23 |
+
const update_device_info ='http://manager.cleverppc.com/api/ecommerce/v1/update_device_info';
|
24 |
+
const update_age_info ='http://manager.cleverppc.com/api/ecommerce/v1/update_age_info';
|
25 |
+
const update_gender_info ='http://manager.cleverppc.com/api/ecommerce/v1/update_gender_info';
|
26 |
+
|
27 |
public function indexAction()
|
28 |
+
{
|
29 |
+
$info=$this->CreateEcommerceInfo();
|
30 |
+
$data = file_get_contents($this->getDashboardApi());
|
31 |
+
$json_a=json_decode($data,true);
|
32 |
+
|
33 |
+
$messaage= $json_a['message'];
|
34 |
+
$this->dashboardStatus();
|
35 |
+
|
36 |
+
if($this->dashboardStatus()=='complete'){
|
37 |
+
// echo self::check_dasboard_ready.'?client_token='.$this->getSessionId();
|
38 |
+
$data = file_get_contents(self::check_dasboard_ready.'?client_token='.$this->getSessionId());
|
39 |
+
$json_a=json_decode($data,true);
|
40 |
+
if(!empty($json_a) && $json_a['dashboard_ready']=='false'){
|
41 |
+
//$this->_redirect('*/*/dashboard',$json_a);
|
42 |
+
$this->_redirect('munoz/adminhtml_excelsheet/index');
|
43 |
+
}
|
44 |
+
else{
|
45 |
+
//$this->_redirect('munoz/adminhtml_excelsheet/index');
|
46 |
+
$this->_redirect('*/*/dashboard',$json_a);
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
}
|
51 |
+
else{
|
52 |
+
|
53 |
+
//die('122121');
|
54 |
+
$this->loadLayout();
|
55 |
+
$this->renderLayout();
|
56 |
+
}
|
57 |
+
|
58 |
}
|
59 |
|
60 |
public function getFormAction(){
|
61 |
+
|
62 |
+
$step = $this->getRequest()->getParam('step');
|
63 |
+
|
64 |
+
if($step){
|
65 |
+
$step = $this->getRequest()->getParam('step');
|
66 |
+
}
|
67 |
+
else{
|
68 |
+
$step=1;
|
69 |
+
}
|
70 |
+
|
71 |
+
$url=self::last_step_status."?client_token=".$this->getSessionId()."&last_step=".$step;
|
72 |
+
$data = file_get_contents($url);
|
73 |
+
$json_a=json_decode($data,true);
|
74 |
+
|
75 |
+
$this->loadLayout();
|
76 |
$this->renderLayout();
|
77 |
}
|
78 |
|
156 |
|
157 |
public function getCurlresponseAction(){
|
158 |
$data = $this->getRequest()->getParams();
|
159 |
+
$postData = $data['session_id'];
|
160 |
+
|
161 |
+
$url=self::check_adwords_user_status."?client_token=".$postData;
|
162 |
$data = file_get_contents($url);
|
163 |
$json_a=json_decode($data,true);
|
|
|
|
|
164 |
echo $messaage= $json_a['message'];
|
165 |
if($messaage=='success'){
|
166 |
$session_id =$this->getSessionId();
|
207 |
return $data =Mage::getModel('munoz/keyword')->saveResponse($messaage,$session_id);
|
208 |
|
209 |
}
|
210 |
+
|
211 |
public function getSessionId(){
|
212 |
+
$domain= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
213 |
return md5($domain);
|
214 |
}
|
215 |
|
217 |
$client_info= $this->getDetail();
|
218 |
$params=['client_info'=>json_encode($client_info)];
|
219 |
$ch = curl_init();
|
220 |
+
curl_setopt($ch, CURLOPT_URL, self::save_magento_client_user);
|
221 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
|
222 |
curl_setopt($ch, CURLOPT_POST, true);
|
|
|
|
|
223 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
|
|
224 |
$output = curl_exec($ch);
|
225 |
+
curl_close($ch);
|
226 |
+
$json_a =json_decode($output, true);
|
227 |
+
$this->_googleAdwordsId($json_a);
|
228 |
+
echo $messaage= $json_a['message'];
|
|
|
|
|
|
|
229 |
|
230 |
}
|
231 |
+
|
232 |
public function getDetail(){
|
233 |
$userArray = Mage::getSingleton('admin/session')->getData();
|
234 |
$user = Mage::getSingleton('admin/session');
|
235 |
$userEmail = $user->getUser()->getEmail();
|
236 |
$userName = $user->getUser()->getFirstname()." ".$user->getUser()->getLastname();
|
237 |
+
$comName=Mage::getStoreConfig('general/store_information/name');
|
238 |
$countryCode = Mage::getStoreConfig('general/country/default');
|
239 |
$domain= Mage::getBaseUrl (Mage_Core_Model_Store::URL_TYPE_WEB);
|
240 |
|
241 |
+
return $clint_info=array('name'=>$userName,'email'=>$userEmail,'company_name'=>$comName,'domain'=>$domain,'currency'=>$countryCode,'client_token'=>md5($domain));
|
242 |
|
243 |
}
|
244 |
|
245 |
+
public function dashboardAction(){
|
246 |
+
$this->loadLayout();
|
247 |
+
$this->renderLayout();
|
248 |
+
|
249 |
+
}
|
250 |
+
|
251 |
+
public function getDashboardApi(){
|
252 |
+
return self::get_shop_stats_data."?client_token=".$this->getSessionId();
|
253 |
+
}
|
254 |
+
|
255 |
+
public function campaign_statusAction(){
|
256 |
+
$status=$this->getRequest()->getParam('status');
|
257 |
+
$params=['client_token'=>$this->getSessionId(),'status'=>$status];
|
258 |
+
$ch = curl_init();
|
259 |
+
curl_setopt($ch, CURLOPT_URL,self::change_account_status);
|
260 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
261 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
262 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
263 |
+
// $output contains the output string
|
264 |
+
$output = curl_exec($ch);
|
265 |
+
|
266 |
+
// close curl resource to free up system resources
|
267 |
+
curl_close($ch);
|
268 |
+
//print_r($output);
|
269 |
+
$json_a =json_decode($output, true);
|
270 |
+
$data =Mage::getModel('munoz/keyword')->saveCampaignStatus($json_a);
|
271 |
+
return $json_a;
|
272 |
+
|
273 |
+
}
|
274 |
+
public function dashboardStatus(){
|
275 |
+
$res= Mage::getModel('munoz/keyword')->load('complete','keyword_title');
|
276 |
+
return $res->getKeywordTitle();
|
277 |
|
278 |
+
}
|
279 |
+
|
280 |
+
public function SetcleintInfoAction(){
|
281 |
+
$stores =array();
|
282 |
+
foreach(Mage::app()->getStores() as $store) {
|
283 |
+
array_push($stores,$store->getName().',');
|
284 |
+
}
|
285 |
+
$all_store =Mage::getStoreConfig('general/store_information/name');
|
286 |
+
$ch = curl_init();
|
287 |
+
$info['id']='';
|
288 |
+
$info['clientId']=md5(Mage::getBaseUrl (Mage_Core_Model_Store::URL_TYPE_WEB));
|
289 |
+
$info['store_name']= Mage::getStoreConfig('general/store_information/name');
|
290 |
+
$info['name_ascii']='';
|
291 |
+
$info['info_type']='';
|
292 |
+
$info['owner']=$this->getDetail()['name'];
|
293 |
+
$info['email']=$this->getDetail()['email'];
|
294 |
+
$info['phone']=Mage::getStoreConfig('general/store_information/phone');
|
295 |
+
$info['domain']=Mage::getBaseUrl (Mage_Core_Model_Store::URL_TYPE_WEB);
|
296 |
+
$info['main_language']=Mage::app()->getLocale()->getLocaleCode();
|
297 |
+
// $info['countries']=$countries;
|
298 |
+
|
299 |
+
$info['total_oders']=$this->getTotalorders();
|
300 |
+
$info['currency']=Mage::app()->getStore()->getCurrentCurrencyCode();
|
301 |
+
$info['adwordsId']='';
|
302 |
+
$info['budget']='';
|
303 |
+
$info['camp_by_default']='1';
|
304 |
+
$info['country']=Mage::getStoreConfig('general/country/default');;
|
305 |
+
$info['city']=Mage::getStoreConfig('general/store_information/address');
|
306 |
+
$info['province']='';
|
307 |
+
$info['city']='';
|
308 |
+
$info['zip']='';
|
309 |
+
$info['latitude']='';
|
310 |
+
$info['longitude']='';
|
311 |
+
|
312 |
+
$info['iana_timezone']=Mage::getStoreConfig('general/locale/timezone');
|
313 |
+
$info['logo_url']=Mage::getStoreConfig('design/header/logo_src');
|
314 |
+
$info['gender']='';
|
315 |
+
$info['device']='';
|
316 |
+
|
317 |
+
$info['age']='';
|
318 |
+
$info['platform']='Magento';
|
319 |
+
// $info['created_at']='';
|
320 |
+
// $info['installed_at']='';
|
321 |
|
|
|
322 |
|
323 |
+
$params= array('info'=>json_encode($info));
|
324 |
+
curl_setopt($ch, CURLOPT_URL, self::create_ecommerce_info);
|
325 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
326 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
327 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
328 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
|
329 |
+
curl_setopt($ch,CURLOPT_TIMEOUT,400);
|
330 |
+
// $output contains the output string
|
331 |
+
$output = curl_exec($ch);
|
332 |
+
curl_close($ch);
|
333 |
+
$json_a =json_decode($output,true);
|
334 |
+
echo $json_a['message'];
|
335 |
+
}
|
336 |
+
|
337 |
+
public function getTotalorders(){
|
338 |
+
$salesModel=Mage::getModel("sales/order")->getCollection();
|
339 |
+
return count($salesModel);
|
340 |
+
|
341 |
+
}
|
342 |
+
|
343 |
+
public function BackGroundProcessAction(){
|
344 |
+
$wholekeyword=$this->getRequest()->getParams();
|
345 |
+
if($wholekeyword['budget']){
|
346 |
+
require_once 'shell/createInstance.php';
|
347 |
+
|
348 |
+
exec('php -f createInstance.php > /dev/null 2>&1 &');
|
349 |
+
}
|
350 |
+
|
351 |
+
|
352 |
+
}
|
353 |
+
|
354 |
+
public function CreateEcommerceInfo(){
|
355 |
+
$ch = curl_init();
|
356 |
+
$info['id']='';
|
357 |
+
$info['clientId']=md5(Mage::getBaseUrl (Mage_Core_Model_Store::URL_TYPE_WEB));
|
358 |
+
$info['store_name']= Mage::getStoreConfig('general/store_information/name');
|
359 |
+
$info['name_ascii']='';
|
360 |
+
$info['info_type']='';
|
361 |
+
$info['owner']=$this->getDetail()['name'];
|
362 |
+
$info['email']=$this->getDetail()['email'];
|
363 |
+
$info['phone']=Mage::getStoreConfig('general/store_information/phone');
|
364 |
+
$info['domain']=Mage::getBaseUrl (Mage_Core_Model_Store::URL_TYPE_WEB);
|
365 |
+
$info['main_language']=Mage::app()->getLocale()->getLocaleCode();
|
366 |
+
// $info['countries']=$countries;
|
367 |
+
|
368 |
+
$info['total_oders']=$this->getTotalorders();
|
369 |
+
$info['currency']=Mage::app()->getStore()->getCurrentCurrencyCode();
|
370 |
+
$info['adwordsId']='';
|
371 |
+
$info['budget']='';
|
372 |
+
$info['camp_by_default']='1';
|
373 |
+
$info['country']=Mage::getStoreConfig('general/country/default');;
|
374 |
+
$info['city']=Mage::getStoreConfig('general/store_information/address');
|
375 |
+
$info['province']='';
|
376 |
+
$info['city']='';
|
377 |
+
$info['zip']='';
|
378 |
+
$info['latitude']='';
|
379 |
+
$info['longitude']='';
|
380 |
+
|
381 |
+
$info['iana_timezone']=Mage::getStoreConfig('general/locale/timezone');
|
382 |
+
$info['logo_url']=$this->_getLogoUrls();
|
383 |
+
$info['gender']='';
|
384 |
+
$info['device']='';
|
385 |
+
|
386 |
+
$info['age']='';
|
387 |
+
$info['platform']='Magento';
|
388 |
+
// $info['created_at']='';
|
389 |
+
// $info['installed_at']='';
|
390 |
+
$params= array('info'=>json_encode($info));
|
391 |
+
curl_setopt($ch, CURLOPT_URL, self::create_ecommerce_info);
|
392 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
393 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
394 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
395 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
|
396 |
+
curl_setopt($ch,CURLOPT_TIMEOUT,400);
|
397 |
+
// $output contains the output string
|
398 |
+
$output = curl_exec($ch);
|
399 |
+
curl_close($ch);
|
400 |
+
$json_a =json_decode($output,true);
|
401 |
+
|
402 |
+
|
403 |
+
|
404 |
+
}
|
405 |
+
|
406 |
+
public function _getLogoUrls(){
|
407 |
+
|
408 |
+
$logo_src = Mage::getStoreConfig('design/header/logo_src');
|
409 |
+
$design = Mage::getDesign();
|
410 |
+
$design->setArea('frontend');
|
411 |
+
$logo_url = $design->getSkinUrl($logo_src);
|
412 |
+
$design->setArea('adminhtml');
|
413 |
+
return $logo_url;
|
414 |
+
|
415 |
+
|
416 |
+
}
|
417 |
+
public function _googleAdwordsId($res){
|
418 |
+
|
419 |
+
$price =$this->_allProductPrice();
|
420 |
+
$design =Mage::getBaseDir('design').'/frontend/base/default/template/munoz/google/adwords/';
|
421 |
+
$save_remarket_tag=$this->_remarketTag($design, $res['tag_id']);
|
422 |
+
$convertaion =$design.'conversion.phtml';
|
423 |
+
$myfile = fopen($convertaion, "w") or die("Unable to open file!");
|
424 |
+
$snipt_code =str_replace("1.00",$price,$res['conversion_snippet_tag']);
|
425 |
+
fwrite($myfile, $snipt_code);
|
426 |
+
fclose($myfile);
|
427 |
+
return true;
|
428 |
+
}
|
429 |
+
|
430 |
+
public function _allProductPrice(){
|
431 |
+
|
432 |
+
$collection= Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect('price')->addAttributeToFilter('status','1');
|
433 |
+
$sum = 0;
|
434 |
+
$count = 0;
|
435 |
+
foreach ($collection as $_product) {
|
436 |
+
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
|
437 |
+
if ($stock>=1) {
|
438 |
+
$sum +=$_product->getPrice()*$stock;
|
439 |
+
$count +=$stock;
|
440 |
+
}
|
441 |
+
}
|
442 |
+
return $sum;
|
443 |
+
}
|
444 |
+
|
445 |
+
public function _remarketTag($design ,$tag_id){
|
446 |
+
$remarketingtagFile=$design.'remarket_tag.phtml';
|
447 |
+
$file = file_get_contents($remarketingtagFile);
|
448 |
+
$new_file = str_replace('ramrket_id',$tag_id, $file);
|
449 |
+
file_put_contents($remarketingtagFile,$new_file);
|
450 |
+
return true;
|
451 |
+
}
|
452 |
+
|
453 |
+
public function SetAccurateValueAction(){
|
454 |
+
$url='';
|
455 |
+
|
456 |
+
$param=$this->getRequest()->getParams();
|
457 |
+
$client_token=$this->getSessionId();
|
458 |
+
if($param['values']=='device'){
|
459 |
+
$url=self::update_device_info.'?device='.$param['slide'];
|
460 |
+
}
|
461 |
+
if($param['values']=='gender'){
|
462 |
+
|
463 |
+
$url=self::update_gender_info.'?gender='.$param['slide'];
|
464 |
+
}
|
465 |
+
if($param['values']=='age'){
|
466 |
+
|
467 |
+
$age= implode(",",$param['slide']);
|
468 |
+
|
469 |
+
$url=self::update_age_info.'?age='.$age;
|
470 |
+
}
|
471 |
+
$main_url= $url.'&client_token='.$this->getSessionId();
|
472 |
+
|
473 |
+
|
474 |
+
$data = file_get_contents($main_url);
|
475 |
+
$json_a=json_decode($data,true);
|
476 |
+
if($json_a['message']=='success'){
|
477 |
+
$data =Mage::getModel('munoz/keyword')->saveAccuRate($param);
|
478 |
+
}
|
479 |
+
|
480 |
+
|
481 |
+
}
|
482 |
+
}
|
483 |
?>
|
app/code/local/Rodrigo/Munoz/controllers/IndexController.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Rodrigo_Munoz_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
header('Content-Type: application/json');
|
7 |
+
echo json_encode(array('success'=>true));
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getNewproductListAction()
|
11 |
+
{
|
12 |
+
$productarry = array();
|
13 |
+
$todayStartOfDayDate = Mage::app()->getLocale()->date()
|
14 |
+
->setTime('00:00:00')
|
15 |
+
->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
|
16 |
+
|
17 |
+
$todayEndOfDayDate = Mage::app()->getLocale()->date()
|
18 |
+
->setTime('23:59:59')
|
19 |
+
->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
|
20 |
+
/** @var $collection Mage_Catalog_Model_Resource_Product_Collection */
|
21 |
+
$collection = Mage::getResourceModel('catalog/product_collection')
|
22 |
+
->setVisibility(Mage::getSingleton('catalog/product_visibility')
|
23 |
+
->getVisibleInCatalogIds());
|
24 |
+
$collection = $collection->addMinimalPrice()
|
25 |
+
->addFinalPrice()
|
26 |
+
->addTaxPercents()
|
27 |
+
->addAttributeToSelect(Mage::getSingleton('catalog/config')
|
28 |
+
->getProductAttributes())
|
29 |
+
->addUrlRewrite()
|
30 |
+
->addStoreFilter()
|
31 |
+
->addAttributeToFilter('news_from_date', array('or'=> array(
|
32 |
+
0 => array('date' => true, 'to' => $todayEndOfDayDate),
|
33 |
+
1 => array('is' => new Zend_Db_Expr('null')))
|
34 |
+
), 'left')
|
35 |
+
->addAttributeToFilter('news_to_date', array('or'=> array(
|
36 |
+
0 => array('date' => true, 'from' => $todayStartOfDayDate),
|
37 |
+
1 => array('is' => new Zend_Db_Expr('null')))
|
38 |
+
), 'left')
|
39 |
+
->addAttributeToFilter(
|
40 |
+
array(
|
41 |
+
array('attribute' => 'news_from_date', 'is'=>new Zend_Db_Expr('not null')),
|
42 |
+
array('attribute' => 'news_to_date', 'is'=>new Zend_Db_Expr('not null'))
|
43 |
+
)
|
44 |
+
)
|
45 |
+
->addAttributeToSort('news_from_date', 'desc');
|
46 |
+
$i=0;
|
47 |
+
foreach ($collection as $product) //loop for getting products
|
48 |
+
{
|
49 |
+
$dim_prod[$i]['id']='';
|
50 |
+
$dim_prod[$i]['clientId']=md5(Mage::getBaseUrl (Mage_Core_Model_Store::URL_TYPE_WEB));
|
51 |
+
$dim_prod[$i]['prodId']=$product->getId();
|
52 |
+
$dim_prod[$i]['prod_name']=$product->getName();
|
53 |
+
$dim_prod[$i]['prod_url']=$product->getProductUrl();
|
54 |
+
$dim_prod[$i]['prod_price']=$product->getPrice();
|
55 |
+
$dim_prod[$i]['barcode']='';
|
56 |
+
$dim_prod[$i]['sku']=$product->getSku();
|
57 |
+
$dim_prod[$i]['meta']=$product->getMetaKeywords();
|
58 |
+
$dim_prod[$i]['published']=$product->getStatus();
|
59 |
+
$dim_prod[$i]['inv']='';
|
60 |
+
$dim_prod[$i]['inv_num']=$this->getPorductStock($product->getId());
|
61 |
+
$dim_prod[$i]['updated']=$product->getUpdatedAt();
|
62 |
+
$dim_prod[$i]['main_image']=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' .$product->getImage();
|
63 |
+
$dim_prod[$i]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
64 |
+
$i++;
|
65 |
+
|
66 |
+
|
67 |
+
//$productarry[]=$product->getId();
|
68 |
+
}
|
69 |
+
header('Content-Type: application/json');
|
70 |
+
echo json_encode($dim_prod);
|
71 |
+
}
|
72 |
+
public function getPorductStock($product_id){
|
73 |
+
$model = Mage::getModel('catalog/product');
|
74 |
+
$_product = $model->load($product_id);
|
75 |
+
return $stocklevel = (int)Mage::getModel('cataloginventory/stock_item') ->loadByProduct($_product)->getQty();
|
76 |
+
}
|
77 |
+
}
|
78 |
+
?>
|
app/code/local/Rodrigo/Munoz/etc/config.xml
CHANGED
@@ -26,6 +26,7 @@
|
|
26 |
</routers>
|
27 |
</admin>
|
28 |
<global>
|
|
|
29 |
<resources>
|
30 |
<keyword_setup>
|
31 |
<setup>
|
@@ -95,5 +96,7 @@
|
|
95 |
</menu>
|
96 |
|
97 |
</adminhtml>
|
|
|
|
|
98 |
</config>
|
99 |
|
26 |
</routers>
|
27 |
</admin>
|
28 |
<global>
|
29 |
+
|
30 |
<resources>
|
31 |
<keyword_setup>
|
32 |
<setup>
|
96 |
</menu>
|
97 |
|
98 |
</adminhtml>
|
99 |
+
|
100 |
+
|
101 |
</config>
|
102 |
|
app/code/local/Rodrigo/Munoz/sql/keyword_setup/mysql4-install-0.1.0.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
$installer = $this;
|
3 |
$installer->startSetup();
|
4 |
$installer->run("
|
@@ -14,4 +16,72 @@ CREATE TABLE IF NOT EXISTS `{$this->getTable('rodrido_keyword')}` (
|
|
14 |
");
|
15 |
|
16 |
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
?>
|
1 |
<?php
|
2 |
+
getNotification();
|
3 |
+
stepApi();
|
4 |
$installer = $this;
|
5 |
$installer->startSetup();
|
6 |
$installer->run("
|
16 |
");
|
17 |
|
18 |
$installer->endSetup();
|
19 |
+
|
20 |
+
function getNotification(){
|
21 |
+
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
|
22 |
+
|
23 |
+
$token=$protocol.$_SERVER['HTTP_HOST'].'/';
|
24 |
+
$clint_token = md5($token);
|
25 |
+
|
26 |
+
$ch = curl_init();
|
27 |
+
$info['id']='';
|
28 |
+
$info['clientId']=$clint_token;
|
29 |
+
$info['store_name']= '';
|
30 |
+
$info['name_ascii']='';
|
31 |
+
$info['info_type']='';
|
32 |
+
$info['owner']='';
|
33 |
+
$info['email']='';
|
34 |
+
$info['phone']=Mage::getStoreConfig('general/store_information/phone');
|
35 |
+
$info['domain']=$token;
|
36 |
+
$info['main_language']=Mage::app()->getLocale()->getLocaleCode();
|
37 |
+
$info['total_oders']='';
|
38 |
+
$info['currency']=Mage::app()->getStore()->getCurrentCurrencyCode();
|
39 |
+
$info['adwordsId']='';
|
40 |
+
$info['budget']='';
|
41 |
+
$info['camp_by_default']='1';
|
42 |
+
$info['country']=Mage::getStoreConfig('general/country/default');;
|
43 |
+
$info['city']=Mage::getStoreConfig('general/store_information/address');
|
44 |
+
$info['province']='';
|
45 |
+
$info['city']='';
|
46 |
+
$info['zip']='';
|
47 |
+
$info['latitude']='';
|
48 |
+
$info['longitude']='';
|
49 |
+
$info['iana_timezone']=Mage::getStoreConfig('general/locale/timezone');
|
50 |
+
$info['logo_url']=Mage::getStoreConfig('design/header/logo_src');
|
51 |
+
$info['gender']='';
|
52 |
+
$info['device']='';
|
53 |
+
|
54 |
+
$info['age']='';
|
55 |
+
$info['platform']='Magento';
|
56 |
+
$info['created_at']='';
|
57 |
+
$info['installed_at']=Mage::getModel('core/date')->date('Y-m-d H:i:s');
|
58 |
+
|
59 |
+
|
60 |
+
$params= array('info'=>json_encode($info));
|
61 |
+
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_info");
|
62 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
63 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
64 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
65 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
|
66 |
+
curl_setopt($ch,CURLOPT_TIMEOUT,400);
|
67 |
+
$output = curl_exec($ch);
|
68 |
+
curl_close($ch);
|
69 |
+
$json_a =json_decode($output,true);
|
70 |
+
return true;
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
function stepApi(){
|
75 |
+
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
|
76 |
+
$clint_tken=$protocol.$_SERVER['HTTP_HOST'].'/';
|
77 |
+
$clint_tokn =md5($clint_tken);
|
78 |
+
$url="http://manager.cleverppc.com/api/ecommerce/v1/last_step_status?client_token=".$clint_tokn."&last_step=0";
|
79 |
+
|
80 |
+
$data = file_get_contents($url);
|
81 |
+
$json_a=json_decode($data,true);
|
82 |
+
return true;
|
83 |
+
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
?>
|
app/design/adminhtml/default/default/layout/munoz.xml
CHANGED
@@ -1,15 +1,32 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
-
|
4 |
<reference name="head">
|
5 |
<action method="addCss">
|
6 |
<name>munoz/css/styles.css</name>
|
7 |
</action>
|
8 |
</reference>
|
9 |
-
|
10 |
<block type="munoz/adminhtml_form" template="munoz/welcome.phtml"/>
|
11 |
</reference>
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
<munoz_adminhtml_index_getform>
|
15 |
<reference name="head">
|
@@ -48,4 +65,20 @@
|
|
48 |
<block type="munoz/adminhtml_form" template="munoz/waiting.phtml"/>
|
49 |
</reference>
|
50 |
</munoz_adminhtml_excelsheet_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
</layout>
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
+
<munoz_adminhtml_index_index>
|
4 |
<reference name="head">
|
5 |
<action method="addCss">
|
6 |
<name>munoz/css/styles.css</name>
|
7 |
</action>
|
8 |
</reference>
|
9 |
+
<reference name="content">
|
10 |
<block type="munoz/adminhtml_form" template="munoz/welcome.phtml"/>
|
11 |
</reference>
|
12 |
+
</munoz_adminhtml_index_index>
|
13 |
+
|
14 |
+
<munoz_adminhtml_index_dashboard>
|
15 |
+
<reference name="head">
|
16 |
+
<action method="addCss">
|
17 |
+
<name>munoz/css/jquery-ui.css</name>
|
18 |
+
</action>
|
19 |
+
<action method="addCss">
|
20 |
+
<name>munoz/css/main.css</name>
|
21 |
+
</action>
|
22 |
+
<action method="addCss">
|
23 |
+
<name>munoz/css/styles.css</name>
|
24 |
+
</action>
|
25 |
+
</reference>
|
26 |
+
<reference name="content">
|
27 |
+
<block type="munoz/adminhtml_form" template="munoz/dashboard.phtml"/>
|
28 |
+
</reference>
|
29 |
+
</munoz_adminhtml_index_dashboard>
|
30 |
|
31 |
<munoz_adminhtml_index_getform>
|
32 |
<reference name="head">
|
65 |
<block type="munoz/adminhtml_form" template="munoz/waiting.phtml"/>
|
66 |
</reference>
|
67 |
</munoz_adminhtml_excelsheet_index>
|
68 |
+
<munoz_adminhtml_excelsheet_getaccurate>
|
69 |
+
<reference name="head">
|
70 |
+
<action method="addCss">
|
71 |
+
<name>munoz/css/jquery-ui.css</name>
|
72 |
+
</action>
|
73 |
+
<action method="addCss">
|
74 |
+
<name>munoz/css/main.css</name>
|
75 |
+
</action>
|
76 |
+
<action method="addCss">
|
77 |
+
<name>munoz/css/styles.css</name>
|
78 |
+
</action>
|
79 |
+
</reference>
|
80 |
+
<reference name="content">
|
81 |
+
<block type="munoz/adminhtml_form" template="munoz/accurate.phtml"/>
|
82 |
+
</reference>
|
83 |
+
</munoz_adminhtml_excelsheet_getaccurate>
|
84 |
</layout>
|
app/design/adminhtml/default/default/template/munoz/accurate.phtml
ADDED
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- <center>
|
2 |
+
<h1><?php //echo $this->__('Reach the right audience'); ?>
|
3 |
+
<font style="color:grey"><?php //echo $this->__('( Display only )'); ?></font>
|
4 |
+
</h1>
|
5 |
+
</center> -->
|
6 |
+
<!--start gender-->
|
7 |
+
<?php
|
8 |
+
|
9 |
+
|
10 |
+
$this->add_Age();
|
11 |
+
?>
|
12 |
+
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/jquery-1.9.1.min.js "></script>
|
13 |
+
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/priceslider.js "></script>
|
14 |
+
<div class="main_accurate_page">
|
15 |
+
<div class="accurate_section" >
|
16 |
+
<div class="accurate_section_summary">
|
17 |
+
<div class="img-blk">
|
18 |
+
<img src="<?php echo $this->getMediaUrl() ; ?>gender.png" height="64">
|
19 |
+
</div>
|
20 |
+
<div class="accurate_gender_content">
|
21 |
+
<h1><?php echo $this->__('Gender'); ?></h1>
|
22 |
+
<p class="accurate_section_summary_content"><?php echo $this->__('Only if your products are made specifically for one gender.</br>Reach the people who’re most likely to buy your products.'); ?>
|
23 |
+
</p>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
|
27 |
+
<div class="accurate_section_content">
|
28 |
+
<div class="section-row">
|
29 |
+
<table>
|
30 |
+
<tr>
|
31 |
+
<td style="width:5em">
|
32 |
+
<div class="accurate_content_femail icon-blk">
|
33 |
+
<img src="<?php echo $this->getMediaUrl() ; ?>female.png">
|
34 |
+
</div>
|
35 |
+
<?php echo $this->__('Female'); ?></td>
|
36 |
+
<td style="width:100%"><input type="hidden" name="gender" id="gender"><div id="slider_gender" style="margin-top:4.2em;"></div></td>
|
37 |
+
<td style="width:5em"> <div class="icon-blk">
|
38 |
+
<img src="<?php echo $this->getMediaUrl() ; ?>male.png" >
|
39 |
+
</div><?php echo $this->__('Male'); ?>
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
</table>
|
43 |
+
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
<!--end gender-->
|
48 |
+
|
49 |
+
<!-- start age-->
|
50 |
+
<div class="accurate_section" >
|
51 |
+
|
52 |
+
<div class="accurate_section_summary">
|
53 |
+
<div class="img-blk">
|
54 |
+
<img src="<?php echo $this->getMediaUrl() ; ?>age.png" height="64">
|
55 |
+
</div>
|
56 |
+
<div class="accurate_gender_content">
|
57 |
+
<h1><?php echo $this->__('Age'); ?></h1>
|
58 |
+
<p class="accurate_section_summary_content">
|
59 |
+
<?php echo $this->__('You might want to market your business differently to </br>people who are in different age groups and life stages.'); ?>
|
60 |
+
</p>
|
61 |
+
<p class="accurate_section_summary_content">
|
62 |
+
<?php echo $this->__('With demographic targeting, you can bid differently or have </br> ads unique to each group of customers.'); ?>
|
63 |
+
</p>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
|
67 |
+
<div class="accurate_section_content">
|
68 |
+
<div class="age_section_row device_checkbox">
|
69 |
+
<div class="section-cell">
|
70 |
+
<table style="width:100%;" >
|
71 |
+
<tr>
|
72 |
+
<td>
|
73 |
+
<input class="checkbox-custom" id="18-24" type="checkbox" name="age" value="18-24" <?php if($this->getAge() && in_array('18-24',$this->getAge())){echo "checked";}?> >
|
74 |
+
<label class="checkbox-custom-label" for="18-24">18-24</label>
|
75 |
+
</td>
|
76 |
+
<td>
|
77 |
+
<input class="checkbox-custom" type="checkbox" id="25-34" name="age" value="25-34" <?php if($this->getAge() && in_array('25-34',$this->getAge())){echo "checked";} ?>>
|
78 |
+
<label class="checkbox-custom-label" for="25-34">25-34</label>
|
79 |
+
</td>
|
80 |
+
|
81 |
+
<td>
|
82 |
+
<input class="checkbox-custom" type="checkbox" id="35-44" name="age" value="35-44" <?php if($this->getAge() && in_array('35-44',$this->getAge())){echo "checked";} ?> >
|
83 |
+
<label class="checkbox-custom-label" for="35-44">35-44</label>
|
84 |
+
</td>
|
85 |
+
<td>
|
86 |
+
<input class="checkbox-custom" type="checkbox" id="45-54" name="age" value="45-54" <?php if($this->getAge() && in_array('45-54',$this->getAge())){echo "checked";} ?>>
|
87 |
+
<label class="checkbox-custom-label" for="45-54">45-54</label>
|
88 |
+
</td>
|
89 |
+
<td>
|
90 |
+
<input class="checkbox-custom" type="checkbox" id="55-64" name="age" value="55-64" <?php if($this->getAge() && in_array('55-64',$this->getAge())){echo "checked";}?> >
|
91 |
+
<label class="checkbox-custom-label" for="55-64">55-64</label>
|
92 |
+
</td>
|
93 |
+
<td>
|
94 |
+
<input class="checkbox-custom" type="checkbox" id="65-more" name="age" value="65-more" <?php if($this->getAge() && in_array('65-more',$this->getAge())){echo "checked";} ?>>
|
95 |
+
<label class="checkbox-custom-label" for="65-more">65-more</label>
|
96 |
+
</td>
|
97 |
+
|
98 |
+
|
99 |
+
</tr>
|
100 |
+
</table>
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
|
106 |
+
<!--end age section-->
|
107 |
+
<div class="accurate_section">
|
108 |
+
<div class="accurate_section_summary">
|
109 |
+
<div class="img-blk">
|
110 |
+
<img src="<?php echo $this->getMediaUrl() ; ?>devices.png" height="64">
|
111 |
+
</div>
|
112 |
+
<div class="accurate_gender_content">
|
113 |
+
<h1><?php echo $this->__('Devices'); ?></h1>
|
114 |
+
<p class="accurate_section_summary_content"><?php echo $this->__('Allow you to show your ads more or less frequently based <br> on where people search.'); ?></p>
|
115 |
+
<p class="accurate_section_summary_content">
|
116 |
+
<?php echo $this->__('For example, sometimes a click is worth more to you <br> if it comes <br>from a mobile device'); ?>
|
117 |
+
</p>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
|
121 |
+
<div class="accurate_section_content">
|
122 |
+
<div class="section-row">
|
123 |
+
<table class="">
|
124 |
+
<tr>
|
125 |
+
<td style="width:5em">
|
126 |
+
<div class="icon-blk">
|
127 |
+
<img src="<?php echo $this->getMediaUrl() ; ?>computer.png">
|
128 |
+
</div><?php echo $this->__('Desktop'); ?>
|
129 |
+
</td>
|
130 |
+
<td style="width:100%">
|
131 |
+
<div id="slider_devices" style="margin-top:4.2em;"></div>
|
132 |
+
</td>
|
133 |
+
<td style="width:5em; text-align:center">
|
134 |
+
<div class="icon-blk">
|
135 |
+
<img src="<?php echo $this->getMediaUrl() ; ?>mobile.png">
|
136 |
+
</div>
|
137 |
+
<?php echo $this->__('Mobile'); ?>
|
138 |
+
</td>
|
139 |
+
</tr>
|
140 |
+
</table>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
<center>
|
145 |
+
<form action="<?php echo $this->getUrls('excelsheet/index'); ?>">
|
146 |
+
<button type="submit" class="btn finish done_acc"><?php echo $this->__('Done'); ?></button>
|
147 |
+
</form>
|
148 |
+
<center>
|
149 |
+
</div>
|
150 |
+
|
151 |
+
|
152 |
+
<script>
|
153 |
+
$wk_slid= jQuery.noConflict();
|
154 |
+
$wk_slid(function() {
|
155 |
+
$wk_slid( "#slider_gender" ).slider({
|
156 |
+
range: "min",
|
157 |
+
min: -100,
|
158 |
+
max: 100,
|
159 |
+
value: <?php if($this->getGender()){echo $this->getGender();} else{echo 0;} ?>,
|
160 |
+
step:50,
|
161 |
+
slide: function( event, ui ) {
|
162 |
+
$wk_slid( "#gender" ).val(ui.value );
|
163 |
+
sliderSetValue(ui.value, 'gender');
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
});
|
168 |
+
|
169 |
+
$wk_slid( "#slider_devices" ).slider({
|
170 |
+
range: "min",
|
171 |
+
min: -100,
|
172 |
+
max: 100,
|
173 |
+
value: <?php if($this->getDevice()){echo $this->getDevice();} else{echo 0;} ?>,
|
174 |
+
step:50,
|
175 |
+
slide: function( event, ui ) {
|
176 |
+
$wk_slid( "#device" ).val(ui.value);
|
177 |
+
sliderSetValue(ui.value, 'device');
|
178 |
+
|
179 |
+
}
|
180 |
+
|
181 |
+
});
|
182 |
+
|
183 |
+
|
184 |
+
$wk_slid(".device_checkbox input:checkbox").change(function() {
|
185 |
+
ages=[];
|
186 |
+
$wk_slid('input[name="age"]:checked').each(function() {
|
187 |
+
ages.push(this.value);
|
188 |
+
|
189 |
+
});
|
190 |
+
|
191 |
+
sliderSetValue(ages, 'age');
|
192 |
+
});
|
193 |
+
|
194 |
+
|
195 |
+
|
196 |
+
function sliderSetValue(slide, values){
|
197 |
+
$wk_slid.ajax({
|
198 |
+
url :'<?php echo $this->getUrls("index/SetAccurateValue"); ?>',
|
199 |
+
type : "get",
|
200 |
+
//async: false,
|
201 |
+
data : {'values':values,'slide':slide},
|
202 |
+
dataType: "text",
|
203 |
+
success : function(reponse){
|
204 |
+
if (reponse=='success') {
|
205 |
+
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
})
|
210 |
+
}
|
211 |
+
|
212 |
+
|
213 |
+
});
|
214 |
+
|
215 |
+
</script>
|
216 |
+
|
app/design/adminhtml/default/default/template/munoz/dashboard.phtml
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $wholedata =Mage::app()->getRequest()->getParams();?>
|
2 |
+
<div class="dashboard-section">
|
3 |
+
|
4 |
+
<table>
|
5 |
+
<tr>
|
6 |
+
<td>
|
7 |
+
<img title="Remarketing tag" src="<?php echo $this->getMediaUrl(); ?>checked_rmkt.png" height='60', style:"margin-left:1em" >
|
8 |
+
</td>
|
9 |
+
<td><center><img src="<?php echo $this->getMediaUrl(); ?>adwords-logo.png" height= '100' ></center></td>
|
10 |
+
<td></td>
|
11 |
+
</tr>
|
12 |
+
</table>
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
<h2> <?php echo $this->__('All Campaigns'); ?> :</h2>
|
17 |
+
<div class="section-row">
|
18 |
+
|
19 |
+
<div class="section-cell section-cell-dashboard">
|
20 |
+
<h4><?php echo $this->__('CLICKS'); ?></h4>
|
21 |
+
<h3><?php if($wholedata['clicks_all_time_super_total']){echo $wholedata['clicks_all_time_super_total'];}else{echo "0";} ?></h3>
|
22 |
+
</div>
|
23 |
+
|
24 |
+
<div class="section-cell section-cell-dashboard ">
|
25 |
+
<h4><?php echo $this->__('COST'); ?></h4>
|
26 |
+
<h3><?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol() .' '.$wholedata['cost_all_time_super_total'] .'.00' ?></h3>
|
27 |
+
</div>
|
28 |
+
<div class="section-cell section-cell-dashboard">
|
29 |
+
<h4><?php echo $this->__('CPA'); ?></h4>
|
30 |
+
<h3><?php if($wholedata['impr_all_time_super_total']){echo $wholedata['impr_all_time_super_total']; }else{echo "-";} ?></h3>
|
31 |
+
</div>
|
32 |
+
|
33 |
+
|
34 |
+
</div>
|
35 |
+
<h2 class="clever_campaigns"> <?php echo $this->__('Clever Campaigns'); ?> :</h2>
|
36 |
+
<div class="section-row">
|
37 |
+
|
38 |
+
<div class="section-cell middile-cell-section clever-data-section">
|
39 |
+
<h4><?php echo $this->__('CLICKS'); ?></h4>
|
40 |
+
<h1><?php if($wholedata['clicks_all_time_super_total']){echo $wholedata['clicks_all_time_super_total'];}else{echo "0";} ?></h1>
|
41 |
+
<span class="sparkline"><hr></span>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
<div class="section-cell middile-cell-section clever-data-section-2">
|
45 |
+
<h4><?php echo $this->__('COST'); ?></h4>
|
46 |
+
<h1><?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol() .' '.$wholedata['cost_all_time_super_total'].'.00'; ?></h1>
|
47 |
+
<span class="sparkline"><hr></span>
|
48 |
+
|
49 |
+
<div> <?php// echo $this->__('Remaing Budget :'); ?> <font id="remaining_budget"></font></div>
|
50 |
+
</div>
|
51 |
+
<div class="section-cell middile-cell-section clever-data-section3">
|
52 |
+
<h4><?php echo $this->__('CPA'); ?> </h4>
|
53 |
+
<h1><?php if($wholedata['impr_all_time_super_total']){echo $wholedata['impr_all_time_super_total']; }else{echo "-";} ?></h1>
|
54 |
+
<span class="sparkline"><hr></span>
|
55 |
+
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
<div class="pricer-slider" id="wizard-p-4">
|
59 |
+
<div class="pricesilder-right">
|
60 |
+
<div class=slider-text>
|
61 |
+
<font>
|
62 |
+
<sup id="amount">
|
63 |
+
<?php //echo $this->__('USD $') ?>
|
64 |
+
|
65 |
+
</sup></font>
|
66 |
+
|
67 |
+
<font class="slider_day"> <?php echo $this->__('per day'); ?>
|
68 |
+
</font>
|
69 |
+
</div>
|
70 |
+
<div class="price_slider"> </div>
|
71 |
+
<div id="slider-range"></div>
|
72 |
+
</div>
|
73 |
+
<div class="pricesilder-left">
|
74 |
+
<h2> <?php echo $this->__('Campaign Status'); ?> :</h2>
|
75 |
+
<div class="container">
|
76 |
+
<span class="easyswitch"></span>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
|
82 |
+
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/jquery-1.9.1.min.js "></script>
|
83 |
+
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/priceslider.js "></script>
|
84 |
+
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/build/jquery.steps.js "></script>
|
85 |
+
<?php echo $this->getLayout()->createBlock('munoz/adminhtml_form')->setTemplate('munoz/switch.phtml')->toHtml(); ?>
|
86 |
+
<script src="<?php //echo $this->getSkinUrl(); ?>munoz/js/jquery.easyswitch.js "></script>
|
87 |
+
<script type="text/javascript">
|
88 |
+
var $wk_jq = jQuery.noConflict();
|
89 |
+
$wk_jq(function() {
|
90 |
+
|
91 |
+
var country_code = "<?php echo Mage::getStoreConfig('general/country/default'); ?>";
|
92 |
+
var curency_Symbol="<?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();?>";
|
93 |
+
$wk_jq( "#slider-range" ).slider({
|
94 |
+
range: "min",
|
95 |
+
min: 5,
|
96 |
+
max: 100,
|
97 |
+
value:'<?php if($wholedata['cost_all_time']){echo $wholedata['cost_all_time']; }else{ echo 15;} ?>',
|
98 |
+
slide: function( event, ui ) {
|
99 |
+
|
100 |
+
$wk_jq( "#amount" ).html( "<span class='curency_code'>"+country_code+"</span>" +"<span>"+curency_Symbol+"</span>"+ ui.value );
|
101 |
+
// $wk_jq( "#amount" ).html( "USD"+curency_Symbol+" " + ui.values[ 1 ] );
|
102 |
+
//$wk_jq( "#amount1" ).val(ui.values[ 0 ]);
|
103 |
+
$wk_jq( "#amount2" ).val(ui.values);
|
104 |
+
}
|
105 |
+
});
|
106 |
+
$wk_jq( "#amount" ).html("<span class='curency_code'>"+country_code+"</span>"+"<span>"+curency_Symbol+"</span>" + <?php if($wholedata['cost_all_time']){echo $wholedata['cost_all_time'];}else{echo '15';}?>);
|
107 |
+
});
|
108 |
+
|
109 |
+
$wk_jq('.easyswitch').easyswitch();
|
110 |
+
|
111 |
+
function onSwitch(value, obj) {
|
112 |
+
alert(value);
|
113 |
+
}
|
114 |
+
|
115 |
+
</script>
|
116 |
+
|
app/design/adminhtml/default/default/template/munoz/step1.phtml
CHANGED
@@ -24,7 +24,7 @@
|
|
24 |
</center>
|
25 |
<script>
|
26 |
$j('.allow_btn').click(function(event) {
|
27 |
-
|
28 |
var urls="http://manager.cleverppc.com/google_adwords?client_token=<?php echo $this->getDomain(); ?>";
|
29 |
var session_id="<?php echo $this->getDomain(); ?>";
|
30 |
/// $wk_jq('.category-loader').css('display','block');
|
@@ -34,7 +34,7 @@
|
|
34 |
var myWindow= window.open(urls,"popupWindow", "width=600,height=600,scrollbars=yes");
|
35 |
//setTimeout(get_response_url(myWindow,urls,session_id), 2000);
|
36 |
get_response_url(myWindow,session_id);
|
37 |
-
|
38 |
|
39 |
//return false;
|
40 |
// console.log(myWindow);
|
@@ -47,7 +47,7 @@
|
|
47 |
|
48 |
// alert(urls);
|
49 |
$wk_jq.ajax({
|
50 |
-
url :'<?php echo $this->
|
51 |
type : "get",
|
52 |
//async: false,
|
53 |
data : {'session_id':session_id},
|
@@ -55,7 +55,7 @@
|
|
55 |
success : function(content){
|
56 |
|
57 |
if(content=='success'){
|
58 |
-
|
59 |
set_parameter_curl();
|
60 |
|
61 |
setTimeout(function(){
|
@@ -72,6 +72,7 @@
|
|
72 |
myWindow.close();
|
73 |
}
|
74 |
else{
|
|
|
75 |
$j('.actions ul li:nth-child(even)').find('a:first').attr('href','');
|
76 |
$j('.loader').css('display','block');
|
77 |
$j('.wizard').css('opacity','0.5');
|
@@ -80,7 +81,7 @@
|
|
80 |
5000);
|
81 |
setTimeout(function(){
|
82 |
myWindow.close(),
|
83 |
-
location.href = '<?php echo $this->
|
84 |
},50000);
|
85 |
}
|
86 |
|
@@ -88,17 +89,41 @@
|
|
88 |
|
89 |
});
|
90 |
}
|
91 |
-
|
|
|
|
|
|
|
|
|
92 |
$wk_jq.ajax({
|
93 |
-
url :'<?php echo $this->
|
94 |
type : "get",
|
95 |
//async: false,
|
96 |
data : {'message':'setparam'},
|
97 |
dataType: "text",
|
98 |
success : function(reponse){
|
99 |
if (reponse=='success') {
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
|
104 |
}
|
24 |
</center>
|
25 |
<script>
|
26 |
$j('.allow_btn').click(function(event) {
|
27 |
+
|
28 |
var urls="http://manager.cleverppc.com/google_adwords?client_token=<?php echo $this->getDomain(); ?>";
|
29 |
var session_id="<?php echo $this->getDomain(); ?>";
|
30 |
/// $wk_jq('.category-loader').css('display','block');
|
34 |
var myWindow= window.open(urls,"popupWindow", "width=600,height=600,scrollbars=yes");
|
35 |
//setTimeout(get_response_url(myWindow,urls,session_id), 2000);
|
36 |
get_response_url(myWindow,session_id);
|
37 |
+
|
38 |
|
39 |
//return false;
|
40 |
// console.log(myWindow);
|
47 |
|
48 |
// alert(urls);
|
49 |
$wk_jq.ajax({
|
50 |
+
url :'<?php echo $this->getUrls("index/getCurlresponse"); ?>',
|
51 |
type : "get",
|
52 |
//async: false,
|
53 |
data : {'session_id':session_id},
|
55 |
success : function(content){
|
56 |
|
57 |
if(content=='success'){
|
58 |
+
|
59 |
set_parameter_curl();
|
60 |
|
61 |
setTimeout(function(){
|
72 |
myWindow.close();
|
73 |
}
|
74 |
else{
|
75 |
+
|
76 |
$j('.actions ul li:nth-child(even)').find('a:first').attr('href','');
|
77 |
$j('.loader').css('display','block');
|
78 |
$j('.wizard').css('opacity','0.5');
|
81 |
5000);
|
82 |
setTimeout(function(){
|
83 |
myWindow.close(),
|
84 |
+
location.href = '<?php echo $this->getUrls('index/index');?>';
|
85 |
},50000);
|
86 |
}
|
87 |
|
89 |
|
90 |
});
|
91 |
}
|
92 |
+
|
93 |
+
|
94 |
+
// set client info aouth status
|
95 |
+
|
96 |
+
function set_clint_info(){
|
97 |
$wk_jq.ajax({
|
98 |
+
url :'<?php echo $this->getUrls("index/SetcleintInfo"); ?>',
|
99 |
type : "get",
|
100 |
//async: false,
|
101 |
data : {'message':'setparam'},
|
102 |
dataType: "text",
|
103 |
success : function(reponse){
|
104 |
if (reponse=='success') {
|
105 |
+
location.reload();
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
})
|
110 |
+
}
|
111 |
|
112 |
+
|
113 |
+
|
114 |
+
// end aouth status
|
115 |
+
|
116 |
+
function set_parameter_curl(){
|
117 |
+
$wk_jq.ajax({
|
118 |
+
url :'<?php echo $this->getUrls("index/setParameter"); ?>',
|
119 |
+
type : "get",
|
120 |
+
//async: false,
|
121 |
+
data : {'message':'setparam'},
|
122 |
+
dataType: "text",
|
123 |
+
success : function(reponse){
|
124 |
+
if (reponse=='success') {
|
125 |
+
set_clint_info();
|
126 |
+
|
127 |
|
128 |
|
129 |
}
|
app/design/adminhtml/default/default/template/munoz/step2.phtml
CHANGED
@@ -177,7 +177,7 @@ Try to select as many as possible, this will allow you to have bigger opportunit
|
|
177 |
|
178 |
|
179 |
$wk_jq.ajax({
|
180 |
-
url :'<?php echo $this->
|
181 |
type : "get",
|
182 |
data : {Cat:checked,unselct:cheselected},
|
183 |
|
@@ -249,7 +249,7 @@ Try to select as many as possible, this will allow you to have bigger opportunit
|
|
249 |
$wk_jq('.wizard').css('opacity','0.5');
|
250 |
//thisthis.prepend("<span class='wk_node_loader'></span>");
|
251 |
$wk_jq.ajax({
|
252 |
-
url :'<?php echo $this->
|
253 |
type : "get",
|
254 |
data : {CID:thisthis.siblings("input").val(),
|
255 |
ML:thisthis.parent(".wk_cat_container").css("margin-left").replace("px","")},
|
177 |
|
178 |
|
179 |
$wk_jq.ajax({
|
180 |
+
url :'<?php echo $this->getUrls("index/SetCategory");?>',
|
181 |
type : "get",
|
182 |
data : {Cat:checked,unselct:cheselected},
|
183 |
|
249 |
$wk_jq('.wizard').css('opacity','0.5');
|
250 |
//thisthis.prepend("<span class='wk_node_loader'></span>");
|
251 |
$wk_jq.ajax({
|
252 |
+
url :'<?php echo $this->getUrls("index/categorytree")?>',
|
253 |
type : "get",
|
254 |
data : {CID:thisthis.siblings("input").val(),
|
255 |
ML:thisthis.parent(".wk_cat_container").css("margin-left").replace("px","")},
|
app/design/adminhtml/default/default/template/munoz/step3.phtml
CHANGED
@@ -4,6 +4,7 @@ $cat_ids=array();
|
|
4 |
foreach ($category_key as $cat_id) {
|
5 |
array_push($cat_ids,$cat_id->getCategoryId());
|
6 |
}
|
|
|
7 |
?>
|
8 |
<fieldset>
|
9 |
<script language="javascript">
|
@@ -41,7 +42,7 @@ foreach ($category_key as $cat_id) {
|
|
41 |
return false;
|
42 |
}
|
43 |
$wk_jq.ajax({
|
44 |
-
url :'<?php echo $this->
|
45 |
type : "get",
|
46 |
//async: false,
|
47 |
data : {id:Id,'value':textval,'type':'category'},
|
@@ -89,6 +90,7 @@ foreach ($category_key as $cat_id) {
|
|
89 |
$all_cat->addAttributeToFilter('is_active', 1)
|
90 |
->addAttributeToFilter('include_in_menu', 1);
|
91 |
foreach($all_cat as $_category) {
|
|
|
92 |
if(!in_array($_category->getId(), $cat_ids)){
|
93 |
if(!in_array($_category->getName(), $Black_list)){
|
94 |
if($_category->getMetaKeywords()){
|
4 |
foreach ($category_key as $cat_id) {
|
5 |
array_push($cat_ids,$cat_id->getCategoryId());
|
6 |
}
|
7 |
+
$add_keywords=$this->add_keywords();
|
8 |
?>
|
9 |
<fieldset>
|
10 |
<script language="javascript">
|
42 |
return false;
|
43 |
}
|
44 |
$wk_jq.ajax({
|
45 |
+
url :'<?php echo $this->getUrls("index/saveKeyword"); ?>',
|
46 |
type : "get",
|
47 |
//async: false,
|
48 |
data : {id:Id,'value':textval,'type':'category'},
|
90 |
$all_cat->addAttributeToFilter('is_active', 1)
|
91 |
->addAttributeToFilter('include_in_menu', 1);
|
92 |
foreach($all_cat as $_category) {
|
93 |
+
|
94 |
if(!in_array($_category->getId(), $cat_ids)){
|
95 |
if(!in_array($_category->getName(), $Black_list)){
|
96 |
if($_category->getMetaKeywords()){
|
app/design/adminhtml/default/default/template/munoz/step4.phtml
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<script language="javascript">
|
2 |
var $wk_jq=jQuery.noConflict();
|
3 |
$wk_jq( "#add_key_1" ).on( "click", ".key_save_button", function() {
|
@@ -9,7 +10,7 @@
|
|
9 |
return false;
|
10 |
}
|
11 |
$wk_jq.ajax({
|
12 |
-
url :'<?php echo $this->
|
13 |
type : "get",
|
14 |
//async: false,
|
15 |
data : {id:Id,'value':textval,'type':'calltoaction'},
|
@@ -62,7 +63,7 @@
|
|
62 |
if (id) {
|
63 |
if (confirm("Are you sure?")) {
|
64 |
$wk_jq.ajax({
|
65 |
-
url :'<?php echo $this->
|
66 |
type : "get",
|
67 |
//async: false,
|
68 |
data : {id:id,'type':'calltoaction'},
|
@@ -101,9 +102,7 @@
|
|
101 |
</div>
|
102 |
|
103 |
<div class="product_keyword_right">
|
104 |
-
|
105 |
-
|
106 |
-
<div class="section-content">
|
107 |
|
108 |
<div class="section-row" style="">
|
109 |
<div class="section-cell" >
|
@@ -129,22 +128,7 @@
|
|
129 |
?>
|
130 |
|
131 |
|
132 |
-
<div class='add-key-word'>
|
133 |
-
<button class='key_save_button add-key-word' value='ac_1'> <?php echo $this->__('save'); ?></button>
|
134 |
-
<input class='add-key-word test_key' value="<?php echo $this->__('Best prices for you.');?>" type='text' name='addkeyword'>
|
135 |
-
<i onclick ='RemoveTextBox(this)' class="fa fa-trash-o fa-2x" aria-hidden="true"></i>
|
136 |
-
</div>
|
137 |
|
138 |
-
<div class='add-key-word'>
|
139 |
-
<button class='key_save_button add-key-word' value='ac_2'><?php echo $this->__('save'); ?> </button>
|
140 |
-
<input class='add-key-word test_key' value="<?php echo $this->__('Free shipping and always return.');?>" type='text' name='addkeyword'>
|
141 |
-
<i onclick ='RemoveTextBox(this)' class="fa fa-trash-o fa-2x" aria-hidden="true"></i>
|
142 |
-
</div>
|
143 |
-
<div class='add-key-word'>
|
144 |
-
<button class='key_save_button test_key add-key-word' value='ac_3'> <?php echo $this->__('save'); ?></button>
|
145 |
-
<input class='add-key-word' value="<?php echo $this->__('Best Brands, huge catalog');?>" type='text' name='addkeyword'>
|
146 |
-
<i onclick ='RemoveTextBox(this)' class="fa fa-trash-o fa-2x" aria-hidden="true"></i>
|
147 |
-
</div>
|
148 |
|
149 |
<?php } ?>
|
150 |
|
1 |
+
<?php echo $addtips =$this->add_tips(); ?>
|
2 |
<script language="javascript">
|
3 |
var $wk_jq=jQuery.noConflict();
|
4 |
$wk_jq( "#add_key_1" ).on( "click", ".key_save_button", function() {
|
10 |
return false;
|
11 |
}
|
12 |
$wk_jq.ajax({
|
13 |
+
url :'<?php echo $this->getUrls("index/saveKeyword"); ?>',
|
14 |
type : "get",
|
15 |
//async: false,
|
16 |
data : {id:Id,'value':textval,'type':'calltoaction'},
|
63 |
if (id) {
|
64 |
if (confirm("Are you sure?")) {
|
65 |
$wk_jq.ajax({
|
66 |
+
url :'<?php echo $this->getUrls("index/deleteKeyword"); ?>',
|
67 |
type : "get",
|
68 |
//async: false,
|
69 |
data : {id:id,'type':'calltoaction'},
|
102 |
</div>
|
103 |
|
104 |
<div class="product_keyword_right">
|
105 |
+
<div class="section-content section_conntent_kewords">
|
|
|
|
|
106 |
|
107 |
<div class="section-row" style="">
|
108 |
<div class="section-cell" >
|
128 |
?>
|
129 |
|
130 |
|
|
|
|
|
|
|
|
|
|
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
<?php } ?>
|
134 |
|
app/design/adminhtml/default/default/template/munoz/step5.phtml
CHANGED
@@ -41,10 +41,10 @@
|
|
41 |
|
42 |
<center>
|
43 |
<div style="display:none" class="page-loader_finish"><?php $this->__("Pleaswe Wait We Posting Data"); ?></div>
|
44 |
-
<form action="<?php echo $this->
|
45 |
<button type="submit" class="btn primary finish">
|
46 |
|
47 |
-
<input type="hidden" name="budget" value="
|
48 |
<input type="hidden" name="countries" value="" id="countries">
|
49 |
<input type="hidden" name="checkecCat" value="" id="checkecCat">
|
50 |
<input type="hidden" name="unselectCat" value="" id="unselectCat">
|
@@ -56,7 +56,7 @@
|
|
56 |
</center>
|
57 |
<center>
|
58 |
|
59 |
-
<input type="checkbox" id="finish" class="icheck-me">
|
60 |
<label for="finish"><?php echo $this->__('Activate Campaigns when ready.'); ?></label>
|
61 |
</center>
|
62 |
|
@@ -87,16 +87,18 @@ var curency_Symbol="<?php echo Mage::app()->getLocale()->currency(Mage::app()->
|
|
87 |
range: "min",
|
88 |
min: 5,
|
89 |
max: 100,
|
90 |
-
|
|
|
91 |
slide: function( event, ui ) {
|
92 |
|
93 |
$wk_jq( "#amount" ).html( "<span class='curency_code'>"+country_code+"</span>" +"<span>"+curency_Symbol+"</span>"+ ui.value );
|
94 |
// $wk_jq( "#amount" ).html( "USD"+curency_Symbol+" " + ui.values[ 1 ] );
|
95 |
-
|
|
|
96 |
$wk_jq( "#amount2" ).val(ui.values);
|
97 |
}
|
98 |
});
|
99 |
-
$wk_jq( "#amount" ).html("<span class='curency_code'>"+country_code+"</span>"+"<span>"+curency_Symbol+"</span>" +
|
100 |
});
|
101 |
|
102 |
</script>
|
41 |
|
42 |
<center>
|
43 |
<div style="display:none" class="page-loader_finish"><?php $this->__("Pleaswe Wait We Posting Data"); ?></div>
|
44 |
+
<form action="<?php echo $this->getUrls('excelsheet/CreateExelShet'); ?>">
|
45 |
<button type="submit" class="btn primary finish">
|
46 |
|
47 |
+
<input type="hidden" name="budget" value="15" id="budget">
|
48 |
<input type="hidden" name="countries" value="" id="countries">
|
49 |
<input type="hidden" name="checkecCat" value="" id="checkecCat">
|
50 |
<input type="hidden" name="unselectCat" value="" id="unselectCat">
|
56 |
</center>
|
57 |
<center>
|
58 |
|
59 |
+
<input checked type="checkbox" id="finish" class="icheck-me">
|
60 |
<label for="finish"><?php echo $this->__('Activate Campaigns when ready.'); ?></label>
|
61 |
</center>
|
62 |
|
87 |
range: "min",
|
88 |
min: 5,
|
89 |
max: 100,
|
90 |
+
value: 15,
|
91 |
+
step:5,
|
92 |
slide: function( event, ui ) {
|
93 |
|
94 |
$wk_jq( "#amount" ).html( "<span class='curency_code'>"+country_code+"</span>" +"<span>"+curency_Symbol+"</span>"+ ui.value );
|
95 |
// $wk_jq( "#amount" ).html( "USD"+curency_Symbol+" " + ui.values[ 1 ] );
|
96 |
+
|
97 |
+
$wk_jq( "#budget" ).val(ui.value);
|
98 |
$wk_jq( "#amount2" ).val(ui.values);
|
99 |
}
|
100 |
});
|
101 |
+
$wk_jq( "#amount" ).html("<span class='curency_code'>"+country_code+"</span>"+"<span>"+curency_Symbol+"</span>" + 15);
|
102 |
});
|
103 |
|
104 |
</script>
|
app/design/adminhtml/default/default/template/munoz/switch.phtml
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $wholedata =Mage::app()->getRequest()->getParams();?>
|
2 |
+
<script>
|
3 |
+
(function($) {
|
4 |
+
$.fn.easyswitch = function(options) {
|
5 |
+
var default_options = {
|
6 |
+
'label-on' : 'ON',
|
7 |
+
'label-off' : 'PAUSE',
|
8 |
+
'name' : 'easyswitch',
|
9 |
+
'default' : 0,
|
10 |
+
'callback' : '',
|
11 |
+
'class-on' : 'on',
|
12 |
+
'class-off' : 'off',
|
13 |
+
'class-slider' : 'easyswitch-slider',
|
14 |
+
'class-label' : 'easyswitch-label'
|
15 |
+
};
|
16 |
+
options = $.extend(default_options, options);
|
17 |
+
|
18 |
+
this.each(function(i, item) {
|
19 |
+
var self = $(item), opts = {}, html = '';
|
20 |
+
|
21 |
+
$.each(options, function(k, v) {
|
22 |
+
var custom = self.attr('data-'+k);
|
23 |
+
opts[k] = (custom == undefined ? v : custom);
|
24 |
+
});
|
25 |
+
|
26 |
+
html = '<span class="'+opts['class-label']+'">'+opts['label-on']+'</span>\
|
27 |
+
<span class="'+opts['class-label']+'">'+opts['label-off']+'</span>\
|
28 |
+
<span class="'+opts['class-slider']+'"></span>';
|
29 |
+
if (opts['name']) {
|
30 |
+
html += '<input type="hidden" id="easyswitch-'+opts['name']+'" name="'+opts['name']+'" value="" />';
|
31 |
+
}
|
32 |
+
try {
|
33 |
+
opts['callback'] = eval('('+opts['callback']+')');
|
34 |
+
} catch (e) {
|
35 |
+
opts['callback'] = function(){};
|
36 |
+
}
|
37 |
+
|
38 |
+
self.append(html).click(function() {
|
39 |
+
if (self.hasClass(opts['class-off'])) {
|
40 |
+
|
41 |
+
var r = confirm("You are going to PAUSE all your campaigns. Do you want to do it?");
|
42 |
+
if (r == true) {
|
43 |
+
self.find('.'+opts['class-slider']).animate({left:'50%'}, 'fast', function() {
|
44 |
+
self.removeClass(opts['class-off']).addClass(opts['class-on']);
|
45 |
+
var value = false;
|
46 |
+
$('#easyswitch-'+opts['name']).val(value);
|
47 |
+
opts['callback'](value, self);
|
48 |
+
campaign_status(value);
|
49 |
+
});
|
50 |
+
}
|
51 |
+
|
52 |
+
} else {
|
53 |
+
var r = confirm("You are going to ENABLE all your campaigns. Do you want to do it?");
|
54 |
+
if (r == true) {
|
55 |
+
self.find('.'+opts['class-slider']).animate({left:'1px'}, 'fast', function() {
|
56 |
+
self.removeClass(opts['class-on']).addClass(opts['class-off']);
|
57 |
+
var value = true;
|
58 |
+
$('#easyswitch-'+opts['name']).val(value);
|
59 |
+
opts['callback'](value, self);
|
60 |
+
campaign_status(value);
|
61 |
+
});
|
62 |
+
}
|
63 |
+
}
|
64 |
+
});
|
65 |
+
|
66 |
+
opts['default'] = '<?php echo $this->CampaignStatus(); ?>';
|
67 |
+
if (opts['default']=='false') {
|
68 |
+
self.addClass(opts['class-on']);
|
69 |
+
$('#easyswitch-'+opts['name']).val(0);
|
70 |
+
self.find('.'+opts['class-slider']).css({left:'50%'});
|
71 |
+
} else {
|
72 |
+
self.addClass(opts['class-off']);
|
73 |
+
$('#easyswitch-'+opts['name']).val(1);
|
74 |
+
self.find('.'+opts['class-slider']).css({left:'1px'});
|
75 |
+
}
|
76 |
+
});
|
77 |
+
}
|
78 |
+
|
79 |
+
function campaign_status(status){
|
80 |
+
$wk_jq.ajax({
|
81 |
+
url :'<?php echo $this->getUrls("index/campaign_status"); ?>',
|
82 |
+
type : "get",
|
83 |
+
data : {'status':status},
|
84 |
+
dataType: "text",
|
85 |
+
success : function(reponse){
|
86 |
+
if (reponse=='success') {
|
87 |
+
location.reload();
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
})
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
})(jQuery);
|
96 |
+
</script>
|
app/design/adminhtml/default/default/template/munoz/waiting.phtml
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* LICENSE: $license_text$
|
4 |
*
|
@@ -28,7 +29,7 @@
|
|
28 |
Campaigns will pass through a review and quality control by one of our Google Adwords account managers.</br>'); ?>
|
29 |
|
30 |
<font class="waiting-message">
|
31 |
-
<?php echo $this->__('The whole process takes usually 2 working
|
32 |
</font>
|
33 |
<?php echo $this->__('Please be patient, we do great things.'); ?>
|
34 |
</br>
|
@@ -39,5 +40,58 @@
|
|
39 |
<center class="waiting-footer">
|
40 |
<?php echo $this->__('For any questions, please contact us at'); ?>
|
41 |
<a href="mailto:shopify@cleverppc.com"><?php echo $this->__('shopify@cleverppc.com'); ?></a></br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
<img src="https://docs.google.com/uc?id=1h_y3PGU7HIH2J3qZ8ZzsbiJwiVjHvEvw_g" alt="Google Adwords" height="50"></center>
|
|
|
|
|
43 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* LICENSE: $license_text$
|
5 |
*
|
29 |
Campaigns will pass through a review and quality control by one of our Google Adwords account managers.</br>'); ?>
|
30 |
|
31 |
<font class="waiting-message">
|
32 |
+
<?php echo $this->__('The whole process takes usually 2 working weeks.'); ?>
|
33 |
</font>
|
34 |
<?php echo $this->__('Please be patient, we do great things.'); ?>
|
35 |
</br>
|
40 |
<center class="waiting-footer">
|
41 |
<?php echo $this->__('For any questions, please contact us at'); ?>
|
42 |
<a href="mailto:shopify@cleverppc.com"><?php echo $this->__('shopify@cleverppc.com'); ?></a></br>
|
43 |
+
|
44 |
+
<center class = "accurate_box">
|
45 |
+
<p class="more_accurate"><?php echo $this->__("Though you are done, if you want to improve the accuracy of your campaigns.</br> ")?>
|
46 |
+
<a href='<?php echo $this->getUrls('excelsheet/getAccurate') ?>'>Press click</a>
|
47 |
+
</br>
|
48 |
+
</center>
|
49 |
+
|
50 |
<img src="https://docs.google.com/uc?id=1h_y3PGU7HIH2J3qZ8ZzsbiJwiVjHvEvw_g" alt="Google Adwords" height="50"></center>
|
51 |
+
|
52 |
+
|
53 |
</div>
|
54 |
+
|
55 |
+
<?php $wholekeyword=$this->getRequest()->getParams();
|
56 |
+
// print_r($wholekeyword);
|
57 |
+
?>
|
58 |
+
|
59 |
+
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/jquery-1.9.1.min.js "></script>
|
60 |
+
<script>
|
61 |
+
$wk_jq=jQuery.noConflict();
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
var budget ='<?php echo $wholekeyword['budget']; ?>';
|
68 |
+
var countries ='<?php echo $wholekeyword['countries']; ?>';
|
69 |
+
var checkecCat ='<?php echo $wholekeyword['checkecCat']; ?>';
|
70 |
+
var unselectCat ='<?php echo $wholekeyword['unselectCat']; ?>';
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
+
window.onload = function() {
|
75 |
+
|
76 |
+
|
77 |
+
$wk_jq.ajax({
|
78 |
+
url :'<?php echo $this->getUrls("index/BackGroundProcess"); ?>',
|
79 |
+
type : "get",
|
80 |
+
//async: false,
|
81 |
+
data : {'budget':budget,'countries':countries,'checkecCat':checkecCat,'unselectCat':unselectCat},
|
82 |
+
dataType: "text",
|
83 |
+
success : function(reponse){
|
84 |
+
if (reponse=='success') {
|
85 |
+
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
})
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
</script>
|
97 |
+
|
app/design/adminhtml/default/default/template/munoz/welcome.phtml
CHANGED
@@ -12,7 +12,8 @@
|
|
12 |
*/
|
13 |
|
14 |
?>
|
15 |
-
|
|
|
16 |
<center style="margin-top: 5%">
|
17 |
<img height="200" src="<?php echo $this->getMediaUrl().'adwords-screen.png'; ?>">
|
18 |
</center>
|
@@ -22,7 +23,7 @@
|
|
22 |
Only pay when they click to visit your website or call.') ?>
|
23 |
</p>
|
24 |
|
25 |
-
<button onclick="setLocation('<?php echo $this->
|
26 |
<?php echo $this->__('Start Now');?>
|
27 |
</button>
|
28 |
</center>
|
12 |
*/
|
13 |
|
14 |
?>
|
15 |
+
|
16 |
+
<div class="clever-welcome-page test">
|
17 |
<center style="margin-top: 5%">
|
18 |
<img height="200" src="<?php echo $this->getMediaUrl().'adwords-screen.png'; ?>">
|
19 |
</center>
|
23 |
Only pay when they click to visit your website or call.') ?>
|
24 |
</p>
|
25 |
|
26 |
+
<button onclick="setLocation('<?php echo $this->getUrls("index/getForm")?>')" title=" <?php echo $this->__('Start Now');?>" method ="get" class="btn primary">
|
27 |
<?php echo $this->__('Start Now');?>
|
28 |
</button>
|
29 |
</center>
|
app/design/frontend/base/default/template/munoz/google/adwords/conversion.phtml
CHANGED
@@ -1,29 +1,20 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Template for Rodrigo_Munoz_ conversuon in success page */
|
4 |
-
?>
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
<!-- Google Code for purchase_conversion_cleverppc Conversion Page -->
|
9 |
-
<script type
|
10 |
-
|
|
|
11 |
var google_conversion_language = "en";
|
12 |
var google_conversion_format = "2";
|
13 |
var google_conversion_color = "ffffff";
|
14 |
-
var google_conversion_label = "
|
15 |
-
|
16 |
-
|
17 |
-
var google_conversion_currency = "EUR";
|
18 |
var google_remarketing_only = false;
|
19 |
/* ]]> */
|
20 |
</script>
|
21 |
-
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js
|
22 |
-
|
23 |
</script>
|
24 |
-
|
25 |
<noscript>
|
26 |
-
<div style="display:inline
|
27 |
-
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/
|
28 |
</div>
|
29 |
</noscript>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<!-- Google Code for purchase_conversion_cleverppc Conversion Page -->
|
2 |
+
<script type="text/javascript">
|
3 |
+
/* <![CDATA[ */
|
4 |
+
var google_conversion_id = 940384895;
|
5 |
var google_conversion_language = "en";
|
6 |
var google_conversion_format = "2";
|
7 |
var google_conversion_color = "ffffff";
|
8 |
+
var google_conversion_label = "PJCiCN7nsGUQ_8S0wAM";
|
9 |
+
var google_conversion_value = 4007045;
|
10 |
+
var google_conversion_currency = "INR";
|
|
|
11 |
var google_remarketing_only = false;
|
12 |
/* ]]> */
|
13 |
</script>
|
14 |
+
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
|
|
|
15 |
</script>
|
|
|
16 |
<noscript>
|
17 |
+
<div style="display:inline;">
|
18 |
+
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/940384895/?value=4007045&currency_code=INR&label=PJCiCN7nsGUQ_8S0wAM&guid=ON&script=0"/>
|
19 |
</div>
|
20 |
</noscript>
|
app/design/frontend/base/default/template/munoz/google/adwords/remarket_tag.phtml
CHANGED
@@ -3,23 +3,19 @@
|
|
3 |
* Template for Rodrigo_Munoz_Remarketing Tracking Tracking */
|
4 |
?>
|
5 |
|
6 |
-
<?php
|
7 |
-
$configValue = Mage::getStoreConfig('Rodrigo/google_remarketing/conversions_id');
|
8 |
-
?>
|
9 |
-
|
10 |
<!-- Google Conversion Code -->
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
3 |
* Template for Rodrigo_Munoz_Remarketing Tracking Tracking */
|
4 |
?>
|
5 |
|
|
|
|
|
|
|
|
|
6 |
<!-- Google Conversion Code -->
|
7 |
+
<!-- Google Code for Remarketing Tag -->
|
8 |
+
<script type="text/javascript">
|
9 |
+
/* <![CDATA[ */
|
10 |
+
var google_conversion_id =940384895;
|
11 |
+
var google_custom_params = window.google_tag_params;
|
12 |
+
var google_remarketing_only = true;
|
13 |
+
/* ]]> */
|
14 |
+
</script>
|
15 |
+
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
|
16 |
+
</script>
|
17 |
+
<noscript>
|
18 |
+
<div style="display:inline;">
|
19 |
+
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/940384895/?value=0&guid=ON&script=0"/>
|
20 |
+
</div>
|
21 |
+
</noscript>
|
media/munoz/Selecci/303/263n_007.png
ADDED
Binary file
|
media/munoz/age.png
ADDED
Binary file
|
media/munoz/checked_rmkt.png
ADDED
Binary file
|
media/munoz/computer.png
ADDED
Binary file
|
media/munoz/devices.png
ADDED
Binary file
|
media/munoz/female.png
ADDED
Binary file
|
media/munoz/gender.png
ADDED
Binary file
|
media/munoz/male.png
ADDED
Binary file
|
media/munoz/mobile.png
ADDED
Binary file
|
package.xml
CHANGED
@@ -1,13 +1,15 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>clever_adwords</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
-
<license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description><
|
|
|
|
|
11 |

|
12 |
To learn more about us <a href="https://www.youtube.com/watch?v=X-0KkvM4g0U&fmt=22&hl=en_US">Watch this video !</a>
|
13 |
</h2>
|
@@ -16,46 +18,12 @@ Just 5 simple steps configuration, and your campaigns will be on Adwords search
|
|
16 |

|
17 |
No work from your side, <b>we will upload all campaigns for you.</b> 
|
18 |

|
19 |
-
<h2>
|
20 |
-

|
21 |
-
<ul>
|
22 |
-
<li><b>SEARCH</b> : Be seen by customers right when they are searching on Google. </li>
|
23 |
-
<li><b>DISPLAY</b> : 
|
24 |
-
<ul>
|
25 |
-
<li>Banner & Text Ads : Target people likely to be interested in your product (age, gender, page visited,...). We will create a set of banners at no cost :)</li>
|
26 |
-
<li>Remarketing : Retarget your own visitors once they leave your site.</li>
|
27 |
-
</ul>
|
28 |
-
</li>
|
29 |
-

|
30 |
-
</ul>
|
31 |
-

|
32 |
-

|
33 |
-
Be seen by customers right when they are searching on Google, automated by CleverPPC.
|
34 |
-

|
35 |
-
After the creation of the campaigns, CleverAdwords will start <b>optimizing your campaigns</b>. Be aware that for advertisers with low spend, it will take awhile for our algorithms to optimize properly (about 2 months depending on the volume)
|
36 |
-

|
37 |
-
More info at:
|
38 |
-
<a href="https://www.cleverecommerce.com?v=X-0KkvM4g0U&fmt=22&hl=en_US">www.cleverecommerce.com</a>
|
39 |
-

|
40 |
-

|
41 |
-
<h2>FAQ</h2>
|
42 |
-
<h3>Do I need an adwords account ?</h3>
|
43 |
-
Yes, you should have your own account, it is simple to create.
|
44 |
-
<h3>Do I need Shopify collections ?</h3>
|
45 |
-
Yes, but in case that you don’t have them, the app will request permission to create hidden collections with products categories. We need collections to help structure the campaigns.
|
46 |
-
<h3>How long it takes?</h3>
|
47 |
-
Less that 5 minutes to configure, and about 48 hours for processing and reviewing. Campaigns will pass through review and quality control by one of our Google Adwords account manager, which should take less than 48 hours.
|
48 |
-
<h3>Is it Free?</h3>
|
49 |
-
Yes, It is totally free, for now, so do not hesitate to try it. 
|
50 |
-
<h3>How much should I spend on Adwords?</h3>
|
51 |
-
It totally Depends on your business and industry, but let's start with something like $10 per day.
|
52 |
-
<h3>What happens if I include more products/collections after creation?</h3>
|
53 |
-
In this case, please contact us.</description>
|
54 |
<notes>Fixed minor bugs</notes>
|
55 |
<authors><author><name>Rodrigo</name><user>Rodrigo</user><email>rodrigo@cleverppc.com</email></author></authors>
|
56 |
-
<date>2016-
|
57 |
-
<time>
|
58 |
-
<contents><target name="magelocal"><dir name="Rodrigo"><dir name="Munoz"><dir name="Block"><dir name="Adminhtml"><file name="Form.php" hash="468b372b274edeced7cea42cd5408df0"/></dir></dir><dir name="Helper"><file name="Data.php" hash="fc1bcf8c0fb907db2a545ca518af1fcf"/></dir><dir name="Model"><file name="Keyword.php" hash="63b04480862a41d841833d28374a8fed"/><dir name="Mysql4"><dir name="Keyword"><file name="Collection.php" hash="5e74a7fc484cb68f003d8d843fad7852"/></dir><file name="Keyword.php" hash="b3ff64494c92d5ca070ebf0a33d2c072"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ExcelsheetController.php" hash="fa4ad14ea26d25b7934acdafd4a0b7cb"/><file name="IndexController.php" hash="51df98788145c13cdcb794f35826cf0c"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="cdf47fa749068b411c2704fda8eb4444"/><file name="config.xml" hash="e6846d49f1946d52b2618a9e2b7ca960"/><file name="system.xml" hash="b1eec31001ae641320cc79f86a62f760"/></dir><dir name="sql"><dir name="keyword_setup"><file name="mysql4-install-0.1.0.php" hash="b2451ebdfddbd3f2c607284c987ebea8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="munoz.xml" hash="678219f4bc22d67eea96565faa33bf40"/></dir><dir name="template"><dir name="munoz"><file name="form.phtml" hash="767f7c4e440144dec39a2eb915f2390e"/><file name="step1.phtml" hash="707d9e853639b91be6ccd9a248392b5d"/><file name="step2.phtml" hash="dcf86f4e24af60500be51e1629da166e"/><file name="step3.phtml" hash="c938266c273c0ec456bdba1b69faa188"/><file name="step4.phtml" hash="3478d2d86899241a10a91fd5f9d794b2"/><file name="step5.phtml" hash="cb8be498e201a417f4f7f9660df68be9"/><file name="waiting.phtml" hash="eaee168a3a308326953bac8b2f57b1c7"/><file name="welcome.phtml" hash="4b0ce01d681559024ef6ce269570d5ba"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ro.xml" hash="ad1086f90d433a59d51823be9110ecee"/></dir><dir><dir name="template"><dir name="munoz"><dir name="google"><dir name="adwords"><file name="conversion.phtml" hash="01c7176d8b82956828392cb1e5d258d8"/><file name="remarket_tag.phtml" hash="55665bb350c437fa1511b6540482929f"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Rodrigo_Munoz.xml" hash="6b1a61c409f48a95f87c61d678a26a42"/></dir></target><target name="magemedia"><dir name="munoz"><file name="ads_tips.png" hash="555cc05f3b14b7cfb089cb6bf0fe4900"/><file name="adwords-logo.png" hash="fbfcea42be8bdc62b1ca559dc72bbd5e"/><file name="adwords-screen.png" hash="6261a10c000b75b2b7b6e22307a4e5e5"/><file name="adwords-symbol.png" hash="90a1ce04aa7bc5e82594677d2b7aa119"/><file name="ico1.png" hash="deea6977b369c8a252db6c7ad70b13c9"/><file name="ico2.png" hash="258381acb1c2829660fe78916fa7f7b1"/><file name="ico4.png" hash="df8e0052bea21c4fdcac45cbb6b11f00"/><file name="ico5.png" hash="fd197c3807a51238958d83b1986ac47a"/><file name="imgpsh_fullsize.png" hash="a9de1d69724f0cd96727045ea9403992"/><file name="keywords.png" hash="075655566b7b7abe2cf36d12f1aa6ca9"/><file name="logo.png" hash="55c45b86a18f3c94e1dbd70af8db2487"/><file name="old-adwords-screen.png" hash="cef9f147366c521f4e089d049128a21c"/><file name="rockstar.png" hash="6d88b35fbeba82088f8969215aca88a3"/><file name="wait.png" hash="946052e085a5c60fc71f3c716fb806c1"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="munoz"><dir name="css"><file name="ad-icon.jpg" hash="b87496c052b306a94eabf5af3544a717"/><file name="adwords-symbol.png" hash="90a1ce04aa7bc5e82594677d2b7aa119"/><file name="font-awesome.css" hash="b652e3b759188ceaf79182f2fe72ea64"/><file name="font-awesome.min.css" hash="4083f5d376eb849a458cc790b53ba080"/><file name="imgpsh_fullsize.png" hash="a9de1d69724f0cd96727045ea9403992"/><file name="jquery-ui.css" hash="29115555d9d54f1031eb8c6b2b18ffaf"/><file name="jquery.steps.css" hash="5a25f593fe74b7d73a3c2a4212ac6612"/><file name="main.css" hash="aa03751cf9078dc47675f907e22bd2a5"/><file name="styles.css" hash="6f41f10e2081446f2872d0329b9ea47d"/></dir><dir name="fonts"><file name="FontAwesome.otf" hash="5dc41d8fe329a22fa1ee9225571c843e"/><file name="fontawesome-webfont.eot" hash="25a32416abee198dd821b0b17a198a8f"/><file name="fontawesome-webfont.svg" hash="d7c639084f684d66a1bc66855d193ed8"/><file name="fontawesome-webfont.ttf" hash="1dc35d25e61d819a9c357074014867ab"/><file name="fontawesome-webfont.woff" hash="c8ddf1e5e5bf3682bc7bebf30f394148"/><file name="fontawesome-webfont.woff2" hash="e6cf7c6ec7c2d6f670ae9d762604cb0b"/></dir><dir name="images"><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="delete_dust.png" hash="948ef1640b50d09d385597f967e6ebc1"/><file name="elbow-end-minus-nl.gif" hash="6dc08c43109cc6a365bd0270f05e2f1c"/><file name="elbow-end-minus.gif" hash="3dbdb88a9297fe5631e832f046b0350b"/><file name="elbow-end-plus-nl.gif" hash="6dc08c43109cc6a365bd0270f05e2f1c"/><file name="elbow-end-plus.gif" hash="5470e5712a9742ba666c26cb429baaeb"/><file name="elbow-end.gif" hash="63fe879440e2784e0cc0d316ce017745"/><file name="elbow-line.gif" hash="b316a39455304e20e01dbc437f57fd32"/><file name="elbow-minus-nl.gif" hash="0e3129bff70475c8f7f297e0e59d1608"/><file name="elbow-minus.gif" hash="e7b18ff6800e65c6e171bbb2a911762e"/><file name="elbow-plus-nl.gif" hash="78a8f737941fa658f1e770258a3791cd"/><file name="elbow-plus.gif" hash="b02cb264df55aef2105b1b245d075e56"/><file name="elbow.gif" hash="b6bd0e0237e3cd413fa2dac27701c724"/><file name="elbow_minus.png" hash="3fc01d7af6d0f10fb6ea321f85cfc4ce"/><file name="elbow_plus.png" hash="1deaa077bfe1c95f161e323aae1dc989"/><file name="folder-open.gif" hash="e3cd196406d4857dc0c926807f16c409"/><file name="folder.gif" hash="03eb26c42137ac792609822862ef4d0f"/><file name="keywords.png" hash="075655566b7b7abe2cf36d12f1aa6ca9"/><file name="leaf.gif" hash="e3cd196406d4857dc0c926807f16c409"/><file name="loading.gif" hash="00ef871b291bc03a497d608a5bd8ec99"/><file name="loading.png" hash="be5a561a53b5efe2e464f5acb811e90e"/><file name="s.gif" hash="df3e567d6f16d040326c7a0ea29a4f41"/><file name="styles.css" hash="73525c4881f2048bf59a594c61de3e09"/></dir><dir name="js"><dir name="build"><file name="jQuery.Steps.1.1.0.nupkg" hash="979939a5151179f40ab6883ea12cfbc4"/><file name="jquery.steps-1.1.0.zip" hash="f446d606df167069be7718434b11ff55"/><file name="jquery.steps.js" hash="bbfb0e2ffb177ba6a300145e7a4b56b4"/><file name="jquery.steps.min.js" hash="4c5e9f4e84d32b7df69af7420b355e03"/></dir><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="jquery-1.11.1.min.js" hash="8101d596b2b8fa35fe3a634ea342d7c3"/><file name="jquery-1.9.1.min.js" hash="663628f795cb62444143fde1ebdf2b5b"/><file name="jquery.cookie-1.3.1.js" hash="e5937111b7dc83385e3f4c7b91af7a80"/><file name="modernizr-2.6.2.min.js" hash="42306a279a9e831515347ae319181cd1"/><file name="priceslider.js" hash="04a4db2983450a2970c459ba87b4210a"/></dir><dir name="less"><file name="animated.less" hash="08baef05e05301cabc91599a54921081"/><file name="bordered-pulled.less" hash="898f90e40876883214bbd121b0c20e9f"/><file name="core.less" hash="fb4efe4ae63737706875bbbfc7b7e9af"/><file name="fixed-width.less" hash="5e07ec001f8d21bd279c12ee542813f7"/><file name="font-awesome.less" hash="f53235946c37e394a6cd6d92f84587a8"/><file name="icons.less" hash="3c3bb8fbcd54a6b66a41137d5e9e8a33"/><file name="larger.less" hash="8cb65280c0f889daf72626c21a7c8628"/><file name="list.less" hash="975571323cf880a4a30601998236b027"/><file name="mixins.less" hash="fbb1f2f1ab96ba020c7f14208aac72b8"/><file name="path.less" hash="a8c41460c42a4fe9e98550f00c8b3f19"/><file name="rotated-flipped.less" hash="a8476cdc50c264abd11ff59d6a9dd025"/><file name="screen-reader.less" hash="0f881617264587bef0df6ce92253ecea"/><file name="stacked.less" hash="518e2b2d263982d2caa1e6514b4b4eac"/><file name="variables.less" hash="45fa411bbd22ff8467e027318a88a557"/></dir><file name="loader_new.jpg" hash="e02968245a670ef65a06411a442e557a"/><dir name="scss"><file name="_animated.scss" hash="39ff4f359a7b81d6585075715f41e5dc"/><file name="_bordered-pulled.scss" hash="4cad0df17bf40327feae33fa9a6c6ba2"/><file name="_core.scss" hash="ef059a98cf9de6ca5b77ee6850771cf0"/><file name="_fixed-width.scss" hash="9277ab6964a434d499873687b00be906"/><file name="_icons.scss" hash="fdffb08bc3d85c7427d8697f268fb072"/><file name="_larger.scss" hash="e95931566f6fc6ad5685c4fa9802e206"/><file name="_list.scss" hash="7107e80b053928271d5fcf422dc29490"/><file name="_mixins.scss" hash="aa2b8f32b403733713d8885f14ab86cc"/><file name="_path.scss" hash="ab5a9e8388563e097b5ce835601f01d2"/><file name="_rotated-flipped.scss" hash="9f5d4bc6fadea89328d2aac26574a9d8"/><file name="_screen-reader.scss" hash="8907bd7dbf4799e8120bda5568d76fea"/><file name="_stacked.scss" hash="5594237226aedfbca2fa1c7f4604c214"/><file name="_variables.scss" hash="783d4422626a7f27fa8f513de3ad4795"/><file name="font-awesome.scss" hash="ace7fb9336021f92b1cf68a10d5f452c"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="shell"><file name="createInstance.php" hash="bd5ea937f368949ccdf14a3c5591471a"/></dir></target></contents>
|
59 |
<compatible/>
|
60 |
-
<dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php
|
61 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>clever_adwords</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license>OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Clever AdWords provides automated creation and optimization. Greatly improves your performance in search.</summary>
|
10 |
+
<description><h1> We're almost ready, in a few days we started to promote your magento store </h1>
|
11 |
+

|
12 |
+
<h2> ❱ Get your ad on Google with a Premium Google Partner
|
13 |

|
14 |
To learn more about us <a href="https://www.youtube.com/watch?v=X-0KkvM4g0U&fmt=22&hl=en_US">Watch this video !</a>
|
15 |
</h2>
|
18 |

|
19 |
No work from your side, <b>we will upload all campaigns for you.</b> 
|
20 |

|
21 |
+
<h2></description>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
<notes>Fixed minor bugs</notes>
|
23 |
<authors><author><name>Rodrigo</name><user>Rodrigo</user><email>rodrigo@cleverppc.com</email></author></authors>
|
24 |
+
<date>2016-07-25</date>
|
25 |
+
<time>13:36:07</time>
|
26 |
+
<contents><target name="magelocal"><dir name="Rodrigo"><dir name="Munoz"><dir name="Block"><dir name="Adminhtml"><file name="Form.php" hash="1fabfa543250f359fbe75cf80f04a1cd"/></dir></dir><dir name="Helper"><file name="Data.php" hash="fc1bcf8c0fb907db2a545ca518af1fcf"/></dir><dir name="Model"><file name="Keyword.php" hash="f0e4ff03e65f91ff5b24e3246e9e3636"/><dir name="Mysql4"><dir name="Keyword"><file name="Collection.php" hash="5e74a7fc484cb68f003d8d843fad7852"/></dir><file name="Keyword.php" hash="b3ff64494c92d5ca070ebf0a33d2c072"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ExcelsheetController.php" hash="6b5c53de3591695cebfc2a1e1e7b89dd"/><file name="IndexController.php" hash="e6a4efa31d0f4be6770bbd169d6747e3"/></dir><file name="IndexController.php" hash="fa73f9ae7feb2e3fa80edea3e8774838"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cdf47fa749068b411c2704fda8eb4444"/><file name="config.xml" hash="516d1ae5dcdf5cb9ce5bdba33c540a1c"/><file name="system.xml" hash="b1eec31001ae641320cc79f86a62f760"/></dir><dir name="sql"><dir name="keyword_setup"><file name="mysql4-install-0.1.0.php" hash="3750ceba32d9ee0c6ff6969d05bae5d4"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Rodrigo_Munoz.xml" hash="6b1a61c409f48a95f87c61d678a26a42"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="munoz.xml" hash="90a68756fc55ba44af02f5a16a2fbb9a"/></dir><dir name="template"><dir name="munoz"><file name="accurate.phtml" hash="6756a290bc1499bf80c2882a9baa2601"/><file name="dashboard.phtml" hash="4392063004a5bf5f80cec139a8ee29c0"/><file name="form.phtml" hash="767f7c4e440144dec39a2eb915f2390e"/><file name="step1.phtml" hash="89e1166cea0b6f82726129b343919086"/><file name="step2.phtml" hash="3fca6072ed0de6face5a14f5868b57ab"/><file name="step3.phtml" hash="41ec4ef2ca626670715a9ef7fbe1dd2d"/><file name="step4.phtml" hash="3d6425debc3a5541f9c51ed7ed51054d"/><file name="step5.phtml" hash="de56ce68efa90c89a4092bc5b67d9955"/><file name="switch.phtml" hash="0b4affaa8e4e9bfb78d1ed36a6ae1c8f"/><file name="waiting.phtml" hash="5e864f861d543c3dff82c4b75a6be9e7"/><file name="welcome.phtml" hash="956926f7fa15775f0755f59533f2dbe9"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir><dir name="template"><dir name="munoz"><dir name="google"><dir name="adwords"><file name="conversion.phtml" hash="fcea58042d20c6f8c7b3d0b845f99134"/><file name="remarket_tag.phtml" hash="06b6b7084772262cf298df8c5e52504d"/></dir></dir></dir></dir></dir><dir name="layout"><file name="ro.xml" hash="ad1086f90d433a59d51823be9110ecee"/></dir></dir></dir></dir></target><target name="magemedia"><dir name="munoz"><file name="Selección_007.png" hash="a7f34f0918bd15ad6e5fe3c103433d58"/><file name="ads_tips.png" hash="555cc05f3b14b7cfb089cb6bf0fe4900"/><file name="adwords-logo.png" hash="fbfcea42be8bdc62b1ca559dc72bbd5e"/><file name="adwords-screen.png" hash="6261a10c000b75b2b7b6e22307a4e5e5"/><file name="adwords-symbol.png" hash="90a1ce04aa7bc5e82594677d2b7aa119"/><file name="age.png" hash="fb7b4011e56345875426191d470cb9c1"/><file name="checked_rmkt.png" hash="2136fb7110ae7fe6fa64f170c036451f"/><file name="computer.png" hash="614895299f0ff062326222284969f66b"/><file name="devices.png" hash="7f0ea3c3260ee54fe266f2c13ae6704b"/><file name="female.png" hash="95ee4dcaef28e8422e0f4966253d6c2c"/><file name="gender.png" hash="96fe85bd81be701de76bec1236b26226"/><file name="ico1.png" hash="deea6977b369c8a252db6c7ad70b13c9"/><file name="ico2.png" hash="258381acb1c2829660fe78916fa7f7b1"/><file name="ico4.png" hash="df8e0052bea21c4fdcac45cbb6b11f00"/><file name="ico5.png" hash="fd197c3807a51238958d83b1986ac47a"/><file name="imgpsh_fullsize.png" hash="a9de1d69724f0cd96727045ea9403992"/><file name="keywords.png" hash="075655566b7b7abe2cf36d12f1aa6ca9"/><file name="logo.png" hash="55c45b86a18f3c94e1dbd70af8db2487"/><file name="male.png" hash="c71923fdae30561fb1cb7d3a3db10809"/><file name="mobile.png" hash="9a0c157149bdccf33b92e556e4442cc3"/><file name="old-adwords-screen.png" hash="cef9f147366c521f4e089d049128a21c"/><file name="rockstar.png" hash="6d88b35fbeba82088f8969215aca88a3"/><file name="wait.png" hash="946052e085a5c60fc71f3c716fb806c1"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="munoz"><dir name="css"><file name="ad-icon.jpg" hash="b87496c052b306a94eabf5af3544a717"/><file name="adwords-symbol.png" hash="90a1ce04aa7bc5e82594677d2b7aa119"/><file name="font-awesome.css" hash="b652e3b759188ceaf79182f2fe72ea64"/><file name="font-awesome.min.css" hash="4083f5d376eb849a458cc790b53ba080"/><file name="imgpsh_fullsize.png" hash="a9de1d69724f0cd96727045ea9403992"/><file name="jquery-ui.css" hash="b50192cf9c90fe83462ce9a7bcdd29c7"/><file name="jquery.steps.css" hash="5a25f593fe74b7d73a3c2a4212ac6612"/><file name="main.css" hash="aa03751cf9078dc47675f907e22bd2a5"/><file name="progress-bar.png" hash="bd5b9782b845486917de1b1e9fc2c631"/><file name="simple_container_bg.gif" hash="56f1ac91169eb4896b8c91384fc8bf15"/><file name="styles.css" hash="8c5babc27a234aba38da6887a21a0eb5"/></dir><dir name="fonts"><file name="FontAwesome.otf" hash="5dc41d8fe329a22fa1ee9225571c843e"/><file name="fontawesome-webfont.eot" hash="25a32416abee198dd821b0b17a198a8f"/><file name="fontawesome-webfont.svg" hash="d7c639084f684d66a1bc66855d193ed8"/><file name="fontawesome-webfont.ttf" hash="1dc35d25e61d819a9c357074014867ab"/><file name="fontawesome-webfont.woff" hash="c8ddf1e5e5bf3682bc7bebf30f394148"/><file name="fontawesome-webfont.woff2" hash="e6cf7c6ec7c2d6f670ae9d762604cb0b"/></dir><dir name="images"><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="delete_dust.png" hash="948ef1640b50d09d385597f967e6ebc1"/><file name="elbow-end-minus-nl.gif" hash="6dc08c43109cc6a365bd0270f05e2f1c"/><file name="elbow-end-minus.gif" hash="3dbdb88a9297fe5631e832f046b0350b"/><file name="elbow-end-plus-nl.gif" hash="6dc08c43109cc6a365bd0270f05e2f1c"/><file name="elbow-end-plus.gif" hash="5470e5712a9742ba666c26cb429baaeb"/><file name="elbow-end.gif" hash="63fe879440e2784e0cc0d316ce017745"/><file name="elbow-line.gif" hash="b316a39455304e20e01dbc437f57fd32"/><file name="elbow-minus-nl.gif" hash="0e3129bff70475c8f7f297e0e59d1608"/><file name="elbow-minus.gif" hash="e7b18ff6800e65c6e171bbb2a911762e"/><file name="elbow-plus-nl.gif" hash="78a8f737941fa658f1e770258a3791cd"/><file name="elbow-plus.gif" hash="b02cb264df55aef2105b1b245d075e56"/><file name="elbow.gif" hash="b6bd0e0237e3cd413fa2dac27701c724"/><file name="elbow_minus.png" hash="3fc01d7af6d0f10fb6ea321f85cfc4ce"/><file name="elbow_plus.png" hash="1deaa077bfe1c95f161e323aae1dc989"/><file name="folder-open.gif" hash="e3cd196406d4857dc0c926807f16c409"/><file name="folder.gif" hash="03eb26c42137ac792609822862ef4d0f"/><file name="keywords.png" hash="075655566b7b7abe2cf36d12f1aa6ca9"/><file name="leaf.gif" hash="e3cd196406d4857dc0c926807f16c409"/><file name="loading.gif" hash="00ef871b291bc03a497d608a5bd8ec99"/><file name="loading.png" hash="be5a561a53b5efe2e464f5acb811e90e"/><file name="s.gif" hash="df3e567d6f16d040326c7a0ea29a4f41"/><file name="simple_container_bg.gif" hash="56f1ac91169eb4896b8c91384fc8bf15"/><file name="styles.css" hash="73525c4881f2048bf59a594c61de3e09"/></dir><dir name="js"><dir name="build"><file name="jQuery.Steps.1.1.0.nupkg" hash="979939a5151179f40ab6883ea12cfbc4"/><file name="jquery.easyswitch.js" hash="9262c7cd4cd062a7b40d6e6ca65e3471"/><file name="jquery.steps-1.1.0.zip" hash="f446d606df167069be7718434b11ff55"/><file name="jquery.steps.js" hash="5a38905c075292e628c3e9453875b65d"/><file name="jquery.steps.min.js" hash="4c5e9f4e84d32b7df69af7420b355e03"/></dir><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="jquery-1.11.1.min.js" hash="8101d596b2b8fa35fe3a634ea342d7c3"/><file name="jquery-1.9.1.min.js" hash="663628f795cb62444143fde1ebdf2b5b"/><file name="jquery.cookie-1.3.1.js" hash="e5937111b7dc83385e3f4c7b91af7a80"/><file name="jquery.easyswitch.js" hash="70b67fe638e45f2b0f4ba978a4baa785"/><file name="modernizr-2.6.2.min.js" hash="42306a279a9e831515347ae319181cd1"/><file name="priceslider.js" hash="94827683d2169636ed208b023624cfb4"/></dir><dir name="less"><file name="animated.less" hash="08baef05e05301cabc91599a54921081"/><file name="bordered-pulled.less" hash="898f90e40876883214bbd121b0c20e9f"/><file name="core.less" hash="fb4efe4ae63737706875bbbfc7b7e9af"/><file name="fixed-width.less" hash="5e07ec001f8d21bd279c12ee542813f7"/><file name="font-awesome.less" hash="f53235946c37e394a6cd6d92f84587a8"/><file name="icons.less" hash="3c3bb8fbcd54a6b66a41137d5e9e8a33"/><file name="larger.less" hash="8cb65280c0f889daf72626c21a7c8628"/><file name="list.less" hash="975571323cf880a4a30601998236b027"/><file name="mixins.less" hash="fbb1f2f1ab96ba020c7f14208aac72b8"/><file name="path.less" hash="a8c41460c42a4fe9e98550f00c8b3f19"/><file name="rotated-flipped.less" hash="a8476cdc50c264abd11ff59d6a9dd025"/><file name="screen-reader.less" hash="0f881617264587bef0df6ce92253ecea"/><file name="stacked.less" hash="518e2b2d263982d2caa1e6514b4b4eac"/><file name="variables.less" hash="45fa411bbd22ff8467e027318a88a557"/></dir><file name="loader_new.jpg" hash="e02968245a670ef65a06411a442e557a"/><dir name="scss"><file name="_animated.scss" hash="39ff4f359a7b81d6585075715f41e5dc"/><file name="_bordered-pulled.scss" hash="4cad0df17bf40327feae33fa9a6c6ba2"/><file name="_core.scss" hash="ef059a98cf9de6ca5b77ee6850771cf0"/><file name="_fixed-width.scss" hash="9277ab6964a434d499873687b00be906"/><file name="_icons.scss" hash="fdffb08bc3d85c7427d8697f268fb072"/><file name="_larger.scss" hash="e95931566f6fc6ad5685c4fa9802e206"/><file name="_list.scss" hash="7107e80b053928271d5fcf422dc29490"/><file name="_mixins.scss" hash="aa2b8f32b403733713d8885f14ab86cc"/><file name="_path.scss" hash="ab5a9e8388563e097b5ce835601f01d2"/><file name="_rotated-flipped.scss" hash="9f5d4bc6fadea89328d2aac26574a9d8"/><file name="_screen-reader.scss" hash="8907bd7dbf4799e8120bda5568d76fea"/><file name="_stacked.scss" hash="5594237226aedfbca2fa1c7f4604c214"/><file name="_variables.scss" hash="783d4422626a7f27fa8f513de3ad4795"/><file name="font-awesome.scss" hash="ace7fb9336021f92b1cf68a10d5f452c"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="shell"><file name="createInstance.php" hash="86ba45df6f1067b5bacc6fce93fd9bb6"/><file name="abstracts.php" hash="e92717fb78260959ef9de93f63b80fb2"/><file name="countryLanguadge.php" hash="0f6cdd3496a6b9f4122af672044f11f2"/></dir></target></contents>
|
27 |
<compatible/>
|
28 |
+
<dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies>
|
29 |
</package>
|
shell/abstracts.php
ADDED
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magento.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magento.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Shell
|
23 |
+
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Shell scripts abstract class
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Shell
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
abstract class Mage_Shell_Abstract
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Is include Mage and initialize application
|
38 |
+
*
|
39 |
+
* @var bool
|
40 |
+
*/
|
41 |
+
protected $_includeMage = true;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Magento Root path
|
45 |
+
*
|
46 |
+
* @var string
|
47 |
+
*/
|
48 |
+
protected $_rootPath;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Initialize application with code (store, website code)
|
52 |
+
*
|
53 |
+
* @var string
|
54 |
+
*/
|
55 |
+
protected $_appCode = 'admin';
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Initialize application code type (store, website, store_group)
|
59 |
+
*
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
protected $_appType = 'store';
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Input arguments
|
66 |
+
*
|
67 |
+
* @var array
|
68 |
+
*/
|
69 |
+
protected $_args = array();
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Factory instance
|
73 |
+
*
|
74 |
+
* @var Mage_Core_Model_Factory
|
75 |
+
*/
|
76 |
+
protected $_factory;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Initialize application and parse input parameters
|
80 |
+
*
|
81 |
+
*/
|
82 |
+
public function __construct()
|
83 |
+
{
|
84 |
+
if ($this->_includeMage) {
|
85 |
+
require_once $this->_getRootPath() . 'app' . DIRECTORY_SEPARATOR . 'Mage.php';
|
86 |
+
Mage::app($this->_appCode, $this->_appType);
|
87 |
+
}
|
88 |
+
$this->_factory = new Mage_Core_Model_Factory();
|
89 |
+
|
90 |
+
$this->_applyPhpVariables();
|
91 |
+
$this->_parseArgs();
|
92 |
+
$this->_construct();
|
93 |
+
$this->_validate();
|
94 |
+
$this->_showHelp();
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Get Magento Root path (with last directory separator)
|
99 |
+
*
|
100 |
+
* @return string
|
101 |
+
*/
|
102 |
+
protected function _getRootPath()
|
103 |
+
{
|
104 |
+
if (is_null($this->_rootPath)) {
|
105 |
+
$this->_rootPath = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR;
|
106 |
+
}
|
107 |
+
return $this->_rootPath;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Parse .htaccess file and apply php settings to shell script
|
112 |
+
*
|
113 |
+
*/
|
114 |
+
protected function _applyPhpVariables()
|
115 |
+
{
|
116 |
+
$htaccess = $this->_getRootPath() . '.htaccess';
|
117 |
+
if (file_exists($htaccess)) {
|
118 |
+
// parse htaccess file
|
119 |
+
$data = file_get_contents($htaccess);
|
120 |
+
$matches = array();
|
121 |
+
preg_match_all('#^\s+?php_value\s+([a-z_]+)\s+(.+)$#siUm', $data, $matches, PREG_SET_ORDER);
|
122 |
+
if ($matches) {
|
123 |
+
foreach ($matches as $match) {
|
124 |
+
@ini_set($match[1], str_replace("\r", '', $match[2]));
|
125 |
+
}
|
126 |
+
}
|
127 |
+
preg_match_all('#^\s+?php_flag\s+([a-z_]+)\s+(.+)$#siUm', $data, $matches, PREG_SET_ORDER);
|
128 |
+
if ($matches) {
|
129 |
+
foreach ($matches as $match) {
|
130 |
+
@ini_set($match[1], str_replace("\r", '', $match[2]));
|
131 |
+
}
|
132 |
+
}
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Parse input arguments
|
138 |
+
*
|
139 |
+
* @return Mage_Shell_Abstract
|
140 |
+
*/
|
141 |
+
protected function _parseArgs()
|
142 |
+
{
|
143 |
+
$current = null;
|
144 |
+
foreach ($_SERVER['argv'] as $arg) {
|
145 |
+
$match = array();
|
146 |
+
if (preg_match('#^--([\w\d_-]{1,})$#', $arg, $match) || preg_match('#^-([\w\d_]{1,})$#', $arg, $match)) {
|
147 |
+
$current = $match[1];
|
148 |
+
$this->_args[$current] = true;
|
149 |
+
} else {
|
150 |
+
if ($current) {
|
151 |
+
$this->_args[$current] = $arg;
|
152 |
+
} else if (preg_match('#^([\w\d_]{1,})$#', $arg, $match)) {
|
153 |
+
$this->_args[$match[1]] = true;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Additional initialize instruction
|
162 |
+
*
|
163 |
+
* @return Mage_Shell_Abstract
|
164 |
+
*/
|
165 |
+
protected function _construct()
|
166 |
+
{
|
167 |
+
return $this;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Validate arguments
|
172 |
+
*
|
173 |
+
*/
|
174 |
+
protected function _validate()
|
175 |
+
{
|
176 |
+
if (isset($_SERVER['REQUEST_METHOD'])) {
|
177 |
+
// die('This script cannot be run from Browser. This is the shell script.');
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Run script
|
183 |
+
*
|
184 |
+
*/
|
185 |
+
abstract public function run();
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Check is show usage help
|
189 |
+
*
|
190 |
+
*/
|
191 |
+
protected function _showHelp()
|
192 |
+
{
|
193 |
+
if (isset($this->_args['h']) || isset($this->_args['help'])) {
|
194 |
+
die($this->usageHelp());
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Retrieve Usage Help Message
|
200 |
+
*
|
201 |
+
*/
|
202 |
+
public function usageHelp()
|
203 |
+
{
|
204 |
+
return <<<USAGE
|
205 |
+
Usage: php -f script.php -- [options]
|
206 |
+
|
207 |
+
-h Short alias for help
|
208 |
+
help This help
|
209 |
+
USAGE;
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Retrieve argument value by name or false
|
214 |
+
*
|
215 |
+
* @param string $name the argument name
|
216 |
+
* @return mixed
|
217 |
+
*/
|
218 |
+
public function getArg($name)
|
219 |
+
{
|
220 |
+
if (isset($this->_args[$name])) {
|
221 |
+
return $this->_args[$name];
|
222 |
+
}
|
223 |
+
return false;
|
224 |
+
}
|
225 |
+
}
|
shell/countryLanguadge.php
ADDED
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
/* Returns a locale from a country code that is provided.
|
5 |
+
/*
|
6 |
+
/* @param $country_code ISO 3166-2-alpha 2 country code
|
7 |
+
/* @param $language_code ISO 639-1-alpha 2 language code
|
8 |
+
/* @returns a locale, formatted like en_US, or null if not found
|
9 |
+
/**/
|
10 |
+
function country_code_to_locale($country_code, $language_code = '')
|
11 |
+
{
|
12 |
+
// Locale list taken from:
|
13 |
+
// http://stackoverflow.com/questions/3191664/
|
14 |
+
// list-of-all-locales-and-their-short-codes
|
15 |
+
$locales = array('af-ZA',
|
16 |
+
'am-ET',
|
17 |
+
'ar-AE',
|
18 |
+
'ar-BH',
|
19 |
+
'ar-DZ',
|
20 |
+
'ar-EG',
|
21 |
+
'ar-IQ',
|
22 |
+
'ar-JO',
|
23 |
+
'ar-KW',
|
24 |
+
'ar-LB',
|
25 |
+
'ar-LY',
|
26 |
+
'ar-MA',
|
27 |
+
'arn-CL',
|
28 |
+
'ar-OM',
|
29 |
+
'ar-QA',
|
30 |
+
'ar-SA',
|
31 |
+
'ar-SY',
|
32 |
+
'ar-TN',
|
33 |
+
'ar-YE',
|
34 |
+
|
35 |
+
'az-Cyrl-AZ',
|
36 |
+
'az-Latn-AZ',
|
37 |
+
'ba-RU',
|
38 |
+
'be-BY',
|
39 |
+
'bg-BG',
|
40 |
+
'bn-BD',
|
41 |
+
'bo-CN',
|
42 |
+
'br-FR',
|
43 |
+
'bs-Cyrl-BA',
|
44 |
+
'bs-Latn-BA',
|
45 |
+
'ca-ES',
|
46 |
+
'co-FR',
|
47 |
+
'cs-CZ',
|
48 |
+
'cy-GB',
|
49 |
+
'da-DK',
|
50 |
+
'de-AT',
|
51 |
+
'de-CH',
|
52 |
+
'de-DE',
|
53 |
+
'de-LI',
|
54 |
+
'de-LU',
|
55 |
+
'dsb-DE',
|
56 |
+
'dv-MV',
|
57 |
+
'el-GR',
|
58 |
+
'en-029',
|
59 |
+
'en-AU',
|
60 |
+
'en-BZ',
|
61 |
+
'en-CA',
|
62 |
+
'en-GB',
|
63 |
+
'en-IE',
|
64 |
+
'en-JM',
|
65 |
+
'en-MY',
|
66 |
+
'en-NZ',
|
67 |
+
'en-PH',
|
68 |
+
'en-SG',
|
69 |
+
'en-TT',
|
70 |
+
'en-US',
|
71 |
+
'en-ZA',
|
72 |
+
'en-ZW',
|
73 |
+
'es-AR',
|
74 |
+
'es-BO',
|
75 |
+
'es-CL',
|
76 |
+
'es-CO',
|
77 |
+
'es-CR',
|
78 |
+
'es-DO',
|
79 |
+
'es-EC',
|
80 |
+
'es-ES',
|
81 |
+
'es-GT',
|
82 |
+
'es-HN',
|
83 |
+
'es-MX',
|
84 |
+
'es-NI',
|
85 |
+
'es-PA',
|
86 |
+
'es-PE',
|
87 |
+
'es-PR',
|
88 |
+
'es-PY',
|
89 |
+
'es-SV',
|
90 |
+
'es-US',
|
91 |
+
'es-UY',
|
92 |
+
'es-VE',
|
93 |
+
'et-EE',
|
94 |
+
'eu-ES',
|
95 |
+
'fa-IR',
|
96 |
+
'fi-FI',
|
97 |
+
'fil-PH',
|
98 |
+
'fo-FO',
|
99 |
+
'fr-BE',
|
100 |
+
'fr-CA',
|
101 |
+
'fr-CH',
|
102 |
+
'fr-FR',
|
103 |
+
'fr-LU',
|
104 |
+
'fr-MC',
|
105 |
+
'fy-NL',
|
106 |
+
'ga-IE',
|
107 |
+
'gd-GB',
|
108 |
+
'gl-ES',
|
109 |
+
'gsw-FR',
|
110 |
+
'ha-Latn-NG',
|
111 |
+
'he-IL',
|
112 |
+
'hi-IN',
|
113 |
+
'hr-BA',
|
114 |
+
'hr-HR',
|
115 |
+
'hsb-DE',
|
116 |
+
'hu-HU',
|
117 |
+
'hy-AM',
|
118 |
+
'id-ID',
|
119 |
+
'ig-NG',
|
120 |
+
'ii-CN',
|
121 |
+
'is-IS',
|
122 |
+
'it-CH',
|
123 |
+
'it-IT',
|
124 |
+
'iu-Cans-CA',
|
125 |
+
'iu-Latn-CA',
|
126 |
+
'ja-JP',
|
127 |
+
'ka-GE',
|
128 |
+
'kk-KZ',
|
129 |
+
'kl-GL',
|
130 |
+
'km-KH',
|
131 |
+
'ko-KR',
|
132 |
+
'ky-KG',
|
133 |
+
'lb-LU',
|
134 |
+
'lo-LA',
|
135 |
+
'lt-LT',
|
136 |
+
'lv-LV',
|
137 |
+
'mi-NZ',
|
138 |
+
'mk-MK',
|
139 |
+
'mn-MN',
|
140 |
+
'mn-Mong-CN',
|
141 |
+
'moh-CA',
|
142 |
+
'ms-BN',
|
143 |
+
'ms-MY',
|
144 |
+
'mt-MT',
|
145 |
+
'nb-NO',
|
146 |
+
'ne-NP',
|
147 |
+
'nl-BE',
|
148 |
+
'nl-NL',
|
149 |
+
'nn-NO',
|
150 |
+
'nso-ZA',
|
151 |
+
'oc-FR',
|
152 |
+
'pl-PL',
|
153 |
+
'prs-AF',
|
154 |
+
'ps-AF',
|
155 |
+
'pt-BR',
|
156 |
+
'pt-PT',
|
157 |
+
'qut-GT',
|
158 |
+
'quz-BO',
|
159 |
+
'quz-EC',
|
160 |
+
'quz-PE',
|
161 |
+
'rm-CH',
|
162 |
+
'ro-RO',
|
163 |
+
'ru-RU',
|
164 |
+
'rw-RW',
|
165 |
+
'sah-RU',
|
166 |
+
|
167 |
+
'se-FI',
|
168 |
+
'se-NO',
|
169 |
+
'se-SE',
|
170 |
+
'si-LK',
|
171 |
+
'sk-SK',
|
172 |
+
'sl-SI',
|
173 |
+
'sma-NO',
|
174 |
+
'sma-SE',
|
175 |
+
'smj-NO',
|
176 |
+
'smj-SE',
|
177 |
+
'smn-FI',
|
178 |
+
'sms-FI',
|
179 |
+
'sq-AL',
|
180 |
+
'sr-Cyrl-BA',
|
181 |
+
'sr-Cyrl-CS',
|
182 |
+
'sr-Cyrl-ME',
|
183 |
+
'sr-Cyrl-RS',
|
184 |
+
'sr-Latn-BA',
|
185 |
+
'sr-Latn-CS',
|
186 |
+
'sr-Latn-ME',
|
187 |
+
'sr-Latn-RS',
|
188 |
+
'sv-FI',
|
189 |
+
'sv-SE',
|
190 |
+
'sw-KE',
|
191 |
+
'syr-SY',
|
192 |
+
'tg-Cyrl-TJ',
|
193 |
+
'th-TH',
|
194 |
+
'tk-TM',
|
195 |
+
'tn-ZA',
|
196 |
+
'tr-TR',
|
197 |
+
'tt-RU',
|
198 |
+
'tzm-Latn-DZ',
|
199 |
+
'ug-CN',
|
200 |
+
'uk-UA',
|
201 |
+
'ur-PK',
|
202 |
+
'uz-Cyrl-UZ',
|
203 |
+
'uz-Latn-UZ',
|
204 |
+
'vi-VN',
|
205 |
+
'wo-SN',
|
206 |
+
'xh-ZA',
|
207 |
+
'yo-NG',
|
208 |
+
'zh-CN',
|
209 |
+
'zh-HK',
|
210 |
+
'zh-MO',
|
211 |
+
'zh-SG',
|
212 |
+
'zh-TW',
|
213 |
+
'zu-ZA',);
|
214 |
+
|
215 |
+
foreach ($locales as $locale)
|
216 |
+
{
|
217 |
+
$locale_region = locale_get_region($locale);
|
218 |
+
$locale_language = locale_get_primary_language($locale);
|
219 |
+
$locale_array = array('language' => $locale_language,
|
220 |
+
'region' => $locale_region);
|
221 |
+
|
222 |
+
if (strtoupper($country_code) == $locale_region &&
|
223 |
+
$language_code == '')
|
224 |
+
{
|
225 |
+
return locale_compose($locale_array);
|
226 |
+
}
|
227 |
+
elseif (strtoupper($country_code) == $locale_region &&
|
228 |
+
strtolower($language_code) == $locale_language)
|
229 |
+
{
|
230 |
+
return locale_compose($locale_array);
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
+
return $country_code;
|
235 |
+
}
|
236 |
+
|
237 |
+
?>
|
shell/createInstance.php
CHANGED
@@ -10,17 +10,22 @@
|
|
10 |
/**
|
11 |
* send category product and all information in API
|
12 |
*/
|
|
|
13 |
require_once 'app/Mage.php';
|
14 |
-
|
15 |
-
require_once 'shell/
|
16 |
class Rodrigo_Shell_MyApi extends Mage_Shell_Abstract
|
17 |
{
|
18 |
protected $_argname = array();
|
19 |
public $prd_atr_code= Array();
|
20 |
-
|
|
|
21 |
public function __construct($wholekeyword) {
|
|
|
22 |
parent::__construct();
|
23 |
-
|
|
|
|
|
24 |
$store_creat_date='';
|
25 |
$xml = simplexml_load_file('app/etc/local.xml');
|
26 |
if(isset($xml->global->install->date)) {
|
@@ -38,25 +43,40 @@ class Rodrigo_Shell_MyApi extends Mage_Shell_Abstract
|
|
38 |
else{
|
39 |
$countries=Mage::getStoreConfig('general/country/default');
|
40 |
}
|
|
|
|
|
41 |
$category =$this->getCategoryKeywords(); // get Category keyword
|
42 |
$tips=$this->getAddTips(); // get Added Tip keyword
|
43 |
$order=$this->getOrders(); // get orders
|
44 |
$admin=$this->getAdminDetail();
|
45 |
|
46 |
//send data throuh api
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
51 |
$dim_coll= $this->setDataDimColl();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
$dimOption=$this->dimOption(); // set the prodcut option in api
|
54 |
-
|
55 |
-
$rellProductColl=$this->rellProductColl($Allprodcut); // set the prodcut category in api'
|
56 |
-
$this->rel_prod_coll($Allprodcut);
|
57 |
-
|
58 |
-
$this->rel_prod_opt($Allprodcut);
|
59 |
-
$this->nameApi();
|
60 |
// Time limit to infinity
|
61 |
|
62 |
// Get command line argument named "argname"
|
@@ -75,6 +95,7 @@ class Rodrigo_Shell_MyApi extends Mage_Shell_Abstract
|
|
75 |
// Shell script point of entry
|
76 |
public function run() {
|
77 |
|
|
|
78 |
}
|
79 |
|
80 |
// Usage instructions
|
@@ -82,7 +103,7 @@ class Rodrigo_Shell_MyApi extends Mage_Shell_Abstract
|
|
82 |
{
|
83 |
|
84 |
return <<<USAGE
|
85 |
-
Usage: php -f
|
86 |
|
87 |
--argname <argvalue> Argument description
|
88 |
|
@@ -98,8 +119,22 @@ USAGE;
|
|
98 |
/*************************************/
|
99 |
public function getTotalorders(){
|
100 |
|
101 |
-
$
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
}
|
105 |
/*************************************/
|
@@ -317,8 +352,8 @@ $stores =array();
|
|
317 |
$all_store =implode(" ",$stores);
|
318 |
$ch = curl_init();
|
319 |
$info['id']='';
|
320 |
-
$info['clientId']=md5(Mage::getBaseUrl
|
321 |
-
|
322 |
$info['name_ascii']='';
|
323 |
$info['info_type']='';
|
324 |
$info['owner']=$admin->getUser()->getFirstname() .' '.$admin->getUser()->getLastname();
|
@@ -345,17 +380,19 @@ $stores =array();
|
|
345 |
$info['longitude']='';
|
346 |
|
347 |
$info['iana_timezone']=Mage::getStoreConfig('general/locale/timezone');
|
348 |
-
|
349 |
$info['gender']='';
|
350 |
$info['device']='';
|
351 |
|
352 |
$info['age']='';
|
353 |
-
|
|
|
354 |
$info['created_at']=$created;
|
355 |
-
|
356 |
|
357 |
|
358 |
$params= array('info'=>json_encode($info));
|
|
|
359 |
// set url
|
360 |
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_info");
|
361 |
|
@@ -398,8 +435,8 @@ public function setDataDimColl(){
|
|
398 |
|
399 |
array_push($treeacat_id,$Cat_Tree->getId());
|
400 |
$dim_colls[$i]['id'] ='';
|
401 |
-
$dim_colls[$i]['clientId']=md5(Mage::getBaseUrl
|
402 |
-
$
|
403 |
$dim_colls[$i]['collId']= $Cat_Tree->getId();
|
404 |
$dim_colls[$i]['coll_name']=$Cat_Tree->getName();
|
405 |
$dim_colls[$i]['published']= $Cat_Tree->getIsActive();
|
@@ -410,9 +447,9 @@ public function setDataDimColl(){
|
|
410 |
}
|
411 |
}
|
412 |
// api six, seven ,eight, nine
|
413 |
-
$params= array('
|
414 |
$ch = curl_init();
|
415 |
-
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/
|
416 |
//return the transfer as a string
|
417 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
418 |
curl_setopt($ch, CURLOPT_POST, true);
|
@@ -436,7 +473,7 @@ public function setDataDimColl(){
|
|
436 |
$j=0;
|
437 |
foreach ($all_cat as $category_first_level){
|
438 |
$dim_coll[$j]['id']='';
|
439 |
-
$dim_coll[$j]['clientId']=md5(Mage::getBaseUrl
|
440 |
$dim_coll[$j]['coll_level'] ='1';
|
441 |
$dim_coll[$j]['collId']= $category_first_level->getId();
|
442 |
$dim_coll[$j]['product_ids']= $this->getProductIds($category_first_level->getId());
|
@@ -451,9 +488,9 @@ public function setDataDimColl(){
|
|
451 |
} // end foreach
|
452 |
} // end if
|
453 |
|
454 |
-
$params= array('
|
455 |
// fifth Api For dim Collection
|
456 |
-
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/
|
457 |
//return the transfer as a string
|
458 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
459 |
curl_setopt($ch, CURLOPT_POST, true);
|
@@ -488,7 +525,7 @@ public function dimOption(){
|
|
488 |
array_push($this->prd_atr_code, $prdAtr->getAttributecode());
|
489 |
foreach($attributeValue as $option){
|
490 |
$dimProduct[$i]['id']='';
|
491 |
-
$dimProduct[$i]['clientId']=md5(Mage::getBaseUrl
|
492 |
$dimProduct[$i]['optId']=$option['value'];
|
493 |
$dimProduct[$i]['opt_name']=$option['label'];
|
494 |
$dimProduct[$i]['opt_url']='';
|
@@ -496,9 +533,9 @@ public function dimOption(){
|
|
496 |
$i++;
|
497 |
|
498 |
}
|
499 |
-
$params= array('
|
500 |
$ch = curl_init();
|
501 |
-
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/
|
502 |
//return the transfer as a string
|
503 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
504 |
curl_setopt($ch, CURLOPT_POST, true);
|
@@ -534,9 +571,13 @@ public function dimOption(){
|
|
534 |
public function rellProductColl($Allprodcut){
|
535 |
$ch = curl_init();
|
536 |
$i=0;
|
|
|
537 |
foreach ($Allprodcut as $product) {
|
|
|
|
|
|
|
538 |
$dim_prod[$i]['id']='';
|
539 |
-
$dim_prod[$i]['clientId']=md5(Mage::getBaseUrl
|
540 |
$dim_prod[$i]['prodId']=$product->getId();
|
541 |
$dim_prod[$i]['prod_name']=$product->getName();
|
542 |
$dim_prod[$i]['prod_url']=$product->getProductUrl();
|
@@ -550,12 +591,15 @@ public function rellProductColl($Allprodcut){
|
|
550 |
$dim_prod[$i]['updated']=$product->getUpdatedAt();
|
551 |
$dim_prod[$i]['main_image']=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' .$product->getImage();
|
552 |
$dim_prod[$i]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
|
|
553 |
$i++;
|
554 |
-
|
555 |
}
|
556 |
-
|
557 |
$params= array('dim_prod'=>json_encode($dim_prod));
|
558 |
-
|
|
|
|
|
559 |
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_dim_prod");
|
560 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
561 |
curl_setopt($ch, CURLOPT_POST, true);
|
@@ -584,7 +628,7 @@ public function rel_prod_coll($Allprodcut){
|
|
584 |
$coll_id=1;
|
585 |
foreach ($rellAtionPro->getCategoryIds() as $rellCatIds){
|
586 |
$rel_prod_coll[$i]['id']='';
|
587 |
-
$rel_prod_coll[$i]['clientId']=md5(Mage::getBaseUrl
|
588 |
$rel_prod_coll[$i]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
589 |
$rel_prod_coll[$i]['prodId']=$rellAtionPro->getId();
|
590 |
$rel_prod_coll[$i]['coll'.$coll_id.'Id']=$this->getRelationalCat($rellCatIds);
|
@@ -620,23 +664,48 @@ public function rel_prod_coll($Allprodcut){
|
|
620 |
public function rel_prod_opt($Allprodcut){
|
621 |
if(count($Allprodcut) >0){ // prodcut option
|
622 |
$k=0;
|
|
|
623 |
foreach($Allprodcut as $rellAttrProdcut){
|
|
|
|
|
|
|
624 |
$rellProAtr =$this->getProductAtribute($rellAttrProdcut->getId());
|
625 |
if(count($rellProAtr) >0){
|
626 |
$attrCol=1;
|
627 |
foreach($rellProAtr as $atrFetch){
|
628 |
$rel_prod_opt[$k]['id']='';
|
629 |
-
$rel_prod_opt[$k]['clientId']=md5(Mage::getBaseUrl
|
630 |
$rel_prod_opt[$k]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
631 |
$rel_prod_opt[$k]['prodId']=$rellAttrProdcut->getId();
|
632 |
$rel_prod_opt[$k]['opt'.$attrCol.'Id']=$atrFetch['value'];
|
633 |
$attrCol++;
|
634 |
|
635 |
}// end foreach
|
636 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
637 |
$k++;
|
638 |
|
639 |
-
}
|
|
|
640 |
} //end prodcut option
|
641 |
|
642 |
$rell_pro_opt= array('rel_prod_opt'=>json_encode(array_values($rel_prod_opt)));
|
@@ -663,7 +732,7 @@ public function rel_prod_opt($Allprodcut){
|
|
663 |
public function nameApi(){
|
664 |
$m=0;
|
665 |
$rel_prod_name[0]['Id']='';
|
666 |
-
$rel_prod_name[0]['clientId']=md5(Mage::getBaseUrl
|
667 |
|
668 |
for($i=1; $i<6; $i++){
|
669 |
$rel_prod_name[0]['coll'.$i.'_id']='';
|
@@ -699,7 +768,7 @@ public function ad_tips(){
|
|
699 |
$j=0;
|
700 |
foreach($this->getAddTips() As $tips){
|
701 |
$ad_tip[$j]['id']='';
|
702 |
-
$ad_tip[$j]['clientId']=md5(Mage::getBaseUrl
|
703 |
$ad_tip[$j]['tip']=$tips->getKeywordTitle();
|
704 |
$ad_tip[$j]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
705 |
$j++;
|
@@ -725,7 +794,7 @@ foreach($this->getAddTips() As $tips){
|
|
725 |
public function keywords(){
|
726 |
$i=0;
|
727 |
foreach($this->getCategoryKeywords() as $kewwords){
|
728 |
-
$EcommerceKeyword[$i]['clientId']=md5(Mage::getBaseUrl
|
729 |
$EcommerceKeyword[$i]['id']='';
|
730 |
$EcommerceKeyword[$i]['keyword']=$kewwords->getKeywordTitle();
|
731 |
$EcommerceKeyword[$i]['monthly_searches']='';
|
@@ -755,7 +824,7 @@ public function orderApi(){
|
|
755 |
$k=0;
|
756 |
foreach($this->getOrders() as $orders){
|
757 |
$Order[$k]['id']='';
|
758 |
-
$Order[$k]['clientId']=md5(Mage::getBaseUrl
|
759 |
$Order[$k]['productId']=$orders->getEntityId();
|
760 |
$Order[$k]['order_date']=$orders->getCreatedAt();
|
761 |
$Order[$k]['order_quantity']=$orders->getTotalQtyOrdered();
|
@@ -775,5 +844,91 @@ public function orderApi(){
|
|
775 |
curl_close($ch);
|
776 |
$json_a =json_decode($output,true);
|
777 |
|
778 |
-
}
|
779 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* send category product and all information in API
|
12 |
*/
|
13 |
+
|
14 |
require_once 'app/Mage.php';
|
15 |
+
require_once 'countryLanguadge.php';
|
16 |
+
require_once 'shell/abstracts.php';
|
17 |
class Rodrigo_Shell_MyApi extends Mage_Shell_Abstract
|
18 |
{
|
19 |
protected $_argname = array();
|
20 |
public $prd_atr_code= Array();
|
21 |
+
const check_finish_process_time ='http://manager.cleverppc.com/api/ecommerce/v1/check_finish_process_time';
|
22 |
+
const create_ecommerce_country ='http://manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_country';
|
23 |
public function __construct($wholekeyword) {
|
24 |
+
|
25 |
parent::__construct();
|
26 |
+
|
27 |
+
$this->setSteps();
|
28 |
+
$stat_time_api=$this->stat_time_api();
|
29 |
$store_creat_date='';
|
30 |
$xml = simplexml_load_file('app/etc/local.xml');
|
31 |
if(isset($xml->global->install->date)) {
|
43 |
else{
|
44 |
$countries=Mage::getStoreConfig('general/country/default');
|
45 |
}
|
46 |
+
$count=$this->sendCountry($countries);
|
47 |
+
|
48 |
$category =$this->getCategoryKeywords(); // get Category keyword
|
49 |
$tips=$this->getAddTips(); // get Added Tip keyword
|
50 |
$order=$this->getOrders(); // get orders
|
51 |
$admin=$this->getAdminDetail();
|
52 |
|
53 |
//send data throuh api
|
54 |
+
$setFirstData= $this->setDataInFirstApi($Allcategory,$order,$admin,$tips,$category,$budget,$countries,$store_creat_date);
|
55 |
+
|
56 |
+
$rellProductColl=$this->rellProductColl($Allprodcut); // set the prodcut category in api'
|
57 |
+
$this->ad_tips();
|
58 |
+
$this->keywords();
|
59 |
+
$this->orderApi();
|
60 |
+
|
61 |
$dim_coll= $this->setDataDimColl();
|
62 |
+
|
63 |
+
$dimOption=$this->dimOption(); // set the prodcut option in api
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
// $this->rel_prod_coll($Allprodcut);
|
68 |
+
|
69 |
+
$this->rel_prod_opt($Allprodcut);
|
70 |
+
|
71 |
+
$this->nameApi();
|
72 |
+
$this->saveStaus();
|
73 |
+
//$this->setSteps();
|
74 |
+
$this->end_time_api();
|
75 |
+
|
76 |
+
|
77 |
+
|
78 |
+
set_time_limit(0);
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
// Time limit to infinity
|
81 |
|
82 |
// Get command line argument named "argname"
|
95 |
// Shell script point of entry
|
96 |
public function run() {
|
97 |
|
98 |
+
|
99 |
}
|
100 |
|
101 |
// Usage instructions
|
103 |
{
|
104 |
|
105 |
return <<<USAGE
|
106 |
+
Usage: php -f createInstance.php -- [options]
|
107 |
|
108 |
--argname <argvalue> Argument description
|
109 |
|
119 |
/*************************************/
|
120 |
public function getTotalorders(){
|
121 |
|
122 |
+
$time = time();
|
123 |
+
$to = date('Y-m-d H:i:s', $time);
|
124 |
+
$lastTime = $time - 86400; // 60*60*24*30
|
125 |
+
$from = date('Y-m-d H:i:s', $lastTime);
|
126 |
+
$order_items = Mage::getResourceModel('sales/order_item_collection')
|
127 |
+
->addAttributeToSelect('order_id')
|
128 |
+
->addAttributeToSelect('created_at')
|
129 |
+
->addFieldToFilter('created_at', array(
|
130 |
+
'from' => strtotime('-30 day', time()),
|
131 |
+
'to' => time(),
|
132 |
+
'datetime' => true
|
133 |
+
))
|
134 |
+
->load();
|
135 |
+
return count($order_items);
|
136 |
+
|
137 |
+
|
138 |
|
139 |
}
|
140 |
/*************************************/
|
352 |
$all_store =implode(" ",$stores);
|
353 |
$ch = curl_init();
|
354 |
$info['id']='';
|
355 |
+
$info['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
356 |
+
//$info['store_name']= rtrim($all_store, ",");
|
357 |
$info['name_ascii']='';
|
358 |
$info['info_type']='';
|
359 |
$info['owner']=$admin->getUser()->getFirstname() .' '.$admin->getUser()->getLastname();
|
380 |
$info['longitude']='';
|
381 |
|
382 |
$info['iana_timezone']=Mage::getStoreConfig('general/locale/timezone');
|
383 |
+
// $info['logo_url']=Mage::getStoreConfig('design/header/logo_src');
|
384 |
$info['gender']='';
|
385 |
$info['device']='';
|
386 |
|
387 |
$info['age']='';
|
388 |
+
|
389 |
+
$info['platform']='Magento';
|
390 |
$info['created_at']=$created;
|
391 |
+
//$info['installed_at']=$created;
|
392 |
|
393 |
|
394 |
$params= array('info'=>json_encode($info));
|
395 |
+
print_r($params);
|
396 |
// set url
|
397 |
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_info");
|
398 |
|
435 |
|
436 |
array_push($treeacat_id,$Cat_Tree->getId());
|
437 |
$dim_colls[$i]['id'] ='';
|
438 |
+
$dim_colls[$i]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
439 |
+
$dim_colls[$i]['product_ids']=$this->getProductIds($Cat_Tree->getId());
|
440 |
$dim_colls[$i]['collId']= $Cat_Tree->getId();
|
441 |
$dim_colls[$i]['coll_name']=$Cat_Tree->getName();
|
442 |
$dim_colls[$i]['published']= $Cat_Tree->getIsActive();
|
447 |
}
|
448 |
}
|
449 |
// api six, seven ,eight, nine
|
450 |
+
$params= array('dim_coll'.$catLevel=>json_encode($dim_colls));
|
451 |
$ch = curl_init();
|
452 |
+
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_dim_coll".$catLevel);
|
453 |
//return the transfer as a string
|
454 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
455 |
curl_setopt($ch, CURLOPT_POST, true);
|
473 |
$j=0;
|
474 |
foreach ($all_cat as $category_first_level){
|
475 |
$dim_coll[$j]['id']='';
|
476 |
+
$dim_coll[$j]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
477 |
$dim_coll[$j]['coll_level'] ='1';
|
478 |
$dim_coll[$j]['collId']= $category_first_level->getId();
|
479 |
$dim_coll[$j]['product_ids']= $this->getProductIds($category_first_level->getId());
|
488 |
} // end foreach
|
489 |
} // end if
|
490 |
|
491 |
+
$params= array('dim_coll1'=>json_encode($dim_coll));
|
492 |
// fifth Api For dim Collection
|
493 |
+
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_dim_coll1");
|
494 |
//return the transfer as a string
|
495 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
496 |
curl_setopt($ch, CURLOPT_POST, true);
|
525 |
array_push($this->prd_atr_code, $prdAtr->getAttributecode());
|
526 |
foreach($attributeValue as $option){
|
527 |
$dimProduct[$i]['id']='';
|
528 |
+
$dimProduct[$i]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
529 |
$dimProduct[$i]['optId']=$option['value'];
|
530 |
$dimProduct[$i]['opt_name']=$option['label'];
|
531 |
$dimProduct[$i]['opt_url']='';
|
533 |
$i++;
|
534 |
|
535 |
}
|
536 |
+
$params= array('dim_opt'.$count=>json_encode($dimProduct));
|
537 |
$ch = curl_init();
|
538 |
+
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_dim_opt".$count);
|
539 |
//return the transfer as a string
|
540 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
541 |
curl_setopt($ch, CURLOPT_POST, true);
|
571 |
public function rellProductColl($Allprodcut){
|
572 |
$ch = curl_init();
|
573 |
$i=0;
|
574 |
+
$prd_name=array();
|
575 |
foreach ($Allprodcut as $product) {
|
576 |
+
|
577 |
+
|
578 |
+
if (!in_array($product->getName(), $prd_name)) {
|
579 |
$dim_prod[$i]['id']='';
|
580 |
+
$dim_prod[$i]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
581 |
$dim_prod[$i]['prodId']=$product->getId();
|
582 |
$dim_prod[$i]['prod_name']=$product->getName();
|
583 |
$dim_prod[$i]['prod_url']=$product->getProductUrl();
|
591 |
$dim_prod[$i]['updated']=$product->getUpdatedAt();
|
592 |
$dim_prod[$i]['main_image']=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' .$product->getImage();
|
593 |
$dim_prod[$i]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
594 |
+
array_push($prd_name,$product->getName());
|
595 |
$i++;
|
596 |
+
}
|
597 |
}
|
598 |
+
|
599 |
$params= array('dim_prod'=>json_encode($dim_prod));
|
600 |
+
|
601 |
+
|
602 |
+
|
603 |
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_dim_prod");
|
604 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
605 |
curl_setopt($ch, CURLOPT_POST, true);
|
628 |
$coll_id=1;
|
629 |
foreach ($rellAtionPro->getCategoryIds() as $rellCatIds){
|
630 |
$rel_prod_coll[$i]['id']='';
|
631 |
+
$rel_prod_coll[$i]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
632 |
$rel_prod_coll[$i]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
633 |
$rel_prod_coll[$i]['prodId']=$rellAtionPro->getId();
|
634 |
$rel_prod_coll[$i]['coll'.$coll_id.'Id']=$this->getRelationalCat($rellCatIds);
|
664 |
public function rel_prod_opt($Allprodcut){
|
665 |
if(count($Allprodcut) >0){ // prodcut option
|
666 |
$k=0;
|
667 |
+
$prdt_name=array();
|
668 |
foreach($Allprodcut as $rellAttrProdcut){
|
669 |
+
if (!in_array($rellAttrProdcut->getName(), $prdt_name)) {
|
670 |
+
|
671 |
+
|
672 |
$rellProAtr =$this->getProductAtribute($rellAttrProdcut->getId());
|
673 |
if(count($rellProAtr) >0){
|
674 |
$attrCol=1;
|
675 |
foreach($rellProAtr as $atrFetch){
|
676 |
$rel_prod_opt[$k]['id']='';
|
677 |
+
$rel_prod_opt[$k]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
678 |
$rel_prod_opt[$k]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
679 |
$rel_prod_opt[$k]['prodId']=$rellAttrProdcut->getId();
|
680 |
$rel_prod_opt[$k]['opt'.$attrCol.'Id']=$atrFetch['value'];
|
681 |
$attrCol++;
|
682 |
|
683 |
}// end foreach
|
684 |
+
}
|
685 |
+
|
686 |
+
}else{
|
687 |
+
|
688 |
+
$rellProAtr =$this->getProductAtribute($rellAttrProdcut->getId());
|
689 |
+
if(count($rellProAtr) >0){
|
690 |
+
$attrCol=1;
|
691 |
+
foreach($rellProAtr as $atrFetch){
|
692 |
+
$rel_prod_opt[$k]['id']='';
|
693 |
+
$rel_prod_opt[$k]['clientId']=md5(Mage::getBaseUrl (Mage_Core_Model_Store::URL_TYPE_WEB));
|
694 |
+
$rel_prod_opt[$k]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
695 |
+
$rel_prod_opt[$k]['prodId']= end($prdt_name);
|
696 |
+
$rel_prod_opt[$k]['opt'.$attrCol.'Id']=$atrFetch['value'];
|
697 |
+
$attrCol++;
|
698 |
+
|
699 |
+
}// end foreach
|
700 |
+
}
|
701 |
+
|
702 |
+
}
|
703 |
+
array_push($prdt_name,$rellAttrProdcut->getName(),$rellAttrProdcut->getId());
|
704 |
+
// end foreach
|
705 |
$k++;
|
706 |
|
707 |
+
}
|
708 |
+
|
709 |
} //end prodcut option
|
710 |
|
711 |
$rell_pro_opt= array('rel_prod_opt'=>json_encode(array_values($rel_prod_opt)));
|
732 |
public function nameApi(){
|
733 |
$m=0;
|
734 |
$rel_prod_name[0]['Id']='';
|
735 |
+
$rel_prod_name[0]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
736 |
|
737 |
for($i=1; $i<6; $i++){
|
738 |
$rel_prod_name[0]['coll'.$i.'_id']='';
|
768 |
$j=0;
|
769 |
foreach($this->getAddTips() As $tips){
|
770 |
$ad_tip[$j]['id']='';
|
771 |
+
$ad_tip[$j]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
772 |
$ad_tip[$j]['tip']=$tips->getKeywordTitle();
|
773 |
$ad_tip[$j]['lang']=Mage::app()->getLocale()->getLocaleCode();
|
774 |
$j++;
|
794 |
public function keywords(){
|
795 |
$i=0;
|
796 |
foreach($this->getCategoryKeywords() as $kewwords){
|
797 |
+
$EcommerceKeyword[$i]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
798 |
$EcommerceKeyword[$i]['id']='';
|
799 |
$EcommerceKeyword[$i]['keyword']=$kewwords->getKeywordTitle();
|
800 |
$EcommerceKeyword[$i]['monthly_searches']='';
|
824 |
$k=0;
|
825 |
foreach($this->getOrders() as $orders){
|
826 |
$Order[$k]['id']='';
|
827 |
+
$Order[$k]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
828 |
$Order[$k]['productId']=$orders->getEntityId();
|
829 |
$Order[$k]['order_date']=$orders->getCreatedAt();
|
830 |
$Order[$k]['order_quantity']=$orders->getTotalQtyOrdered();
|
844 |
curl_close($ch);
|
845 |
$json_a =json_decode($output,true);
|
846 |
|
847 |
+
}
|
848 |
+
public function saveStaus(){
|
849 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
850 |
+
$collection->addFieldToFilter('keyword_title','complete');
|
851 |
+
if(count($collection)>0){
|
852 |
+
$res= Mage::getModel('munoz/keyword')->load('complete','keyword_title');
|
853 |
+
$res->setKeywordTitle('complete');
|
854 |
+
|
855 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
856 |
+
}
|
857 |
+
else{
|
858 |
+
$res =Mage::getModel('munoz/keyword');
|
859 |
+
$res->setKeywordTitle('complete');
|
860 |
+
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
861 |
+
}
|
862 |
+
try
|
863 |
+
{
|
864 |
+
$result = $res->save();
|
865 |
+
}
|
866 |
+
catch(Exception $e)
|
867 |
+
{
|
868 |
+
$error=$e;
|
869 |
+
}
|
870 |
+
}
|
871 |
+
public function setSteps(){
|
872 |
+
$cleint_id=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
873 |
+
$url="http://manager.cleverppc.com/api/ecommerce/v1/last_step_status?client_token=".$cleint_id."&last_step=5&waiting=1";
|
874 |
+
$data = file_get_contents($url);
|
875 |
+
$json_a=json_decode($data,true);
|
876 |
+
|
877 |
+
// print_r($json_a);
|
878 |
+
}
|
879 |
+
|
880 |
+
public function stat_time_api(){
|
881 |
+
$cleint_id=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
882 |
+
$url=self::check_finish_process_time."?client_token=".$cleint_id."&start=1";
|
883 |
+
$data = file_get_contents($url);
|
884 |
+
$json_a=json_decode($data,true);
|
885 |
+
|
886 |
+
}
|
887 |
+
|
888 |
+
|
889 |
+
public function sendCountry($country_code){
|
890 |
+
$selected_country = explode(",", $country_code);
|
891 |
+
$i=0;
|
892 |
+
foreach($selected_country as $countries){
|
893 |
+
$countryName = Mage::getModel('directory/country')->loadByCode($countries)->getName();
|
894 |
+
$country[$i]['id']='';
|
895 |
+
$country[$i]['clientId']=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
896 |
+
$country[$i]['ctry_iso_2']=country_code_to_locale($countries);
|
897 |
+
$country[$i]['ctry_name']= $countryName;
|
898 |
+
$country[$i]['ctry_GgId']='';
|
899 |
+
|
900 |
+
$i++;
|
901 |
+
}
|
902 |
+
|
903 |
+
// api six, seven ,eight, nine
|
904 |
+
$params= array('country'.$catLevel=>json_encode($country));
|
905 |
+
$ch = curl_init();
|
906 |
+
curl_setopt($ch, CURLOPT_URL,self::create_ecommerce_country);
|
907 |
+
//return the transfer as a string
|
908 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
909 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
910 |
+
// curl_setopt($ch, CURLOPT_HTTPGET, 1);
|
911 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
912 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
|
913 |
+
curl_setopt($ch,CURLOPT_TIMEOUT,400);
|
914 |
+
$output = curl_exec($ch);
|
915 |
+
curl_close($ch);
|
916 |
+
$json_a =json_decode($output,true);
|
917 |
+
|
918 |
+
|
919 |
+
|
920 |
+
}
|
921 |
+
|
922 |
+
public function end_time_api(){
|
923 |
+
$cleint_id=md5(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
924 |
+
$url=self::check_finish_process_time."?client_token=".$cleint_id."&stop=1";
|
925 |
+
$data = file_get_contents($url);
|
926 |
+
$json_a=json_decode($data,true);
|
927 |
+
|
928 |
+
}
|
929 |
+
|
930 |
+
|
931 |
+
}
|
932 |
+
$wholekeyword=$this->getRequest()->getParams();
|
933 |
+
$shell = new Rodrigo_Shell_MyApi($wholekeyword);
|
934 |
+
$shell->run();
|
skin/adminhtml/default/default/munoz/css/jquery-ui.css
CHANGED
@@ -618,8 +618,8 @@ button.ui-button::-moz-focus-inner {
|
|
618 |
.ui-slider .ui-slider-handle {
|
619 |
position: absolute;
|
620 |
z-index: 2;
|
621 |
-
width:
|
622 |
-
height:
|
623 |
cursor: default;
|
624 |
}
|
625 |
.ui-slider .ui-slider-range {
|
@@ -638,10 +638,10 @@ button.ui-button::-moz-focus-inner {
|
|
638 |
}
|
639 |
|
640 |
.ui-slider-horizontal {
|
641 |
-
height:
|
642 |
}
|
643 |
.ui-slider-horizontal .ui-slider-handle {
|
644 |
-
top
|
645 |
margin-left: -.6em;
|
646 |
}
|
647 |
.ui-slider-horizontal .ui-slider-range {
|
@@ -800,7 +800,7 @@ body .ui-tooltip {
|
|
800 |
font-size: 1em;
|
801 |
}
|
802 |
.ui-widget-content {
|
803 |
-
border:
|
804 |
background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
|
805 |
color: #222222;
|
806 |
}
|
@@ -823,7 +823,7 @@ body .ui-tooltip {
|
|
823 |
.ui-widget-content .ui-state-default,
|
824 |
.ui-widget-header .ui-state-default {
|
825 |
border: 1px solid #d3d3d3;
|
826 |
-
background: #e6e6e6 url(
|
827 |
font-weight: normal;
|
828 |
color: #555555;
|
829 |
}
|
@@ -839,8 +839,8 @@ body .ui-tooltip {
|
|
839 |
.ui-state-focus,
|
840 |
.ui-widget-content .ui-state-focus,
|
841 |
.ui-widget-header .ui-state-focus {
|
842 |
-
border: 1px solid #
|
843 |
-
background: #
|
844 |
font-weight: normal;
|
845 |
color: #212121;
|
846 |
}
|
@@ -854,8 +854,8 @@ body .ui-tooltip {
|
|
854 |
.ui-state-active,
|
855 |
.ui-widget-content .ui-state-active,
|
856 |
.ui-widget-header .ui-state-active {
|
857 |
-
border: 1px solid #
|
858 |
-
background: #
|
859 |
font-weight: normal;
|
860 |
color: #212121;
|
861 |
}
|
618 |
.ui-slider .ui-slider-handle {
|
619 |
position: absolute;
|
620 |
z-index: 2;
|
621 |
+
width: 29px;
|
622 |
+
height: 24px;
|
623 |
cursor: default;
|
624 |
}
|
625 |
.ui-slider .ui-slider-range {
|
638 |
}
|
639 |
|
640 |
.ui-slider-horizontal {
|
641 |
+
height: 15px;
|
642 |
}
|
643 |
.ui-slider-horizontal .ui-slider-handle {
|
644 |
+
top:-7px;
|
645 |
margin-left: -.6em;
|
646 |
}
|
647 |
.ui-slider-horizontal .ui-slider-range {
|
800 |
font-size: 1em;
|
801 |
}
|
802 |
.ui-widget-content {
|
803 |
+
border:1px solid #d3d3d3;
|
804 |
background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
|
805 |
color: #222222;
|
806 |
}
|
823 |
.ui-widget-content .ui-state-default,
|
824 |
.ui-widget-header .ui-state-default {
|
825 |
border: 1px solid #d3d3d3;
|
826 |
+
background: #e6e6e6 url(progress-bar.png) 50% 50% repeat-x;
|
827 |
font-weight: normal;
|
828 |
color: #555555;
|
829 |
}
|
839 |
.ui-state-focus,
|
840 |
.ui-widget-content .ui-state-focus,
|
841 |
.ui-widget-header .ui-state-focus {
|
842 |
+
border: 1px solid #d3d3d3;
|
843 |
+
background: #e6e6e6 url(progress-bar.png) 50% 50% repeat-x;
|
844 |
font-weight: normal;
|
845 |
color: #212121;
|
846 |
}
|
854 |
.ui-state-active,
|
855 |
.ui-widget-content .ui-state-active,
|
856 |
.ui-widget-header .ui-state-active {
|
857 |
+
border: 1px solid #d3d3d3;
|
858 |
+
background: #e6e6e6 url(progress-bar.png) 50% 50% repeat-x;
|
859 |
font-weight: normal;
|
860 |
color: #212121;
|
861 |
}
|
skin/adminhtml/default/default/munoz/css/progress-bar.png
ADDED
Binary file
|
skin/adminhtml/default/default/munoz/css/simple_container_bg.gif
ADDED
Binary file
|
skin/adminhtml/default/default/munoz/css/styles.css
CHANGED
@@ -336,15 +336,17 @@ padding :10px 5px 2px 3px;
|
|
336 |
height: 2em;
|
337 |
margin:1em 0 0.2em;
|
338 |
color:#fff;
|
339 |
-
background: none repeat scroll 0 0 #
|
|
|
340 |
}
|
341 |
.finish:hover{
|
342 |
-
background: none repeat scroll 0 0 #
|
343 |
color: #fff;
|
344 |
font-size: 1.8em;
|
345 |
height: 2em;
|
346 |
margin: 1em 0 0.2em;
|
347 |
padding: 0 2em;
|
|
|
348 |
}
|
349 |
.step_5_slider{
|
350 |
background:#8BC34A;margin-top: 1em;
|
@@ -704,7 +706,7 @@ sup#amount, #amount > span {
|
|
704 |
width: 200px;
|
705 |
}
|
706 |
#slider-range {
|
707 |
-
margin:
|
708 |
}
|
709 |
#wizard-p-4 .ui-slider-horizontal {
|
710 |
height: 20px;
|
@@ -780,6 +782,8 @@ label {
|
|
780 |
font-size: 13px;
|
781 |
padding-left: 40px !important;
|
782 |
padding-top: 4px;
|
|
|
|
|
783 |
}
|
784 |
.wizard > .content > .body label {
|
785 |
display: inline-block;
|
@@ -958,4 +962,253 @@ label {
|
|
958 |
height: 18px;
|
959 |
width: 18px;
|
960 |
}
|
961 |
-
.waiting_page-content{font-size: 2em}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
height: 2em;
|
337 |
margin:1em 0 0.2em;
|
338 |
color:#fff;
|
339 |
+
background: none repeat scroll 0 0 #0f9e59;
|
340 |
+
border-radius: 3px;
|
341 |
}
|
342 |
.finish:hover{
|
343 |
+
background: none repeat scroll 0 0 #0f9e59;
|
344 |
color: #fff;
|
345 |
font-size: 1.8em;
|
346 |
height: 2em;
|
347 |
margin: 1em 0 0.2em;
|
348 |
padding: 0 2em;
|
349 |
+
border-radius: 3px;
|
350 |
}
|
351 |
.step_5_slider{
|
352 |
background:#8BC34A;margin-top: 1em;
|
706 |
width: 200px;
|
707 |
}
|
708 |
#slider-range {
|
709 |
+
margin: 3% 0;
|
710 |
}
|
711 |
#wizard-p-4 .ui-slider-horizontal {
|
712 |
height: 20px;
|
782 |
font-size: 13px;
|
783 |
padding-left: 40px !important;
|
784 |
padding-top: 4px;
|
785 |
+
color: #000;
|
786 |
+
font-weight: 800;
|
787 |
}
|
788 |
.wizard > .content > .body label {
|
789 |
display: inline-block;
|
962 |
height: 18px;
|
963 |
width: 18px;
|
964 |
}
|
965 |
+
.waiting_page-content{font-size: 2em}
|
966 |
+
.section-cell {
|
967 |
+
border-radius: 5px;
|
968 |
+
text-align: center;
|
969 |
+
/*float: left;
|
970 |
+
width: 27%;
|
971 |
+
margin: 1% 3.1% 0;*/
|
972 |
+
background: #ffffff;
|
973 |
+
position: relative;
|
974 |
+
}
|
975 |
+
.section-cell h4{font-size: 1em;margin: 5px;}
|
976 |
+
.clever_campaigns{font-size: 1.5em;}
|
977 |
+
.clever_campaigns .section-row{margin: 1% 5%;}
|
978 |
+
.clever-data-section{background-color: cornflowerblue;color: white; min-height: 150px}
|
979 |
+
.sparkline{width:100%}
|
980 |
+
.clever-data-section-2{background-color: grey;color: white; min-height: 150px}
|
981 |
+
.clever-data-section3{background-color: green;color: white; min-height: 150px}
|
982 |
+
.section-cell h4{font-size: 1.4em; margin-top: 10px;}
|
983 |
+
.section-row{min-height:111px}
|
984 |
+
.dashboard-section{background: #efefef; min-height: 649px}
|
985 |
+
.dashboard-section h2{ font-size: 14px;
|
986 |
+
margin-left: 3%;
|
987 |
+
}
|
988 |
+
.pricesilder-right {margin-top:50px; float: right; width: 75%;}
|
989 |
+
.pricer-slider .ui-widget-content{background: #ffffff; width: 99%;}
|
990 |
+
.middile-cell-section h4,h1{
|
991 |
+
margin: 10px;
|
992 |
+
color: #ffffff;
|
993 |
+
}
|
994 |
+
.middile-cell-section h1{
|
995 |
+
margin: 10px;
|
996 |
+
color: #ffffff;
|
997 |
+
font-size:32px;
|
998 |
+
}
|
999 |
+
.sparkline hr{width: 95%; margin-top: 56px; margin-left:11px;}
|
1000 |
+
|
1001 |
+
/* switch button css */
|
1002 |
+
.dashboard-section table{width:100%;padding: 0% 3%}
|
1003 |
+
.dashboard-section table td{width:33%;}
|
1004 |
+
.pricesilder-right .slider-text{text-align: center}
|
1005 |
+
.easyswitch {
|
1006 |
+
width: 90px;
|
1007 |
+
height: 30px;
|
1008 |
+
font-size: 12px;
|
1009 |
+
display: inline-block;
|
1010 |
+
position: relative;
|
1011 |
+
cursor: pointer;
|
1012 |
+
border: 1px solid #666;
|
1013 |
+
border-radius: 3px;
|
1014 |
+
-moz-border-radius: 3px;
|
1015 |
+
-webkit-border-radius: 3px;
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
.easyswitch .easyswitch-label {
|
1019 |
+
width: 45px;
|
1020 |
+
height: 30px;
|
1021 |
+
line-height: 29px;
|
1022 |
+
float: left;
|
1023 |
+
margin: 0;
|
1024 |
+
font-family: Arial;
|
1025 |
+
text-align: center;
|
1026 |
+
background: #000000;
|
1027 |
+
color: #ffffff;
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
.easyswitch .easyswitch-slider {
|
1031 |
+
width: 41px;
|
1032 |
+
height: 26px;
|
1033 |
+
position: absolute;
|
1034 |
+
top: 1px;
|
1035 |
+
border: 1px solid #999;
|
1036 |
+
border-radius: 3px;
|
1037 |
+
background: #fff;
|
1038 |
+
background: -moz-linear-gradient(top, #ececec 0%, #ffffff 100%);
|
1039 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ececec), color-stop(100%, #ffffff));
|
1040 |
+
background: -webkit-linear-gradient(top, #ececec 0%, #ffffff 100%);
|
1041 |
+
background: -o-linear-gradient(top, #ececec 0%, #ffffff 100%);
|
1042 |
+
background: -ms-linear-gradient(top, #ececec 0%, #ffffff 100%);
|
1043 |
+
background: linear-gradient(top, #ececec 0%, #ffffff 100%);
|
1044 |
+
box-shadow: inset 0px 1px 0px 0px rgba(255,255,255,0.5);
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
.easyswitch.on {
|
1048 |
+
background-color: #333;
|
1049 |
+
color: #fff;
|
1050 |
+
}
|
1051 |
+
|
1052 |
+
.easyswitch.off {
|
1053 |
+
background-color: #efefef;
|
1054 |
+
color: #333;
|
1055 |
+
}
|
1056 |
+
.pricesilder-left{ float: left;
|
1057 |
+
margin-left: 3%;
|
1058 |
+
margin-top: 54px;
|
1059 |
+
width: 20%;}
|
1060 |
+
.pricesilder-left .container{
|
1061 |
+
/* margin-top: 50px;*/
|
1062 |
+
margin-left:4%;
|
1063 |
+
margin-top:16.9%;
|
1064 |
+
}
|
1065 |
+
.product_keyword_right .section-cell{
|
1066 |
+
width: 97%;
|
1067 |
+
height: auto;
|
1068 |
+
}
|
1069 |
+
.product_keyword_right .section-row{
|
1070 |
+
min-height: 424px}
|
1071 |
+
.product_keyword_right .section_conntent_kewords .section-row{
|
1072 |
+
min-height: 297px;
|
1073 |
+
}
|
1074 |
+
.accurate_section_content{
|
1075 |
+
float: left;
|
1076 |
+
width: 60%;
|
1077 |
+
}
|
1078 |
+
.img-blk {
|
1079 |
+
display: inline-block;
|
1080 |
+
width: 20%;
|
1081 |
+
position: relative;
|
1082 |
+
vertical-align: top;
|
1083 |
+
}
|
1084 |
+
.accurate_section_summary{
|
1085 |
+
float: left;
|
1086 |
+
width: 40%
|
1087 |
+
}
|
1088 |
+
.accurate_section_summary img{
|
1089 |
+
position: relative;
|
1090 |
+
max-width: 100%;
|
1091 |
+
margin: 0 auto;
|
1092 |
+
display: block;
|
1093 |
+
}
|
1094 |
+
.accurate_section_summary h1{
|
1095 |
+
color: #31373d;
|
1096 |
+
margin: 0 0 15px;
|
1097 |
+
}
|
1098 |
+
.accurate_section_summary .accurate_section_summary_content {
|
1099 |
+
color: #8495a3;
|
1100 |
+
margin-bottom: 14px;
|
1101 |
+
}
|
1102 |
+
.accurate_gender_content{
|
1103 |
+
padding: 0% 0;
|
1104 |
+
word-break: break-all;
|
1105 |
+
display: inline-block;
|
1106 |
+
width: 79%;
|
1107 |
+
vertical-align: top;
|
1108 |
+
}
|
1109 |
+
.accurate_section_content table{
|
1110 |
+
padding: 2%;
|
1111 |
+
width: 85%;
|
1112 |
+
}
|
1113 |
+
.section-row .icon-blk {
|
1114 |
+
margin: 10px 20px;
|
1115 |
+
}
|
1116 |
+
.section-row .icon-blk img{
|
1117 |
+
width: 30px;
|
1118 |
+
height: 30px;
|
1119 |
+
}
|
1120 |
+
.accurate_section_content table tbody tr td{
|
1121 |
+
text-align: center;
|
1122 |
+
color: #7d8f9f;
|
1123 |
+
}
|
1124 |
+
.age_section_row{
|
1125 |
+
background: #fff;
|
1126 |
+
/*box-shadow: 1px 0px 2px 0px;*/
|
1127 |
+
height: 79px;
|
1128 |
+
width: 98%;
|
1129 |
+
}
|
1130 |
+
.device_checkbox{
|
1131 |
+
margin-top: 4%;
|
1132 |
+
}
|
1133 |
+
.device_checkbox .section-cell{
|
1134 |
+
width: 100%;
|
1135 |
+
}
|
1136 |
+
|
1137 |
+
.checkbox-custom{
|
1138 |
+
display: none;
|
1139 |
+
}
|
1140 |
+
.checkbox-custom + .checkbox-custom-label:before {
|
1141 |
+
content: '';
|
1142 |
+
background: #ededed;
|
1143 |
+
/* border: 2px solid #ddd;*/
|
1144 |
+
display: inline-block;
|
1145 |
+
vertical-align: middle;
|
1146 |
+
width: 20px;
|
1147 |
+
height: 20px;
|
1148 |
+
padding: 2px;
|
1149 |
+
/*margin-right: 10px;*/
|
1150 |
+
text-align: center;
|
1151 |
+
margin-right: 2px;
|
1152 |
+
}
|
1153 |
+
.device_checkbox table{
|
1154 |
+
width: 100%;
|
1155 |
+
border-bottom: 1px solid #ededed;
|
1156 |
+
}
|
1157 |
+
.checkbox-custom:checked + .checkbox-custom-label:before {
|
1158 |
+
content: "✓";
|
1159 |
+
font-family: 'FontAwesome';
|
1160 |
+
background: #21610B;
|
1161 |
+
color: #fff;
|
1162 |
+
}
|
1163 |
+
|
1164 |
+
.radio-custom + .radio-custom-label:before {
|
1165 |
+
border-radius: 50%;
|
1166 |
+
}
|
1167 |
+
|
1168 |
+
.radio-custom:checked + .radio-custom-label:before {
|
1169 |
+
content: "\f00c";
|
1170 |
+
font-family: 'FontAwesome';
|
1171 |
+
color: #bbb;
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
.checkbox-custom:focus + .checkbox-custom-label, .radio-custom:focus + .radio-custom-label {
|
1175 |
+
outline: 1px solid #ddd; /* focus style */
|
1176 |
+
}
|
1177 |
+
.main_accurate_page{
|
1178 |
+
background: none repeat scroll 0 0 #ebeef0 !important;
|
1179 |
+
width: 100%;
|
1180 |
+
}
|
1181 |
+
.main_accurate_page .done_acc{
|
1182 |
+
margin-bottom: 23px;
|
1183 |
+
}
|
1184 |
+
.accurate_section{
|
1185 |
+
float: left;
|
1186 |
+
width: 100%;
|
1187 |
+
border-bottom:1px solid #dee3e8;
|
1188 |
+
padding: 45px 0;
|
1189 |
+
}
|
1190 |
+
.accurate_box{
|
1191 |
+
|
1192 |
+
|
1193 |
+
margin-bottom: 5px;
|
1194 |
+
margin-top: 5px;
|
1195 |
+
background: #fff;
|
1196 |
+
|
1197 |
+
z-index: 999999;
|
1198 |
+
}
|
1199 |
+
.notification-global{
|
1200 |
+
display: none;
|
1201 |
+
}
|
1202 |
+
.section-cell-dashboard{
|
1203 |
+
float: left;
|
1204 |
+
width: 30%;
|
1205 |
+
margin-left:2.5%;
|
1206 |
+
}
|
1207 |
+
.middile-cell-section{
|
1208 |
+
float: left;
|
1209 |
+
width: 30%;
|
1210 |
+
margin-left:2.5%;
|
1211 |
+
}
|
1212 |
+
.pricesilder-right #slider-range {
|
1213 |
+
height:15px !important;
|
1214 |
+
}
|
skin/adminhtml/default/default/munoz/images/simple_container_bg.gif
ADDED
Binary file
|
skin/adminhtml/default/default/munoz/js/build/jquery.easyswitch.js
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jquery.easyswitch.js
|
3 |
+
* 这是一个jQuery的插件,它可以让您轻松的创建开关按钮。
|
4 |
+
*
|
5 |
+
* -- REQUIRE: jQuery --
|
6 |
+
*
|
7 |
+
* @author Hpyer
|
8 |
+
* @home http://hpyer.cn
|
9 |
+
* @version 1.1.1
|
10 |
+
* @release 2015-07-20
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
USAGE:
|
15 |
+
|
16 |
+
<html>
|
17 |
+
<head>
|
18 |
+
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
|
19 |
+
<link rel="stylesheet" type="text/css" href="jquery.easyswitch.css" />
|
20 |
+
<script type="text/javascript" src="jquery.easyswitch.js"></script>
|
21 |
+
</head>
|
22 |
+
<body>
|
23 |
+
<div class="easyswitch"></div>
|
24 |
+
<script>$('.easyswitch').easyswitch();</script>
|
25 |
+
</body>
|
26 |
+
</html>
|
27 |
+
*/
|
28 |
+
|
29 |
+
(function($) {
|
30 |
+
$.fn.easyswitch = function(options) {
|
31 |
+
var default_options = {
|
32 |
+
'label-on' : 'ON', // 标签on的文字
|
33 |
+
'label-off' : 'OFF', // 标签off的文字
|
34 |
+
'name' : 'easyswitch', // 生成的表单元素名称
|
35 |
+
'default' : 0, // 生成的表单元素的默认值,程序根据该值来判断默认是ON还是OFF
|
36 |
+
'callback' : '', // 切换后的回调函数
|
37 |
+
'class-on' : 'on', // on时的class
|
38 |
+
'class-off' : 'off', // off时的class
|
39 |
+
'class-slider' : 'easyswitch-slider', // 滑块的class
|
40 |
+
'class-label' : 'easyswitch-label' // 标签的class
|
41 |
+
};
|
42 |
+
options = $.extend(default_options, options);
|
43 |
+
|
44 |
+
this.each(function(i, item) {
|
45 |
+
var self = $(item), opts = {}, html = '';
|
46 |
+
|
47 |
+
$.each(options, function(k, v) {
|
48 |
+
var custom = self.attr('data-'+k);
|
49 |
+
opts[k] = (custom == undefined ? v : custom);
|
50 |
+
});
|
51 |
+
|
52 |
+
html = '<span class="'+opts['class-label']+'">'+opts['label-on']+'</span>\
|
53 |
+
<span class="'+opts['class-label']+'">'+opts['label-off']+'</span>\
|
54 |
+
<span class="'+opts['class-slider']+'"></span>';
|
55 |
+
if (opts['name']) {
|
56 |
+
html += '<input type="hidden" id="easyswitch-'+opts['name']+'" name="'+opts['name']+'" value="" />';
|
57 |
+
}
|
58 |
+
try {
|
59 |
+
opts['callback'] = eval('('+opts['callback']+')');
|
60 |
+
} catch (e) {
|
61 |
+
opts['callback'] = function(){};
|
62 |
+
}
|
63 |
+
|
64 |
+
self.append(html).click(function() {
|
65 |
+
if (self.hasClass(opts['class-off'])) {
|
66 |
+
self.find('.'+opts['class-slider']).animate({left:'50%'}, 'fast', function() {
|
67 |
+
self.removeClass(opts['class-off']).addClass(opts['class-on']);
|
68 |
+
var value = 1;
|
69 |
+
$('#easyswitch-'+opts['name']).val(value);
|
70 |
+
opts['callback'](value, self);
|
71 |
+
});
|
72 |
+
} else {
|
73 |
+
self.find('.'+opts['class-slider']).animate({left:'1px'}, 'fast', function() {
|
74 |
+
self.removeClass(opts['class-on']).addClass(opts['class-off']);
|
75 |
+
var value = 0;
|
76 |
+
$('#easyswitch-'+opts['name']).val(value);
|
77 |
+
opts['callback'](value, self);
|
78 |
+
});
|
79 |
+
}
|
80 |
+
});
|
81 |
+
|
82 |
+
opts['default'] = parseInt(opts['default']);
|
83 |
+
if (opts['default']) {
|
84 |
+
self.addClass(opts['class-on']);
|
85 |
+
$('#easyswitch-'+opts['name']).val(1);
|
86 |
+
self.find('.'+opts['class-slider']).css({left:'50%'});
|
87 |
+
} else {
|
88 |
+
self.addClass(opts['class-off']);
|
89 |
+
$('#easyswitch-'+opts['name']).val(0);
|
90 |
+
self.find('.'+opts['class-slider']).css({left:'1px'});
|
91 |
+
}
|
92 |
+
});
|
93 |
+
}
|
94 |
+
})(jQuery);
|
skin/adminhtml/default/default/munoz/js/build/jquery.steps.js
CHANGED
@@ -743,6 +743,7 @@ function loadAsyncContent(wizard, options, state)
|
|
743 |
**/
|
744 |
function paginationClick(wizard, options, state, index)
|
745 |
{
|
|
|
746 |
if(index==0){
|
747 |
return false;
|
748 |
}
|
@@ -768,10 +769,38 @@ function paginationClick(wizard, options, state, index)
|
|
768 |
|
769 |
return true;
|
770 |
}
|
|
|
|
|
771 |
|
772 |
return false;
|
773 |
}
|
774 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
/**
|
776 |
* Fires when a pagination click happens.
|
777 |
*
|
743 |
**/
|
744 |
function paginationClick(wizard, options, state, index)
|
745 |
{
|
746 |
+
setPageSteps(index);
|
747 |
if(index==0){
|
748 |
return false;
|
749 |
}
|
769 |
|
770 |
return true;
|
771 |
}
|
772 |
+
|
773 |
+
|
774 |
|
775 |
return false;
|
776 |
}
|
777 |
|
778 |
+
/**
|
779 |
+
* Fires when a steps send through API.
|
780 |
+
*
|
781 |
+
* @static
|
782 |
+
* @private
|
783 |
+
* @event click
|
784 |
+
* @param event {Object} An event object
|
785 |
+
*/
|
786 |
+
function setPageSteps(index){
|
787 |
+
step=index+1;
|
788 |
+
var getUrls = window.location;
|
789 |
+
$wk_jq.ajax({
|
790 |
+
url :getUrls,
|
791 |
+
type : "get",
|
792 |
+
//async: false,
|
793 |
+
data : {'step':step},
|
794 |
+
dataType: "text",
|
795 |
+
success : function(reponse){
|
796 |
+
if (reponse=='success') {
|
797 |
+
|
798 |
+
}
|
799 |
+
}
|
800 |
+
|
801 |
+
})
|
802 |
+
}
|
803 |
+
|
804 |
/**
|
805 |
* Fires when a pagination click happens.
|
806 |
*
|
skin/adminhtml/default/default/munoz/js/jquery.easyswitch.js
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
(function($) {
|
3 |
+
$.fn.easyswitch = function(options) {
|
4 |
+
var default_options = {
|
5 |
+
'label-on' : 'ON',
|
6 |
+
'label-off' : 'OFF',
|
7 |
+
'name' : 'easyswitch',
|
8 |
+
'default' : 0,
|
9 |
+
'callback' : '',
|
10 |
+
'class-on' : 'on',
|
11 |
+
'class-off' : 'off',
|
12 |
+
'class-slider' : 'easyswitch-slider',
|
13 |
+
'class-label' : 'easyswitch-label'
|
14 |
+
};
|
15 |
+
options = $.extend(default_options, options);
|
16 |
+
|
17 |
+
this.each(function(i, item) {
|
18 |
+
var self = $(item), opts = {}, html = '';
|
19 |
+
|
20 |
+
$.each(options, function(k, v) {
|
21 |
+
var custom = self.attr('data-'+k);
|
22 |
+
opts[k] = (custom == undefined ? v : custom);
|
23 |
+
});
|
24 |
+
|
25 |
+
html = '<span class="'+opts['class-label']+'">'+opts['label-on']+'</span>\
|
26 |
+
<span class="'+opts['class-label']+'">'+opts['label-off']+'</span>\
|
27 |
+
<span class="'+opts['class-slider']+'"></span>';
|
28 |
+
if (opts['name']) {
|
29 |
+
html += '<input type="hidden" id="easyswitch-'+opts['name']+'" name="'+opts['name']+'" value="" />';
|
30 |
+
}
|
31 |
+
try {
|
32 |
+
opts['callback'] = eval('('+opts['callback']+')');
|
33 |
+
} catch (e) {
|
34 |
+
opts['callback'] = function(){};
|
35 |
+
}
|
36 |
+
|
37 |
+
self.append(html).click(function() {
|
38 |
+
if (self.hasClass(opts['class-off'])) {
|
39 |
+
|
40 |
+
self.find('.'+opts['class-slider']).animate({left:'50%'}, 'fast', function() {
|
41 |
+
self.removeClass(opts['class-off']).addClass(opts['class-on']);
|
42 |
+
var value = 1;
|
43 |
+
$('#easyswitch-'+opts['name']).val(value);
|
44 |
+
opts['callback'](value, self);
|
45 |
+
});
|
46 |
+
} else {
|
47 |
+
self.find('.'+opts['class-slider']).animate({left:'1px'}, 'fast', function() {
|
48 |
+
self.removeClass(opts['class-on']).addClass(opts['class-off']);
|
49 |
+
var value = 0;
|
50 |
+
$('#easyswitch-'+opts['name']).val(value);
|
51 |
+
opts['callback'](value, self);
|
52 |
+
});
|
53 |
+
}
|
54 |
+
});
|
55 |
+
|
56 |
+
opts['default'] = parseInt(opts['default']);
|
57 |
+
if (opts['default']) {
|
58 |
+
|
59 |
+
self.addClass(opts['class-on']);
|
60 |
+
$('#easyswitch-'+opts['name']).val(1);
|
61 |
+
self.find('.'+opts['class-slider']).css({left:'50%'});
|
62 |
+
} else {
|
63 |
+
self.addClass(opts['class-off']);
|
64 |
+
$('#easyswitch-'+opts['name']).val(0);
|
65 |
+
self.find('.'+opts['class-slider']).css({left:'1px'});
|
66 |
+
}
|
67 |
+
});
|
68 |
+
}
|
69 |
+
})(jQuery);
|
skin/adminhtml/default/default/munoz/js/priceslider.js
CHANGED
@@ -9715,6 +9715,7 @@ color.fn = jQuery.extend( color.prototype, {
|
|
9715 |
}
|
9716 |
}
|
9717 |
result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
|
|
|
9718 |
}
|
9719 |
});
|
9720 |
return this[ spaceName ]( result );
|
@@ -12795,6 +12796,7 @@ var selectmenu = $.widget( "ui.selectmenu", {
|
|
12795 |
|
12796 |
|
12797 |
var slider = $.widget( "ui.slider", $.ui.mouse, {
|
|
|
12798 |
version: "1.11.4",
|
12799 |
widgetEventPrefix: "slide",
|
12800 |
|
@@ -12857,7 +12859,7 @@ var slider = $.widget( "ui.slider", $.ui.mouse, {
|
|
12857 |
handles = [];
|
12858 |
|
12859 |
handleCount = ( options.values && options.values.length ) || 1;
|
12860 |
-
|
12861 |
if ( existingHandles.length > handleCount ) {
|
12862 |
existingHandles.slice( handleCount ).remove();
|
12863 |
existingHandles = existingHandles.slice( 0, handleCount );
|
@@ -12961,6 +12963,7 @@ var slider = $.widget( "ui.slider", $.ui.mouse, {
|
|
12961 |
normValue = this._normValueFromMouse( position );
|
12962 |
distance = this._valueMax() - this._valueMin() + 1;
|
12963 |
this.handles.each(function( i ) {
|
|
|
12964 |
var thisDistance = Math.abs( normValue - that.values(i) );
|
12965 |
if (( distance > thisDistance ) ||
|
12966 |
( distance === thisDistance &&
|
@@ -12986,7 +12989,7 @@ var slider = $.widget( "ui.slider", $.ui.mouse, {
|
|
12986 |
offset = closestHandle.offset();
|
12987 |
mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
|
12988 |
this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
|
12989 |
-
left: event.pageX - offset.left - ( closestHandle.width() / 2
|
12990 |
top: event.pageY - offset.top -
|
12991 |
( closestHandle.height() / 2 ) -
|
12992 |
( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
|
@@ -13042,12 +13045,17 @@ var slider = $.widget( "ui.slider", $.ui.mouse, {
|
|
13042 |
if ( this.orientation === "horizontal" ) {
|
13043 |
pixelTotal = this.elementSize.width;
|
13044 |
pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
|
|
|
|
|
|
|
|
|
13045 |
} else {
|
13046 |
pixelTotal = this.elementSize.height;
|
13047 |
pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
|
13048 |
}
|
13049 |
|
13050 |
percentMouse = ( pixelMouse / pixelTotal );
|
|
|
13051 |
if ( percentMouse > 1 ) {
|
13052 |
percentMouse = 1;
|
13053 |
}
|
@@ -13060,7 +13068,9 @@ var slider = $.widget( "ui.slider", $.ui.mouse, {
|
|
13060 |
|
13061 |
valueTotal = this._valueMax() - this._valueMin();
|
13062 |
valueMouse = this._valueMin() + percentMouse * valueTotal;
|
13063 |
-
|
|
|
|
|
13064 |
return this._trimAlignValue( valueMouse );
|
13065 |
},
|
13066 |
|
@@ -13355,6 +13365,7 @@ var slider = $.widget( "ui.slider", $.ui.mouse, {
|
|
13355 |
_set = {};
|
13356 |
|
13357 |
if ( this.options.values && this.options.values.length ) {
|
|
|
13358 |
this.handles.each(function( i ) {
|
13359 |
valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
|
13360 |
_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
@@ -13379,15 +13390,16 @@ var slider = $.widget( "ui.slider", $.ui.mouse, {
|
|
13379 |
lastValPercent = valPercent;
|
13380 |
});
|
13381 |
} else {
|
|
|
13382 |
value = this.value();
|
13383 |
valueMin = this._valueMin();
|
13384 |
valueMax = this._valueMax();
|
13385 |
valPercent = ( valueMax !== valueMin ) ?
|
13386 |
-
( value - valueMin ) / ( valueMax - valueMin ) * 100
|
13387 |
0;
|
13388 |
_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
13389 |
this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
|
13390 |
-
|
13391 |
if ( oRange === "min" && this.orientation === "horizontal" ) {
|
13392 |
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
|
13393 |
}
|
@@ -13794,6 +13806,7 @@ var sortable = $.widget("ui.sortable", $.ui.mouse, {
|
|
13794 |
|
13795 |
//Do scrolling
|
13796 |
if(this.options.scroll) {
|
|
|
13797 |
if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
|
13798 |
|
13799 |
if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
|
9715 |
}
|
9716 |
}
|
9717 |
result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
|
9718 |
+
|
9719 |
}
|
9720 |
});
|
9721 |
return this[ spaceName ]( result );
|
12796 |
|
12797 |
|
12798 |
var slider = $.widget( "ui.slider", $.ui.mouse, {
|
12799 |
+
|
12800 |
version: "1.11.4",
|
12801 |
widgetEventPrefix: "slide",
|
12802 |
|
12859 |
handles = [];
|
12860 |
|
12861 |
handleCount = ( options.values && options.values.length ) || 1;
|
12862 |
+
//alert(handleCount);
|
12863 |
if ( existingHandles.length > handleCount ) {
|
12864 |
existingHandles.slice( handleCount ).remove();
|
12865 |
existingHandles = existingHandles.slice( 0, handleCount );
|
12963 |
normValue = this._normValueFromMouse( position );
|
12964 |
distance = this._valueMax() - this._valueMin() + 1;
|
12965 |
this.handles.each(function( i ) {
|
12966 |
+
|
12967 |
var thisDistance = Math.abs( normValue - that.values(i) );
|
12968 |
if (( distance > thisDistance ) ||
|
12969 |
( distance === thisDistance &&
|
12989 |
offset = closestHandle.offset();
|
12990 |
mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
|
12991 |
this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
|
12992 |
+
left: event.pageX - offset.left - ( closestHandle.width() / 2),
|
12993 |
top: event.pageY - offset.top -
|
12994 |
( closestHandle.height() / 2 ) -
|
12995 |
( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
|
13045 |
if ( this.orientation === "horizontal" ) {
|
13046 |
pixelTotal = this.elementSize.width;
|
13047 |
pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
|
13048 |
+
|
13049 |
+
//console.log(pixelTotal);
|
13050 |
+
//console.log(pixelMouse);
|
13051 |
+
|
13052 |
} else {
|
13053 |
pixelTotal = this.elementSize.height;
|
13054 |
pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
|
13055 |
}
|
13056 |
|
13057 |
percentMouse = ( pixelMouse / pixelTotal );
|
13058 |
+
//alert(percentMouse);
|
13059 |
if ( percentMouse > 1 ) {
|
13060 |
percentMouse = 1;
|
13061 |
}
|
13068 |
|
13069 |
valueTotal = this._valueMax() - this._valueMin();
|
13070 |
valueMouse = this._valueMin() + percentMouse * valueTotal;
|
13071 |
+
//valueMouses =valueMouse+5;
|
13072 |
+
//console.log(valueMouse);
|
13073 |
+
//console.log(valueMouses);
|
13074 |
return this._trimAlignValue( valueMouse );
|
13075 |
},
|
13076 |
|
13365 |
_set = {};
|
13366 |
|
13367 |
if ( this.options.values && this.options.values.length ) {
|
13368 |
+
|
13369 |
this.handles.each(function( i ) {
|
13370 |
valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
|
13371 |
_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
13390 |
lastValPercent = valPercent;
|
13391 |
});
|
13392 |
} else {
|
13393 |
+
|
13394 |
value = this.value();
|
13395 |
valueMin = this._valueMin();
|
13396 |
valueMax = this._valueMax();
|
13397 |
valPercent = ( valueMax !== valueMin ) ?
|
13398 |
+
( value - valueMin ) / ( valueMax - valueMin ) * 100:
|
13399 |
0;
|
13400 |
_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
13401 |
this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
|
13402 |
+
|
13403 |
if ( oRange === "min" && this.orientation === "horizontal" ) {
|
13404 |
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
|
13405 |
}
|
13806 |
|
13807 |
//Do scrolling
|
13808 |
if(this.options.scroll) {
|
13809 |
+
|
13810 |
if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
|
13811 |
|
13812 |
if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
|