Version Notes
Added new features
Download this release
Release Info
Developer | Magento Core Team |
Extension | NextWidgets_NextPromote |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 2.0.0
- app/code/local/NextWidgets/NextPromote/Helper/Data.php +3 -2
- app/code/local/NextWidgets/NextPromote/Helper/Registration.php +37 -1
- app/code/local/NextWidgets/NextPromote/Model/Product/GetV4.php +7 -1
- app/code/local/NextWidgets/NextPromote/controllers/Adminhtml/IndexController.php +43 -2
- app/code/local/NextWidgets/NextPromote/controllers/Adminhtml/IndexController1.php +100 -0
- app/code/local/NextWidgets/NextPromote/controllers/Adminhtml/RegistrationController.php +73 -55
- app/code/local/NextWidgets/NextPromote/controllers/Adminhtml/RegistrationController1.php +481 -0
- app/code/local/NextWidgets/NextPromote/controllers/IndexController.php +2 -2
- app/code/local/NextWidgets/NextPromote/controllers/RegistrationController.php +40 -0
- app/code/local/NextWidgets/NextPromote/etc/config.xml +5 -5
- app/design/adminhtml/default/default/template/nextwidgets_registration/registration.phtml +531 -14
- app/design/adminhtml/default/default/template/nextwidgets_registration/sacuvano/login.phtml +54 -0
- app/design/adminhtml/default/default/template/nextwidgets_registration/sacuvano/loginpost.phtml +2 -0
- app/design/adminhtml/default/default/template/nextwidgets_registration/sacuvano/registration.phtml +64 -0
- app/design/adminhtml/default/default/template/nextwidgets_registration/sacuvano/registration2.phtml +108 -0
- package.xml +4 -4
app/code/local/NextWidgets/NextPromote/Helper/Data.php
CHANGED
@@ -286,7 +286,7 @@ class NextWidgets_NextPromote_Helper_Data extends Mage_Core_Helper_Abstract
|
|
286 |
$json_url = 'http://dev.nextwidgets.com/API/rest/seller/flagforimport';
|
287 |
|
288 |
################################### TEST ONLY ########################################
|
289 |
-
$url = 'http://www.webdesign.co.rs/post.php';
|
290 |
$fields_string = '';
|
291 |
//url-ify the data for the POST
|
292 |
foreach($fields as $key=>$value) {
|
@@ -306,7 +306,8 @@ class NextWidgets_NextPromote_Helper_Data extends Mage_Core_Helper_Abstract
|
|
306 |
$result = curl_exec($ch);
|
307 |
|
308 |
//close connection
|
309 |
-
curl_close($ch);
|
|
|
310 |
################################### TEST ONLY ########################################
|
311 |
|
312 |
|
286 |
$json_url = 'http://dev.nextwidgets.com/API/rest/seller/flagforimport';
|
287 |
|
288 |
################################### TEST ONLY ########################################
|
289 |
+
/* $url = 'http://www.webdesign.co.rs/post.php';
|
290 |
$fields_string = '';
|
291 |
//url-ify the data for the POST
|
292 |
foreach($fields as $key=>$value) {
|
306 |
$result = curl_exec($ch);
|
307 |
|
308 |
//close connection
|
309 |
+
curl_close($ch);
|
310 |
+
*/
|
311 |
################################### TEST ONLY ########################################
|
312 |
|
313 |
|
app/code/local/NextWidgets/NextPromote/Helper/Registration.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
class NextWidgets_NextPromote_Helper_Registration extends Mage_Core_Helper_Abstract
|
6 |
{
|
7 |
-
|
8 |
public function languageId(){
|
9 |
// $storeId = Mage::app()->getWebsite()->getDefaultStore()->getCode();
|
10 |
return substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
|
@@ -28,6 +28,42 @@ class NextWidgets_NextPromote_Helper_Registration extends Mage_Core_Helper_Abstr
|
|
28 |
return $SellerName;
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
|
4 |
|
5 |
class NextWidgets_NextPromote_Helper_Registration extends Mage_Core_Helper_Abstract
|
6 |
{
|
7 |
+
public $wrong_cred = 0;
|
8 |
public function languageId(){
|
9 |
// $storeId = Mage::app()->getWebsite()->getDefaultStore()->getCode();
|
10 |
return substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
|
28 |
return $SellerName;
|
29 |
}
|
30 |
|
31 |
+
public function authKey(){
|
32 |
+
$authKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key citam
|
33 |
+
if($authKey == null || $authKey == '' || $authKey == ' '){
|
34 |
+
$authKey = $this->getUniqueCode(5) . sha1(Mage::getSingleton('admin/session')->getUser()->getData('email'));
|
35 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/auth_key', $authKey );
|
36 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/md5_auth_key', md5($authKey) );
|
37 |
+
}
|
38 |
+
return $authKey ;
|
39 |
+
}
|
40 |
+
|
41 |
+
private function getUniqueCode($length = "")
|
42 |
+
{
|
43 |
+
$code = md5(uniqid(rand(), true));
|
44 |
+
if ($length != "") return substr($code, 0, $length);
|
45 |
+
else return $code;
|
46 |
+
}
|
47 |
+
|
48 |
+
public function pageSize() {
|
49 |
+
return Mage::getStoreConfig('nw_registration/settings1/page_size');
|
50 |
+
}
|
51 |
+
|
52 |
+
public function pagination() {
|
53 |
+
// Mage::getModel('nextpromote/product_getV4')->init();
|
54 |
+
// $products = Mage::getModel('catalog/product')->getProductCount();
|
55 |
+
return 'false';
|
56 |
+
}
|
57 |
+
|
58 |
+
public function registrationError($wrong_cred = 0){
|
59 |
+
$this->$wrong_cred = $wrong_cred;
|
60 |
+
var_dump($this->$wrong_cred);
|
61 |
+
if($this->$wrong_cred == 1){
|
62 |
+
return '<div class= style="margin:0px auto; width: 100px;">Wrong credientials. Please enter correct email and password.</div>';
|
63 |
+
}
|
64 |
+
else
|
65 |
+
return;
|
66 |
+
}
|
67 |
}
|
68 |
|
69 |
|
app/code/local/NextWidgets/NextPromote/Model/Product/GetV4.php
CHANGED
@@ -50,13 +50,19 @@ class NextWidgets_NextPromote_Model_Product_GetV4 extends Mage_Core_Model_Abstra
|
|
50 |
->addAttributeToFilter('updated_at', array("from" => $time, "to" => $now))
|
51 |
->addAttributeToSelect('*')
|
52 |
->setPage($page, $take);
|
53 |
-
}
|
54 |
|
55 |
return $products
|
56 |
->addAttributeToFilter('visibility', array('neq' => 1))
|
57 |
->addAttributeToFilter('updated_at', array("from" => $time, "to" => $now))
|
58 |
->addAttributeToSelect('*');
|
59 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
|
62 |
}
|
50 |
->addAttributeToFilter('updated_at', array("from" => $time, "to" => $now))
|
51 |
->addAttributeToSelect('*')
|
52 |
->setPage($page, $take);
|
53 |
+
} elseif($time) {
|
54 |
|
55 |
return $products
|
56 |
->addAttributeToFilter('visibility', array('neq' => 1))
|
57 |
->addAttributeToFilter('updated_at', array("from" => $time, "to" => $now))
|
58 |
->addAttributeToSelect('*');
|
59 |
}
|
60 |
+
else {
|
61 |
+
return $products
|
62 |
+
->addAttributeToFilter('visibility', array('neq' => 1))
|
63 |
+
->addAttributeToSelect('*')
|
64 |
+
->setPage($page, $take);
|
65 |
+
}
|
66 |
|
67 |
|
68 |
}
|
app/code/local/NextWidgets/NextPromote/controllers/Adminhtml/IndexController.php
CHANGED
@@ -25,6 +25,7 @@ class NextWidgets_NextPromote_Adminhtml_IndexController extends Mage_Adminhtml_C
|
|
25 |
|
26 |
$registred_onsite = Mage::getStoreConfig('nw_registration/settings1/Registred');
|
27 |
$service_root_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url');
|
|
|
28 |
|
29 |
$nw_admin_panel_url = '/admin/sellermvc3/sessions/create?ReturnUrl=';
|
30 |
$return_url = urlencode('/admin/sellermvc3/Services/NextPromote');
|
@@ -40,7 +41,46 @@ class NextWidgets_NextPromote_Adminhtml_IndexController extends Mage_Adminhtml_C
|
|
40 |
}
|
41 |
$auth_key = Mage::getStoreConfig('nw_registration/settings1/md5_auth_key');
|
42 |
|
43 |
-
$html_block = "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
<div style='margin:0 auto; width: 200px;'>
|
45 |
<!-- <a href='http://www.nextwidgets.com' target='_blank' style='text-decoration:none;'><div style='margin:100px auto; width: 300px; height: 60px; font-size: 1.5em;'>
|
46 |
Click here to Create Promotion!
|
@@ -50,7 +90,8 @@ class NextWidgets_NextPromote_Adminhtml_IndexController extends Mage_Adminhtml_C
|
|
50 |
."<form action='$form_action' method='post' target='_blank'>"
|
51 |
."<input type='hidden' value='$NwAuthKey' id='ApiKey' name='ApiKey'>"
|
52 |
."<input type='hidden' value='$auth_key' id='SellerApiKey' name='SellerApiKey'>"
|
53 |
-
."<button type='submit'style='height:50px; font-size: 16px;margin-top:50px;'>Go to NextPromote admin panel!</button>"
|
|
|
54 |
."</form>"
|
55 |
. "</div>";
|
56 |
|
25 |
|
26 |
$registred_onsite = Mage::getStoreConfig('nw_registration/settings1/Registred');
|
27 |
$service_root_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url');
|
28 |
+
|
29 |
|
30 |
$nw_admin_panel_url = '/admin/sellermvc3/sessions/create?ReturnUrl=';
|
31 |
$return_url = urlencode('/admin/sellermvc3/Services/NextPromote');
|
41 |
}
|
42 |
$auth_key = Mage::getStoreConfig('nw_registration/settings1/md5_auth_key');
|
43 |
|
44 |
+
$html_block = "
|
45 |
+
<style>
|
46 |
+
.login, .signup {
|
47 |
+
display: block;
|
48 |
+
cursor: pointer;
|
49 |
+
width: 228px;
|
50 |
+
height: 40px;
|
51 |
+
line-height: 40px;
|
52 |
+
font-size: 12px;
|
53 |
+
text-align: center;
|
54 |
+
color: white;
|
55 |
+
background-color: #90c547; /* Old browsers */
|
56 |
+
background: -moz-linear-gradient(top, #90c547 0%, #90c547 26%, #55940e 100%); /* FF3.6+ */
|
57 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#90c547), color-stop(26%,#90c547), color-stop(100%,#55940e)); /* Chrome,Safari4+ */
|
58 |
+
background: -webkit-linear-gradient(top, #90c547 0%,#90c547 26%,#55940e 100%); /* Chrome10+,Safari5.1+ */
|
59 |
+
background: -o-linear-gradient(top, #90c547 0%,#90c547 26%,#55940e 100%); /* Opera 11.10+ */
|
60 |
+
background: linear-gradient(to bottom, #90c547 0%,#90c547 26%,#55940e 100%); /* W3C */
|
61 |
+
background: -ms-linear-gradient(top, #90c547 0%,#90c547 26%,#55940e 100%); /* IE10+ */
|
62 |
+
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#90c547', endColorstr='#55940e',GradientType=0 );*/ /* IE6-9 */
|
63 |
+
border: 1px solid #464648;
|
64 |
+
border-radius: 5px;
|
65 |
+
}
|
66 |
+
.login.ie, .signup.ie {
|
67 |
+
background: url('https://widget.nextwidgets.com/Admin/sellermvc3/content/images/btn-green-bgr.png') repeat;
|
68 |
+
}
|
69 |
+
.login:hover, .signup:hover {
|
70 |
+
/*background: #333;*/
|
71 |
+
background: #55940e; /* Old browsers */
|
72 |
+
background: -moz-linear-gradient(top, #55940e 0%, #90c547 74%, #90c547 100%); /* FF3.6+ */
|
73 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#55940e), color-stop(74%,#90c547), color-stop(100%,#90c547)); /* Chrome,Safari4+ */
|
74 |
+
background: -webkit-linear-gradient(top, #55940e 0%,#90c547 74%,#90c547 100%); /* Chrome10+,Safari5.1+ */
|
75 |
+
background: -o-linear-gradient(top, #55940e 0%,#90c547 74%,#90c547 100%); /* Opera 11.10+ */
|
76 |
+
background: -ms-linear-gradient(top, #55940e 0%,#90c547 74%,#90c547 100%); /* IE10+ */
|
77 |
+
background: linear-gradient(to bottom, #55940e 0%,#90c547 74%,#90c547 100%); /* W3C */
|
78 |
+
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#55940e', endColorstr='#90c547',GradientType=0 );*/ /* IE6-9 */
|
79 |
+
}
|
80 |
+
.login.ie:hover, .signup.ie:hover {
|
81 |
+
background: url('https://widget.nextwidgets.com/Admin/sellermvc3/content/images/btn-green-hover-bgr.png') repeat;
|
82 |
+
}
|
83 |
+
</style>
|
84 |
<div style='margin:0 auto; width: 200px;'>
|
85 |
<!-- <a href='http://www.nextwidgets.com' target='_blank' style='text-decoration:none;'><div style='margin:100px auto; width: 300px; height: 60px; font-size: 1.5em;'>
|
86 |
Click here to Create Promotion!
|
90 |
."<form action='$form_action' method='post' target='_blank'>"
|
91 |
."<input type='hidden' value='$NwAuthKey' id='ApiKey' name='ApiKey'>"
|
92 |
."<input type='hidden' value='$auth_key' id='SellerApiKey' name='SellerApiKey'>"
|
93 |
+
// ."<button type='submit'style='height:50px; font-size: 16px;margin-top:50px;'>Go to NextPromote admin panel!</button>"
|
94 |
+
."<button type='submit' class='login' style='margin-top:100px'>Go to NextPromote admin panel!</button>"
|
95 |
."</form>"
|
96 |
. "</div>";
|
97 |
|
app/code/local/NextWidgets/NextPromote/controllers/Adminhtml/IndexController1.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
NextWidgets **NOTICE OF LICENSE**
|
5 |
+
This source file is subject to the EULA that is bundled with this package in the file LICENSE.pdf. It is also available through the world-wide-web at this URL:
|
6 |
+
http://nextwidgets.com/magento_extension_license.pdf
|
7 |
+
=================================================================
|
8 |
+
MAGENTO COMMUNITY EDITION USAGE NOTICE
|
9 |
+
=================================================================
|
10 |
+
This package is designed for the Magento COMMUNITY edition
|
11 |
+
This extension may not work on any other Magento edition except Magento COMMUNITY edition. NextWidgets does not provide extension support in case of incorrect edition usage.
|
12 |
+
=================================================================
|
13 |
+
Copyright (c) 2011 NextWidgets – ALENSA AG (http://www.nextwidgets.com)
|
14 |
+
License http://nextwidgets.com/magento_extension_license.pdf
|
15 |
+
*/
|
16 |
+
|
17 |
+
|
18 |
+
class NextWidgets_NextPromote_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
|
19 |
+
{
|
20 |
+
protected $name;
|
21 |
+
|
22 |
+
public function indexAction()
|
23 |
+
|
24 |
+
{
|
25 |
+
|
26 |
+
$registred_onsite = Mage::getStoreConfig('nw_registration/settings1/Registred');
|
27 |
+
$service_root_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url');
|
28 |
+
|
29 |
+
|
30 |
+
$nw_admin_panel_url = '/admin/sellermvc3/sessions/create?ReturnUrl=';
|
31 |
+
$return_url = urlencode('/admin/sellermvc3/Services/NextPromote');
|
32 |
+
|
33 |
+
$NwAuthKey = Mage::getStoreConfig('nw_registration/settings1/NwAuthKey');
|
34 |
+
$auth_key = md5(Mage::getStoreConfig('nw_registration/settings1/auth_key'));
|
35 |
+
|
36 |
+
$form_action = $service_root_url . $nw_admin_panel_url . $return_url;
|
37 |
+
|
38 |
+
|
39 |
+
if(!$registred_onsite || $registred_onsite == 'false'){
|
40 |
+
$this->_redirectUrl($this->getUrl('*/adminhtml_registration/index'));
|
41 |
+
}
|
42 |
+
$auth_key = Mage::getStoreConfig('nw_registration/settings1/md5_auth_key');
|
43 |
+
|
44 |
+
$html_block = "
|
45 |
+
<div style='margin:0 auto; width: 200px;'>
|
46 |
+
<!-- <a href='http://www.nextwidgets.com' target='_blank' style='text-decoration:none;'><div style='margin:100px auto; width: 300px; height: 60px; font-size: 1.5em;'>
|
47 |
+
Click here to Create Promotion!
|
48 |
+
</div></a>
|
49 |
+
-->
|
50 |
+
"
|
51 |
+
."<form action='$form_action' method='post' target='_blank'>"
|
52 |
+
."<input type='hidden' value='$NwAuthKey' id='ApiKey' name='ApiKey'>"
|
53 |
+
."<input type='hidden' value='$auth_key' id='SellerApiKey' name='SellerApiKey'>"
|
54 |
+
."<button type='submit'style='height:50px; font-size: 16px;margin-top:50px;'>Go to NextPromote admin panel!</button>"
|
55 |
+
."</form>"
|
56 |
+
. "</div>";
|
57 |
+
|
58 |
+
// }
|
59 |
+
|
60 |
+
|
61 |
+
$this->loadLayout();
|
62 |
+
$this->_setActiveMenu('promo');
|
63 |
+
//create a text block with the name of "nw-block"
|
64 |
+
$block = $this->getLayout()
|
65 |
+
->createBlock('core/text', 'nw-block')
|
66 |
+
->setText($html_block);
|
67 |
+
|
68 |
+
$this->_addContent($block);
|
69 |
+
|
70 |
+
$this->renderLayout();
|
71 |
+
}
|
72 |
+
|
73 |
+
public function errorAction(){
|
74 |
+
|
75 |
+
$registred_onsite = Mage::getStoreConfig('nw_registration/settings1/Registred');
|
76 |
+
|
77 |
+
if(!$registred_onsite || $registred_onsite == 'false'){
|
78 |
+
Mage::getSingleton('core/session')->addError('There was Error during registration. Please register later or contact us.');
|
79 |
+
$html_block = "
|
80 |
+
<div style='margin:0 auto; width: 662px; '>
|
81 |
+
<a href='" . $this->getUrl('*/adminhtml_registration/index') . "'><div style='margin:0 auto; width: 250px; height: 60px;'>Please Click Here to Register</div></a>
|
82 |
+
</div>
|
83 |
+
";
|
84 |
+
}
|
85 |
+
|
86 |
+
$this->loadLayout();
|
87 |
+
$this->_setActiveMenu('promo');
|
88 |
+
//create a text block with the name of "nw-block"
|
89 |
+
$block = $this->getLayout()
|
90 |
+
->createBlock('core/text', 'nw-block')
|
91 |
+
->setText($html_block);
|
92 |
+
|
93 |
+
$this->_addContent($block);
|
94 |
+
|
95 |
+
$this->renderLayout();
|
96 |
+
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
app/code/local/NextWidgets/NextPromote/controllers/Adminhtml/RegistrationController.php
CHANGED
@@ -22,8 +22,9 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
22 |
return Mage::getStoreConfig('nw_registration/settings1/Registred');
|
23 |
}
|
24 |
|
25 |
-
public function indexAction()
|
26 |
{
|
|
|
27 |
if($this->registredAction() && Mage::getStoreConfig('nw_registration/settings1/Registred') != false) $this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
28 |
|
29 |
// Add NextPromote Version
|
@@ -51,39 +52,47 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
51 |
{
|
52 |
$post = $this->getRequest()->getPost();
|
53 |
|
|
|
54 |
try {
|
55 |
if (empty($post)) {
|
56 |
-
Mage::throwException($this->__('Invalid form data.'));
|
|
|
57 |
}
|
58 |
-
|
59 |
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
62 |
} catch (Exception $e) {
|
63 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
64 |
}
|
65 |
#$this->_redirect('*/*');
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
|
74 |
-
|
75 |
-
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
86 |
-
|
|
|
|
|
87 |
}
|
88 |
public function post2Action()
|
89 |
{
|
@@ -128,7 +137,7 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
128 |
} else {
|
129 |
$store = Mage::app()->getStore($params['store']);
|
130 |
}
|
131 |
-
|
132 |
// Auth key
|
133 |
$AuthKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key citam
|
134 |
if($AuthKey == null || $AuthKey == '' || $AuthKey == ' '){
|
@@ -139,7 +148,9 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
139 |
// Mage::getModel('core/config')->saveConfig('nw_registration/settings1/auth_key', '' );
|
140 |
// $AuthKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key
|
141 |
|
142 |
-
|
|
|
|
|
143 |
|
144 |
$currentCurrencyCode = Mage::helper('nextpromote/registration')->currentCurrencyCode();
|
145 |
$languageId = Mage::helper('nextpromote/registration')->languageId();
|
@@ -157,7 +168,6 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
157 |
$OrderFeedUrl = $baseUrl . 'nextwidgets/order/get?orderId={0}&auth_key=' . $auth_key;
|
158 |
$ServiceControll = $baseUrl . 'index.php/nw_registration/service?auth_key=' . $auth_key;
|
159 |
$CartToCartTransferUrl = $baseUrl . 'nextwidgets/order/commit?auth_key=' . $auth_key;
|
160 |
-
$CartToCartTransferUrl = $baseUrl . 'nextwidgets/order/commit?auth_key=' . $auth_key;
|
161 |
$SellerName = $company_name;
|
162 |
|
163 |
# http://linux.nextwidgets.com/test5/index.php/nw_registration/service?auth_key=88ce73ddfd317183378b4444c76deacc
|
@@ -336,24 +346,21 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
336 |
$email = $_POST['email'];
|
337 |
$password = md5($_POST['password']);
|
338 |
|
339 |
-
#
|
340 |
-
# $password = '7694f4a66316e53c8cdd9d9954bd611d';
|
341 |
|
342 |
$qry_str = '?email=' . $email . '&password=' . $password;
|
343 |
-
$ch = curl_init();
|
|
|
|
|
|
|
|
|
|
|
344 |
|
345 |
-
// Set query data here with the URL
|
346 |
-
curl_setopt($ch, CURLOPT_URL, 'http://dev.nextwidgets.com/API/rest/seller/getbyuser' . $qry_str);
|
347 |
|
348 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
349 |
curl_setopt($ch, CURLOPT_TIMEOUT, '3');
|
350 |
$content = trim(curl_exec($ch));
|
351 |
curl_close($ch);
|
352 |
-
|
353 |
-
echo "<pre>";
|
354 |
-
$string = json_decode($content);
|
355 |
-
print_r ($string);
|
356 |
-
echo "<pre>";
|
357 |
|
358 |
###################################################################################################
|
359 |
$string = json_decode($content);
|
@@ -363,7 +370,8 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
363 |
|
364 |
|
365 |
if(isset($string->Status) && $string->Status == 'Success'){
|
366 |
-
|
|
|
367 |
$order_home_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url3');
|
368 |
|
369 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NwAuthKey', $string->NwAuthKey ); //OK
|
@@ -377,12 +385,23 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
377 |
|
378 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/order_home_url', $order_home_url ); // if case of uninstall plugin
|
379 |
|
380 |
-
|
381 |
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
382 |
|
383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
}
|
385 |
-
else {
|
|
|
|
|
386 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/Registred', '' );
|
387 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NwAuthKey', '' );
|
388 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/SellerCode', '' );
|
@@ -390,17 +409,18 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
390 |
if(isset($string->Status)){
|
391 |
Mage::log($string->Status);
|
392 |
} else {
|
393 |
-
Mage::log("
|
394 |
-
|
395 |
-
}
|
|
|
|
|
396 |
}
|
397 |
-
|
398 |
-
|
399 |
################################### Cross ##########################################
|
400 |
|
401 |
$AuthKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key citam
|
402 |
$NwAuthKey = Mage::getStoreConfig('nw_registration/settings1/NwAuthKey'); # NwAuthKey citam
|
403 |
-
$SellerCode = Mage::getStoreConfig('nw_registration/settings1/SellerCode'); #
|
404 |
|
405 |
|
406 |
if($AuthKey == null || $AuthKey == '' || $AuthKey == ' '){
|
@@ -411,7 +431,9 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
411 |
|
412 |
$auth_key = md5($AuthKey);
|
413 |
|
414 |
-
$baseUrl
|
|
|
|
|
415 |
|
416 |
|
417 |
$ProductFeedUrl = $baseUrl . 'nextwidgets/product/getv4?auth_key=' . $auth_key;
|
@@ -424,7 +446,7 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
424 |
|
425 |
if(!isset($string->NwAuthKey)) {
|
426 |
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
427 |
-
exit;
|
428 |
}
|
429 |
|
430 |
$PageSize = Mage::getModel('catalog/product')->getCollection()->count(); // Number of products
|
@@ -438,12 +460,13 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
438 |
"PageSize" => $PageSize,
|
439 |
"ProductFeedUrl" => $ProductFeedUrl,
|
440 |
"SellerCode" => $string->SellerCode,
|
441 |
-
"SellerUrl" => $baseUrl
|
|
|
442 |
|
443 |
);
|
444 |
|
445 |
-
$data_string = json_encode($fields);
|
446 |
-
$json_url = '
|
447 |
|
448 |
$ch = curl_init($json_url);
|
449 |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
@@ -457,14 +480,9 @@ class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Admi
|
|
457 |
$result = curl_exec($ch);
|
458 |
|
459 |
Mage::app()->getCache()->clean();
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
################################### Cross ##########################################
|
464 |
-
|
465 |
-
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
466 |
-
Mage::app()->getCache()->clean();
|
467 |
}
|
468 |
-
|
|
|
469 |
|
470 |
}
|
22 |
return Mage::getStoreConfig('nw_registration/settings1/Registred');
|
23 |
}
|
24 |
|
25 |
+
public function indexAction()
|
26 |
{
|
27 |
+
|
28 |
if($this->registredAction() && Mage::getStoreConfig('nw_registration/settings1/Registred') != false) $this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
29 |
|
30 |
// Add NextPromote Version
|
52 |
{
|
53 |
$post = $this->getRequest()->getPost();
|
54 |
|
55 |
+
|
56 |
try {
|
57 |
if (empty($post)) {
|
58 |
+
// Mage::throwException($this->__('Invalid form data.'));
|
59 |
+
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
60 |
}
|
|
|
61 |
|
62 |
+
|
63 |
+
$this->loginpostAction();
|
64 |
+
|
65 |
+
|
66 |
+
$message = $this->__('Success! You are registred to NextPromote');
|
67 |
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
68 |
} catch (Exception $e) {
|
69 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
70 |
}
|
71 |
#$this->_redirect('*/*');
|
72 |
|
73 |
+
// ################################################
|
74 |
+
// $html_block_test = "";
|
75 |
+
// foreach ($post as $key=>$posts){
|
76 |
+
// $html_block_test .= $posts . "<br />";
|
77 |
+
// }
|
78 |
+
// ################################################
|
79 |
|
80 |
+
// $this->loadLayout();
|
81 |
+
// $this->_setActiveMenu('promo');
|
82 |
|
83 |
+
// $block = $this->getLayout()->createBlock(
|
84 |
+
// 'Mage_Core_Block_Template',
|
85 |
+
// 'registration_2_block',
|
86 |
+
// // array('template' => 'nextwidgets_registration/registration2.phtml')
|
87 |
+
// array('template' => 'nextwidgets_registration/registration.phtml')
|
88 |
+
// );
|
89 |
|
90 |
+
// $this->getLayout()->getBlock('content')->append($block);
|
91 |
|
92 |
+
// //Release layout stream... lol... sounds fancy
|
93 |
+
// $this->renderLayout();
|
94 |
+
|
95 |
+
|
96 |
}
|
97 |
public function post2Action()
|
98 |
{
|
137 |
} else {
|
138 |
$store = Mage::app()->getStore($params['store']);
|
139 |
}
|
140 |
+
/*
|
141 |
// Auth key
|
142 |
$AuthKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key citam
|
143 |
if($AuthKey == null || $AuthKey == '' || $AuthKey == ' '){
|
148 |
// Mage::getModel('core/config')->saveConfig('nw_registration/settings1/auth_key', '' );
|
149 |
// $AuthKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key
|
150 |
|
151 |
+
*/
|
152 |
+
|
153 |
+
$AuthKey = Mage::helper('nextpromote/registration')->authKey();
|
154 |
|
155 |
$currentCurrencyCode = Mage::helper('nextpromote/registration')->currentCurrencyCode();
|
156 |
$languageId = Mage::helper('nextpromote/registration')->languageId();
|
168 |
$OrderFeedUrl = $baseUrl . 'nextwidgets/order/get?orderId={0}&auth_key=' . $auth_key;
|
169 |
$ServiceControll = $baseUrl . 'index.php/nw_registration/service?auth_key=' . $auth_key;
|
170 |
$CartToCartTransferUrl = $baseUrl . 'nextwidgets/order/commit?auth_key=' . $auth_key;
|
|
|
171 |
$SellerName = $company_name;
|
172 |
|
173 |
# http://linux.nextwidgets.com/test5/index.php/nw_registration/service?auth_key=88ce73ddfd317183378b4444c76deacc
|
346 |
$email = $_POST['email'];
|
347 |
$password = md5($_POST['password']);
|
348 |
|
349 |
+
# zc_151_1_2@mailinator.com&password=098f6bcd4621d373cade4e832627b4f6 (test)
|
|
|
350 |
|
351 |
$qry_str = '?email=' . $email . '&password=' . $password;
|
352 |
+
$ch = curl_init();
|
353 |
+
|
354 |
+
// Set query data here with the URL
|
355 |
+
$json_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url3') . '/API/rest/seller/getbyuser';
|
356 |
+
|
357 |
+
curl_setopt($ch, CURLOPT_URL, $json_url . $qry_str);
|
358 |
|
|
|
|
|
359 |
|
360 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
361 |
curl_setopt($ch, CURLOPT_TIMEOUT, '3');
|
362 |
$content = trim(curl_exec($ch));
|
363 |
curl_close($ch);
|
|
|
|
|
|
|
|
|
|
|
364 |
|
365 |
###################################################################################################
|
366 |
$string = json_decode($content);
|
370 |
|
371 |
|
372 |
if(isset($string->Status) && $string->Status == 'Success'){
|
373 |
+
echo 1;
|
374 |
+
var_dump($string->Status);
|
375 |
$order_home_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url3');
|
376 |
|
377 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NwAuthKey', $string->NwAuthKey ); //OK
|
385 |
|
386 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/order_home_url', $order_home_url ); // if case of uninstall plugin
|
387 |
|
|
|
388 |
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
389 |
|
390 |
|
391 |
+
}elseif($string->Status =='WrongLogin'){
|
392 |
+
|
393 |
+
Mage::getSingleton('adminhtml/session')->addError('Wrong Credentials, please enter your email and password from NextPromote.com');
|
394 |
+
var_dump($string->Status);
|
395 |
+
// Mage::log("Error during login on NextPromote. Wrong username or password!");
|
396 |
+
|
397 |
+
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_registration/index'));
|
398 |
+
|
399 |
+
|
400 |
+
|
401 |
}
|
402 |
+
else {
|
403 |
+
Mage::getSingleton('adminhtml/session')->addError('Error, please try again or contact our tehnical support at NextPromote.com');
|
404 |
+
|
405 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/Registred', '' );
|
406 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NwAuthKey', '' );
|
407 |
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/SellerCode', '' );
|
409 |
if(isset($string->Status)){
|
410 |
Mage::log($string->Status);
|
411 |
} else {
|
412 |
+
Mage::log("There is no Status recived!");
|
413 |
+
// $this->_redirect('*/adminhtml_index/error');
|
414 |
+
}
|
415 |
+
$this->_redirect('nextwidgets/adminhtml_index/index');
|
416 |
+
|
417 |
}
|
418 |
+
|
|
|
419 |
################################### Cross ##########################################
|
420 |
|
421 |
$AuthKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key citam
|
422 |
$NwAuthKey = Mage::getStoreConfig('nw_registration/settings1/NwAuthKey'); # NwAuthKey citam
|
423 |
+
$SellerCode = Mage::getStoreConfig('nw_registration/settings1/SellerCode'); # SellerCode citam
|
424 |
|
425 |
|
426 |
if($AuthKey == null || $AuthKey == '' || $AuthKey == ' '){
|
431 |
|
432 |
$auth_key = md5($AuthKey);
|
433 |
|
434 |
+
$baseUrl = Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ########### ########### ########### ########### ###########
|
435 |
+
$register_url = Mage::getStoreConfig('nw_registration/settings1/register_url');
|
436 |
+
|
437 |
|
438 |
|
439 |
$ProductFeedUrl = $baseUrl . 'nextwidgets/product/getv4?auth_key=' . $auth_key;
|
446 |
|
447 |
if(!isset($string->NwAuthKey)) {
|
448 |
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
449 |
+
exit();
|
450 |
}
|
451 |
|
452 |
$PageSize = Mage::getModel('catalog/product')->getCollection()->count(); // Number of products
|
460 |
"PageSize" => $PageSize,
|
461 |
"ProductFeedUrl" => $ProductFeedUrl,
|
462 |
"SellerCode" => $string->SellerCode,
|
463 |
+
"SellerUrl" => $baseUrl,
|
464 |
+
"ShopIntegrationType" => 1
|
465 |
|
466 |
);
|
467 |
|
468 |
+
$data_string = json_encode($fields);
|
469 |
+
$json_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url3') . '/api/rest/seller/add_details';
|
470 |
|
471 |
$ch = curl_init($json_url);
|
472 |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
480 |
$result = curl_exec($ch);
|
481 |
|
482 |
Mage::app()->getCache()->clean();
|
483 |
+
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
|
|
|
|
|
|
|
|
|
|
|
|
484 |
}
|
485 |
+
// Magento_new_demo@mailinator.com
|
486 |
+
// vukan123
|
487 |
|
488 |
}
|
app/code/local/NextWidgets/NextPromote/controllers/Adminhtml/RegistrationController1.php
ADDED
@@ -0,0 +1,481 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* NextWidgets **NOTICE OF LICENSE** This source file is subject to the EULA
|
5 |
+
* that is bundled with this package in the file LICENSE.pdf. It is also
|
6 |
+
* available through the world-wide-web at this URL:
|
7 |
+
* http://nextwidgets.com/magento_extension_license.pdf
|
8 |
+
* ================================================================= MAGENTO
|
9 |
+
* COMMUNITY EDITION USAGE NOTICE
|
10 |
+
* ================================================================= This
|
11 |
+
* package is designed for the Magento COMMUNITY edition This extension may not
|
12 |
+
* work on any other Magento edition except Magento COMMUNITY edition.
|
13 |
+
* NextWidgets does not provide extension support in case of incorrect edition
|
14 |
+
* usage. =================================================================
|
15 |
+
* Copyright (c) 2011 NextWidgets – ALENSA AG (http://www.nextwidgets.com)
|
16 |
+
* License http://nextwidgets.com/magento_extension_license.pdf
|
17 |
+
*/
|
18 |
+
|
19 |
+
class NextWidgets_NextPromote_Adminhtml_RegistrationController extends Mage_Adminhtml_Controller_Action
|
20 |
+
{
|
21 |
+
private function registredAction(){
|
22 |
+
return Mage::getStoreConfig('nw_registration/settings1/Registred');
|
23 |
+
}
|
24 |
+
|
25 |
+
public function indexAction()
|
26 |
+
{
|
27 |
+
if($this->registredAction() && Mage::getStoreConfig('nw_registration/settings1/Registred') != false) $this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
28 |
+
|
29 |
+
// Add NextPromote Version
|
30 |
+
$modules = Mage::getConfig()->getNode('modules')->children();
|
31 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NextPromoteVersion', $modules->NextWidgets_NextPromote->version );
|
32 |
+
|
33 |
+
|
34 |
+
//Get current layout state
|
35 |
+
$this->loadLayout();
|
36 |
+
$this->_setActiveMenu('promo');
|
37 |
+
|
38 |
+
$block = $this->getLayout()->createBlock(
|
39 |
+
'Mage_Core_Block_Template',
|
40 |
+
'registration_1_block',
|
41 |
+
array('template' => 'nextwidgets_registration/registration.phtml')
|
42 |
+
);
|
43 |
+
|
44 |
+
$this->getLayout()->getBlock('content')->append($block);
|
45 |
+
|
46 |
+
//Release layout stream... lol... sounds fancy
|
47 |
+
$this->renderLayout();
|
48 |
+
}
|
49 |
+
|
50 |
+
public function postAction()
|
51 |
+
{
|
52 |
+
$post = $this->getRequest()->getPost();
|
53 |
+
|
54 |
+
try {
|
55 |
+
if (empty($post)) {
|
56 |
+
Mage::throwException($this->__('Invalid form data.'));
|
57 |
+
}
|
58 |
+
|
59 |
+
|
60 |
+
$message = $this->__('One step is over, this is the final one!');
|
61 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
62 |
+
} catch (Exception $e) {
|
63 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
64 |
+
}
|
65 |
+
#$this->_redirect('*/*');
|
66 |
+
|
67 |
+
################################################
|
68 |
+
$html_block_test = "";
|
69 |
+
foreach ($post as $key=>$posts){
|
70 |
+
$html_block_test .= $posts . "<br />";
|
71 |
+
}
|
72 |
+
################################################
|
73 |
+
|
74 |
+
$this->loadLayout();
|
75 |
+
$this->_setActiveMenu('promo');
|
76 |
+
|
77 |
+
$block = $this->getLayout()->createBlock(
|
78 |
+
'Mage_Core_Block_Template',
|
79 |
+
'registration_2_block',
|
80 |
+
array('template' => 'nextwidgets_registration/registration2.phtml')
|
81 |
+
);
|
82 |
+
|
83 |
+
$this->getLayout()->getBlock('content')->append($block);
|
84 |
+
|
85 |
+
//Release layout stream... lol... sounds fancy
|
86 |
+
$this->renderLayout();
|
87 |
+
}
|
88 |
+
public function post2Action()
|
89 |
+
{
|
90 |
+
if($this->registredAction()) $this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
91 |
+
|
92 |
+
$post = $this->getRequest()->getPost();
|
93 |
+
try {
|
94 |
+
if (empty($post)) {
|
95 |
+
Mage::throwException($this->__('Invalid form data.'));
|
96 |
+
}
|
97 |
+
|
98 |
+
### here's your form processing ###
|
99 |
+
|
100 |
+
$message = $this->__('You registred successfully.');
|
101 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
102 |
+
} catch (Exception $e) {
|
103 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
104 |
+
}
|
105 |
+
|
106 |
+
################################################
|
107 |
+
|
108 |
+
|
109 |
+
if(isset($_POST['email'])) $email = $_POST['email'];
|
110 |
+
if(isset($_POST['password'])) $password = md5(trim($_POST['password']));
|
111 |
+
if(isset($_POST['company_name'])) $company_name = htmlentities($_POST['company_name']);
|
112 |
+
if(isset($_POST['first_name'])) $first_name = htmlentities($_POST['first_name']);
|
113 |
+
if(isset($_POST['last_name'])) $last_name = htmlentities($_POST['last_name']);
|
114 |
+
if(isset($_POST['phone'])) $phone = htmlentities($_POST['phone']);
|
115 |
+
if(isset($_POST['admin_key'])) $admin_key = htmlentities($_POST['admin_key']);
|
116 |
+
|
117 |
+
|
118 |
+
//extract data from the post
|
119 |
+
#extract($_POST);
|
120 |
+
$params = $this->getRequest()->getParams();
|
121 |
+
if (!isset($params['store'])) {
|
122 |
+
if (!isset($params['website'])) {
|
123 |
+
$store = Mage::app()->getStore(0);
|
124 |
+
} else {
|
125 |
+
$website = Mage::getModel('core/website')->load($params['website']);
|
126 |
+
$store = $website->getDefaultStore();
|
127 |
+
}
|
128 |
+
} else {
|
129 |
+
$store = Mage::app()->getStore($params['store']);
|
130 |
+
}
|
131 |
+
|
132 |
+
// Auth key
|
133 |
+
$AuthKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key citam
|
134 |
+
if($AuthKey == null || $AuthKey == '' || $AuthKey == ' '){
|
135 |
+
$AuthKey = $this->getUniqueCode(5) . sha1($email);
|
136 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/auth_key', $AuthKey );
|
137 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/md5_auth_key', md5($AuthKey) );
|
138 |
+
}
|
139 |
+
// Mage::getModel('core/config')->saveConfig('nw_registration/settings1/auth_key', '' );
|
140 |
+
// $AuthKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
$currentCurrencyCode = Mage::helper('nextpromote/registration')->currentCurrencyCode();
|
145 |
+
$languageId = Mage::helper('nextpromote/registration')->languageId();
|
146 |
+
$getBaseUrl = Mage::helper('nextpromote/registration')->getBaseUrl();
|
147 |
+
$countryCode = Mage::getStoreConfig('general/country/default');
|
148 |
+
$baseUrl = Mage::app()->getStore($store->getId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
149 |
+
$keyAdmin = Mage::app()->getRequest()->getParam('key');
|
150 |
+
|
151 |
+
############################# ############################# ############################# #############################
|
152 |
+
|
153 |
+
|
154 |
+
$auth_key = md5($AuthKey);
|
155 |
+
|
156 |
+
$ProductFeedUrl = $baseUrl . 'nextwidgets/product/getv4?auth_key=' . $auth_key;
|
157 |
+
$OrderFeedUrl = $baseUrl . 'nextwidgets/order/get?orderId={0}&auth_key=' . $auth_key;
|
158 |
+
$ServiceControll = $baseUrl . 'index.php/nw_registration/service?auth_key=' . $auth_key;
|
159 |
+
$CartToCartTransferUrl = $baseUrl . 'nextwidgets/order/commit?auth_key=' . $auth_key;
|
160 |
+
$CartToCartTransferUrl = $baseUrl . 'nextwidgets/order/commit?auth_key=' . $auth_key;
|
161 |
+
$SellerName = $company_name;
|
162 |
+
|
163 |
+
# http://linux.nextwidgets.com/test5/index.php/nw_registration/service?auth_key=88ce73ddfd317183378b4444c76deacc
|
164 |
+
|
165 |
+
// $json_url = 'https://widget.nextwidgets.com/api/rest/seller/add';
|
166 |
+
$order_home_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url3');
|
167 |
+
$json_url = $order_home_url . '/api/rest/seller/add';
|
168 |
+
|
169 |
+
################################### TEST ONLY ########################################
|
170 |
+
$fields_string = '';
|
171 |
+
//set POST variables
|
172 |
+
$url = 'http://www.webdesign.co.rs/post.php';
|
173 |
+
$fields = array(
|
174 |
+
"AuthKey" => $auth_key,
|
175 |
+
"ServiceControll" => $ServiceControll,
|
176 |
+
"CartToCartTransferUrl" => $CartToCartTransferUrl,
|
177 |
+
"CountryCode" => $countryCode,
|
178 |
+
"CurrencyCode" => $currentCurrencyCode,
|
179 |
+
"Email" => $email,
|
180 |
+
"FirstName" => $first_name,
|
181 |
+
"LanguageCode" => $languageId,
|
182 |
+
"LastName" => $last_name,
|
183 |
+
"OrderFeedUrl" => $OrderFeedUrl,
|
184 |
+
"Password" => $password,
|
185 |
+
"ProductFeedUrl" => $ProductFeedUrl,
|
186 |
+
"SellerName" => $company_name,
|
187 |
+
"SellerUrl" => $baseUrl,
|
188 |
+
"ShopIntegrationType" => 1
|
189 |
+
);
|
190 |
+
|
191 |
+
//url-ify the data for the POST
|
192 |
+
foreach($fields as $key=>$value) {
|
193 |
+
$fields_string .= $key.'='.$value.'&';
|
194 |
+
}
|
195 |
+
rtrim($fields_string,'&');
|
196 |
+
|
197 |
+
//open connection
|
198 |
+
$ch = curl_init();
|
199 |
+
|
200 |
+
//set the url, number of POST vars, POST data
|
201 |
+
curl_setopt($ch,CURLOPT_URL,$url);
|
202 |
+
curl_setopt($ch,CURLOPT_POST,count($fields));
|
203 |
+
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
|
204 |
+
|
205 |
+
//execute post
|
206 |
+
$result = curl_exec($ch);
|
207 |
+
|
208 |
+
//close connection
|
209 |
+
curl_close($ch);
|
210 |
+
################################### TEST ONLY ########################################
|
211 |
+
|
212 |
+
$fields = array(
|
213 |
+
|
214 |
+
"AuthKey" => $auth_key,
|
215 |
+
"CartToCartTransferUrl" => $CartToCartTransferUrl,
|
216 |
+
"CountryCode" => $countryCode,
|
217 |
+
"CurrencyCode" => $currentCurrencyCode,
|
218 |
+
"Email" => $email,
|
219 |
+
"FirstName" => $first_name,
|
220 |
+
"LanguageCode" => $languageId,
|
221 |
+
"LastName" => $last_name,
|
222 |
+
"OrderFeedUrl" => $OrderFeedUrl,
|
223 |
+
"Password" => $password,
|
224 |
+
"ProductFeedUrl" => $ProductFeedUrl,
|
225 |
+
"SellerName" => $company_name,
|
226 |
+
"SellerUrl" => $baseUrl,
|
227 |
+
"ShopIntegrationType" => 1
|
228 |
+
);
|
229 |
+
|
230 |
+
// jSON String for request
|
231 |
+
$json_string = json_encode($fields);
|
232 |
+
|
233 |
+
// jSON String for request
|
234 |
+
|
235 |
+
// Initializing curl
|
236 |
+
$ch = curl_init( $json_url );
|
237 |
+
|
238 |
+
// Configuring curl options
|
239 |
+
$options = array(
|
240 |
+
CURLOPT_RETURNTRANSFER => true,
|
241 |
+
CURLOPT_HTTPHEADER => array('Content-type: application/json') ,
|
242 |
+
CURLOPT_POSTFIELDS => $json_string
|
243 |
+
);
|
244 |
+
|
245 |
+
// Setting curl options
|
246 |
+
curl_setopt_array( $ch, $options );
|
247 |
+
|
248 |
+
// Getting results
|
249 |
+
$result = curl_exec($ch); // Getting jSON result string
|
250 |
+
|
251 |
+
|
252 |
+
$string = json_decode($result);
|
253 |
+
|
254 |
+
Mage::app()->getCache()->clean();
|
255 |
+
|
256 |
+
if(isset($string->Status) && $string->Status == 'Success'){
|
257 |
+
|
258 |
+
$order_home_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url3');
|
259 |
+
|
260 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NwAuthKey', $string->NwAuthKey );
|
261 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/SellerCode', $string->SellerCode );
|
262 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/SellerName', $company_name );
|
263 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/order_home_url', $order_home_url ); // if case of uninstall plugin
|
264 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/Registred', 'true' );
|
265 |
+
|
266 |
+
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
267 |
+
}
|
268 |
+
else {
|
269 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/Registred', '' );
|
270 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NwAuthKey', '' );
|
271 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/SellerCode', '' );
|
272 |
+
|
273 |
+
if(isset($string->Status)){
|
274 |
+
Mage::log($string->Status);
|
275 |
+
} else {
|
276 |
+
Mage::log("Error during registration on NextPromote. There is no Status recived!");
|
277 |
+
$this->_redirect('*/adminhtml_index/error');
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
############################# ############################# ############################# #############################
|
282 |
+
|
283 |
+
|
284 |
+
$html_block_test = "";
|
285 |
+
foreach ($post as $key=>$posts){
|
286 |
+
$html_block_test .= $posts . "<br />";
|
287 |
+
}
|
288 |
+
|
289 |
+
$this->loadLayout();
|
290 |
+
|
291 |
+
$block = $this->getLayout()->createBlock(
|
292 |
+
'Mage_Core_Block_Template',
|
293 |
+
'registration_3_block',
|
294 |
+
array('template' => 'nextwidgets_registration/registration3.phtml')
|
295 |
+
);
|
296 |
+
|
297 |
+
$this->getLayout()->getBlock('content')->append($block);
|
298 |
+
|
299 |
+
//Release layout stream... lol... sounds fancy
|
300 |
+
$this->renderLayout();
|
301 |
+
# $this->_redirect('*/adminhtml_index/index');
|
302 |
+
}
|
303 |
+
private function getUniqueCode($length = "")
|
304 |
+
{
|
305 |
+
$code = md5(uniqid(rand(), true));
|
306 |
+
if ($length != "") return substr($code, 0, $length);
|
307 |
+
else return $code;
|
308 |
+
}
|
309 |
+
|
310 |
+
public function loginAction()
|
311 |
+
{
|
312 |
+
|
313 |
+
#$this->_redirect('*/*');
|
314 |
+
|
315 |
+
################################################
|
316 |
+
$html_block_test = "";
|
317 |
+
|
318 |
+
################################################
|
319 |
+
|
320 |
+
$this->loadLayout();
|
321 |
+
$this->_setActiveMenu('promo');
|
322 |
+
|
323 |
+
$block = $this->getLayout()->createBlock(
|
324 |
+
'Mage_Core_Block_Template',
|
325 |
+
'registration_2_block',
|
326 |
+
array('template' => 'nextwidgets_registration/login.phtml')
|
327 |
+
);
|
328 |
+
|
329 |
+
$this->getLayout()->getBlock('content')->append($block);
|
330 |
+
|
331 |
+
//Release layout stream... lol... sounds fancy
|
332 |
+
$this->renderLayout();
|
333 |
+
}
|
334 |
+
public function loginpostAction()
|
335 |
+
{
|
336 |
+
$email = $_POST['email'];
|
337 |
+
$password = md5($_POST['password']);
|
338 |
+
|
339 |
+
# $email = 'alex.savic@nextwidgets.com';
|
340 |
+
# $password = '7694f4a66316e53c8cdd9d9954bd611d';
|
341 |
+
|
342 |
+
$qry_str = '?email=' . $email . '&password=' . $password;
|
343 |
+
$ch = curl_init();
|
344 |
+
|
345 |
+
// Set query data here with the URL
|
346 |
+
|
347 |
+
$json_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url3') . '/API/rest/seller/getbyuser';
|
348 |
+
|
349 |
+
echo $json_url;
|
350 |
+
|
351 |
+
exit();
|
352 |
+
|
353 |
+
curl_setopt($ch, CURLOPT_URL, $json_url . $qry_str);
|
354 |
+
|
355 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
356 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, '3');
|
357 |
+
$content = trim(curl_exec($ch));
|
358 |
+
curl_close($ch);
|
359 |
+
|
360 |
+
echo "<pre>";
|
361 |
+
$string = json_decode($content);
|
362 |
+
print_r ($string);
|
363 |
+
echo "<pre>";
|
364 |
+
|
365 |
+
###################################################################################################
|
366 |
+
$string = json_decode($content);
|
367 |
+
|
368 |
+
Mage::app()->getCache()->clean();
|
369 |
+
|
370 |
+
|
371 |
+
|
372 |
+
if(isset($string->Status) && $string->Status == 'Success'){
|
373 |
+
|
374 |
+
$order_home_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url3');
|
375 |
+
|
376 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NwAuthKey', $string->NwAuthKey ); //OK
|
377 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/SellerCode', $string->SellerCode ); //OK
|
378 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/SellerName', $string->SellerName); //OK
|
379 |
+
|
380 |
+
if($string->NwAuthKey != '' || $string->NwAuthKey != null){
|
381 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/Registred', 'true' );
|
382 |
+
}
|
383 |
+
|
384 |
+
|
385 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/order_home_url', $order_home_url ); // if case of uninstall plugin
|
386 |
+
|
387 |
+
|
388 |
+
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
389 |
+
|
390 |
+
|
391 |
+
}
|
392 |
+
else {
|
393 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/Registred', '' );
|
394 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NwAuthKey', '' );
|
395 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/SellerCode', '' );
|
396 |
+
|
397 |
+
if(isset($string->Status)){
|
398 |
+
Mage::log($string->Status);
|
399 |
+
} else {
|
400 |
+
Mage::log("Error during login on NextPromote. There is no Status recived!");
|
401 |
+
$this->_redirect('*/adminhtml_index/error');
|
402 |
+
}
|
403 |
+
}
|
404 |
+
|
405 |
+
|
406 |
+
################################### Cross ##########################################
|
407 |
+
|
408 |
+
$AuthKey = Mage::getStoreConfig('nw_registration/settings1/auth_key'); # auth_key citam
|
409 |
+
$NwAuthKey = Mage::getStoreConfig('nw_registration/settings1/NwAuthKey'); # NwAuthKey citam
|
410 |
+
$SellerCode = Mage::getStoreConfig('nw_registration/settings1/SellerCode'); # auth_key citam
|
411 |
+
|
412 |
+
|
413 |
+
if($AuthKey == null || $AuthKey == '' || $AuthKey == ' '){
|
414 |
+
$AuthKey = $this->getUniqueCode(5) . sha1($SellerCode);
|
415 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/auth_key', $AuthKey );
|
416 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/md5_auth_key', md5($AuthKey));
|
417 |
+
}
|
418 |
+
|
419 |
+
$auth_key = md5($AuthKey);
|
420 |
+
|
421 |
+
$baseUrl = Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
422 |
+
|
423 |
+
|
424 |
+
$ProductFeedUrl = $baseUrl . 'nextwidgets/product/getv4?auth_key=' . $auth_key;
|
425 |
+
$OrderFeedUrl = $baseUrl . 'nextwidgets/order/get?orderId={0}&auth_key=' . $auth_key;
|
426 |
+
$ServiceControll = $baseUrl . 'index.php/nw_registration/service?auth_key=' . $auth_key;
|
427 |
+
$CartToCartTransferUrl = $baseUrl . 'nextwidgets/order/commit?auth_key=' . $auth_key;
|
428 |
+
|
429 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/md5_auth_key', $auth_key);
|
430 |
+
|
431 |
+
|
432 |
+
if(!isset($string->NwAuthKey)) {
|
433 |
+
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
434 |
+
exit;
|
435 |
+
}
|
436 |
+
|
437 |
+
$PageSize = Mage::getModel('catalog/product')->getCollection()->count(); // Number of products
|
438 |
+
|
439 |
+
$fields = array(
|
440 |
+
|
441 |
+
"AuthKey" => $auth_key,
|
442 |
+
"CartToCartTransferUrl" => $CartToCartTransferUrl,
|
443 |
+
"NwAuthKey" => $string->NwAuthKey,
|
444 |
+
"OrderFeedUrl" => $OrderFeedUrl,
|
445 |
+
"PageSize" => $PageSize,
|
446 |
+
"ProductFeedUrl" => $ProductFeedUrl,
|
447 |
+
"SellerCode" => $string->SellerCode,
|
448 |
+
"SellerUrl" => $baseUrl
|
449 |
+
|
450 |
+
);
|
451 |
+
|
452 |
+
$data_string = json_encode($fields);
|
453 |
+
// $json_url = 'http://dev.nextwidgets.com/api/rest/seller/add_details';
|
454 |
+
|
455 |
+
$json_url = Mage::getStoreConfig('nw_registration/settings1/order_home_url3') . '/api/rest/seller/add_details';
|
456 |
+
|
457 |
+
echo '$json_url' . $json_url;
|
458 |
+
|
459 |
+
$ch = curl_init($json_url);
|
460 |
+
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
461 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
|
462 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
463 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
464 |
+
'Content-Type: application/json',
|
465 |
+
'Content-Length: ' . strlen($data_string))
|
466 |
+
);
|
467 |
+
|
468 |
+
$result = curl_exec($ch);
|
469 |
+
|
470 |
+
Mage::app()->getCache()->clean();
|
471 |
+
|
472 |
+
|
473 |
+
|
474 |
+
################################### Cross ##########################################
|
475 |
+
|
476 |
+
$this->_redirectUrl($this->getUrl('nextwidgets/adminhtml_index/index'));
|
477 |
+
Mage::app()->getCache()->clean();
|
478 |
+
}
|
479 |
+
|
480 |
+
|
481 |
+
}
|
app/code/local/NextWidgets/NextPromote/controllers/IndexController.php
CHANGED
@@ -11,8 +11,8 @@ class NextWidgets_Registration_IndexController extends Mage_Core_Controller_Fro
|
|
11 |
|
12 |
class NextWidgets_NextPromote_IndexController extends Mage_Core_Controller_Front_Action{
|
13 |
|
14 |
-
public function indexAction(){
|
15 |
-
|
16 |
echo "neka funkcija :)";
|
17 |
|
18 |
}
|
11 |
|
12 |
class NextWidgets_NextPromote_IndexController extends Mage_Core_Controller_Front_Action{
|
13 |
|
14 |
+
public function indexAction(){
|
15 |
+
|
16 |
echo "neka funkcija :)";
|
17 |
|
18 |
}
|
app/code/local/NextWidgets/NextPromote/controllers/RegistrationController.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class NextWidgets_NextPromote_RegistrationController extends Mage_Core_Controller_Front_Action {
|
4 |
+
|
5 |
+
private $jsonResponse = array ();
|
6 |
+
|
7 |
+
public function indexAction() {
|
8 |
+
|
9 |
+
if (! Mage::helper ( 'nextpromote/data' )->verifyKey ()) {
|
10 |
+
$this->_redirect ( 'noRoute' );
|
11 |
+
return false;
|
12 |
+
}
|
13 |
+
|
14 |
+
$this->jsonResponse($this->updateParams());
|
15 |
+
|
16 |
+
|
17 |
+
}
|
18 |
+
|
19 |
+
public function updateParams() {
|
20 |
+
if(
|
21 |
+
$this->getRequest()->getParam('nwAuthKey') &&
|
22 |
+
$this->getRequest()->getParam('sellerCode')
|
23 |
+
) {
|
24 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/NwAuthKey', $this->getRequest()->getParam('nwAuthKey') );
|
25 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/SellerCode', $this->getRequest()->getParam('sellerCode') );
|
26 |
+
Mage::getModel('core/config')->saveConfig('nw_registration/settings1/Registred', 'true' );
|
27 |
+
|
28 |
+
return 'Success';
|
29 |
+
} else {
|
30 |
+
return 'WrongParams';
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
public function jsonResponse($jsonResponse){
|
35 |
+
header ( 'Content-type: text/json' );
|
36 |
+
header ( "Cache-Control: no-cache, must-revalidate" ); // HTTP/1.1*/
|
37 |
+
echo json_encode ( $jsonResponse );
|
38 |
+
|
39 |
+
}
|
40 |
+
}
|
app/code/local/NextWidgets/NextPromote/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<NextWidgets_NextPromote>
|
5 |
-
<version>
|
6 |
</NextWidgets_NextPromote>
|
7 |
</modules>
|
8 |
|
@@ -193,16 +193,16 @@
|
|
193 |
<default>
|
194 |
<nw_registration>
|
195 |
<settings1>
|
196 |
-
<order_home_url3>https://
|
197 |
-
<order_home_url2>https://
|
|
|
198 |
<type_commit>0</type_commit>
|
199 |
<manual_override>0</manual_override>
|
200 |
<test_module>0</test_module>
|
201 |
<large_thumbnail_size>400</large_thumbnail_size>
|
202 |
<small_thumbnail_size>200</small_thumbnail_size>
|
|
|
203 |
<quality>80</quality>
|
204 |
-
|
205 |
-
|
206 |
</settings1>
|
207 |
</nw_registration>
|
208 |
</default>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<NextWidgets_NextPromote>
|
5 |
+
<version>2.0.0</version>
|
6 |
</NextWidgets_NextPromote>
|
7 |
</modules>
|
8 |
|
193 |
<default>
|
194 |
<nw_registration>
|
195 |
<settings1>
|
196 |
+
<order_home_url3>https://dev.nextwidgets.com</order_home_url3>
|
197 |
+
<order_home_url2>https://dev.</order_home_url2>
|
198 |
+
<register_url>/admin/sellermvc3/accounts/new</register_url>
|
199 |
<type_commit>0</type_commit>
|
200 |
<manual_override>0</manual_override>
|
201 |
<test_module>0</test_module>
|
202 |
<large_thumbnail_size>400</large_thumbnail_size>
|
203 |
<small_thumbnail_size>200</small_thumbnail_size>
|
204 |
+
<page_size>5000</page_size>
|
205 |
<quality>80</quality>
|
|
|
|
|
206 |
</settings1>
|
207 |
</nw_registration>
|
208 |
</default>
|
app/design/adminhtml/default/default/template/nextwidgets_registration/registration.phtml
CHANGED
@@ -1,23 +1,490 @@
|
|
1 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
}
|
6 |
-
|
7 |
-
|
|
|
|
|
8 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
</style>
|
10 |
-
|
11 |
-
|
12 |
<tr>
|
13 |
-
<td><h3>Create a NextWidgets Account, It's free!</h3></td>
|
14 |
-
|
15 |
-
<td class="a-right">
|
16 |
-
<button onclick="editForm.submit()" class="scalable save" type="button"><span>Create a free account!</span></button>
|
17 |
-
</td>
|
18 |
</tr>
|
19 |
</table>
|
20 |
-
|
|
|
|
|
21 |
<div class="entry-edit">
|
22 |
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post')?>">
|
23 |
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
@@ -32,11 +499,11 @@ button, .form-button {
|
|
32 |
</table>
|
33 |
|
34 |
</fieldset>
|
35 |
-
|
36 |
<fieldset id="my-fieldset">
|
37 |
<table cellspacing="0" class="form-list">
|
38 |
<tr>
|
39 |
-
<td class="label">
|
40 |
|
41 |
<td class="input-ele"><input class="input-text required-entry validate-email" name="email" value='<?php echo Mage::getSingleton('admin/session')->getUser()->getData('email'); ?>'/></td>
|
42 |
</tr>
|
@@ -59,6 +526,56 @@ button, .form-button {
|
|
59 |
</fieldset>
|
60 |
</form>
|
61 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
<script type="text/javascript">
|
63 |
var editForm = new varienForm('edit_form');
|
64 |
</script>
|
1 |
<style>
|
2 |
+
body, div, ul, li, p, h1, h2, h3, h4, a, select, form, button, span, input, table, th, tr, td {
|
3 |
+
padding:0px;
|
4 |
+
margin:0px;
|
5 |
+
text-decoration: none;
|
6 |
+
list-style: none;
|
7 |
+
}
|
8 |
+
img, table, th, tr, td {
|
9 |
+
border: none;
|
10 |
+
outline: none;
|
11 |
+
}
|
12 |
+
h1, h2, h3, h4 {
|
13 |
+
font-weight: normal;
|
14 |
+
}
|
15 |
+
button, input {
|
16 |
+
/*-webkit-appearance: caret;*/
|
17 |
+
background: none;
|
18 |
+
border: none;
|
19 |
+
}
|
20 |
+
textarea, img, input, label, checkobox, a {
|
21 |
+
outline: none;
|
22 |
+
}
|
23 |
+
|
24 |
+
.float-left {
|
25 |
+
float: left;
|
26 |
+
}
|
27 |
+
.float-right {
|
28 |
+
float: right;
|
29 |
+
}
|
30 |
+
.transition {
|
31 |
+
-moz-transition: all 0.3s ease;
|
32 |
+
-webkit-transition: all 0.3s ease;
|
33 |
+
-o-transition: all 0.3s ease;
|
34 |
+
}
|
35 |
+
label {
|
36 |
+
display: block;
|
37 |
+
margin: 10px 0;
|
38 |
+
font-size: 11px;
|
39 |
+
text-align: left;
|
40 |
+
text-transform: uppercase;
|
41 |
+
color: #ccc;
|
42 |
+
}
|
43 |
+
.insent-line {
|
44 |
+
border-top: 1px solid #bcbec0;
|
45 |
+
border-bottom: 1px solid white;
|
46 |
+
}
|
47 |
+
.left-margin {
|
48 |
+
margin: 0 0 30px 25px;
|
49 |
+
}
|
50 |
+
.no-left-margin {
|
51 |
+
margin: 0 0 30px 0;
|
52 |
+
}
|
53 |
+
.margin-auto {
|
54 |
+
margin: 0 auto;
|
55 |
+
}
|
56 |
+
.login2{
|
57 |
+
margin-top: -50px;
|
58 |
+
|
59 |
+
}
|
60 |
+
.login, .signup {
|
61 |
+
display: block;
|
62 |
+
cursor: pointer;
|
63 |
+
width: 228px;
|
64 |
+
height: 40px;
|
65 |
+
line-height: 40px;
|
66 |
+
font-size: 12px;
|
67 |
+
text-align: center;
|
68 |
+
color: white;
|
69 |
+
background-color: #90c547; /* Old browsers */
|
70 |
+
background: -moz-linear-gradient(top, #90c547 0%, #90c547 26%, #55940e 100%); /* FF3.6+ */
|
71 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#90c547), color-stop(26%,#90c547), color-stop(100%,#55940e)); /* Chrome,Safari4+ */
|
72 |
+
background: -webkit-linear-gradient(top, #90c547 0%,#90c547 26%,#55940e 100%); /* Chrome10+,Safari5.1+ */
|
73 |
+
background: -o-linear-gradient(top, #90c547 0%,#90c547 26%,#55940e 100%); /* Opera 11.10+ */
|
74 |
+
background: linear-gradient(to bottom, #90c547 0%,#90c547 26%,#55940e 100%); /* W3C */
|
75 |
+
background: -ms-linear-gradient(top, #90c547 0%,#90c547 26%,#55940e 100%); /* IE10+ */
|
76 |
+
|
77 |
+
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#90c547', endColorstr='#55940e',GradientType=0 );*/ /* IE6-9 */
|
78 |
+
border: 1px solid #464648;
|
79 |
+
border-radius: 5px;
|
80 |
+
}
|
81 |
+
.login.ie, .signup.ie {
|
82 |
+
background: url("https://widget.nextwidgets.com/Admin/sellermvc3/content/images/btn-green-bgr.png") repeat;
|
83 |
+
}
|
84 |
+
.login:hover, .signup:hover {
|
85 |
+
/*background: #333;*/
|
86 |
+
background: #55940e; /* Old browsers */
|
87 |
+
background: -moz-linear-gradient(top, #55940e 0%, #90c547 74%, #90c547 100%); /* FF3.6+ */
|
88 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#55940e), color-stop(74%,#90c547), color-stop(100%,#90c547)); /* Chrome,Safari4+ */
|
89 |
+
background: -webkit-linear-gradient(top, #55940e 0%,#90c547 74%,#90c547 100%); /* Chrome10+,Safari5.1+ */
|
90 |
+
background: -o-linear-gradient(top, #55940e 0%,#90c547 74%,#90c547 100%); /* Opera 11.10+ */
|
91 |
+
background: -ms-linear-gradient(top, #55940e 0%,#90c547 74%,#90c547 100%); /* IE10+ */
|
92 |
+
background: linear-gradient(to bottom, #55940e 0%,#90c547 74%,#90c547 100%); /* W3C */
|
93 |
+
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#55940e', endColorstr='#90c547',GradientType=0 );*/ /* IE6-9 */
|
94 |
+
|
95 |
+
}
|
96 |
+
.login.ie:hover, .signup.ie:hover {
|
97 |
+
background: url("https://widget.nextwidgets.com/Admin/sellermvc3/content/images/btn-green-hover-bgr.png") repeat;
|
98 |
+
}
|
99 |
+
.pl-download-btn, .pl-download-btn:link, .pl-download-btn:visited, .pl-download-btn:active {
|
100 |
+
-webkit-box-sizing: border-box;
|
101 |
+
-moz-box-sizing: border-box;
|
102 |
+
box-sizing: border-box;
|
103 |
+
display: block;
|
104 |
+
width: 123px;
|
105 |
+
height: 40px;
|
106 |
+
font-size: 12px;
|
107 |
+
line-height: 40px;
|
108 |
+
text-align: center;
|
109 |
+
text-transform: uppercase;
|
110 |
+
color: white;
|
111 |
+
border: 1px solid #414042;
|
112 |
+
border-radius: 5px;
|
113 |
+
text-shadow: 0px -1px 0 #000;
|
114 |
+
background: #bcbcbd; /* Old browsers */
|
115 |
+
background: -moz-linear-gradient(top, #bcbcbd 0%, #514f50 100%); /* FF3.6+ */
|
116 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#bcbcbd), color-stop(100%,#514f50)); /* Chrome,Safari4+ */
|
117 |
+
background: -webkit-linear-gradient(top, #bcbcbd 0%,#514f50 100%); /* Chrome10+,Safari5.1+ */
|
118 |
+
background: -o-linear-gradient(top, #bcbcbd 0%,#514f50 100%); /* Opera 11.10+ */
|
119 |
+
background: -ms-linear-gradient(top, #bcbcbd 0%,#514f50 100%); /* IE10+ */
|
120 |
+
background: linear-gradient(to bottom, #bcbcbd 0%,#514f50 100%); /* W3C */
|
121 |
+
}
|
122 |
+
.pl-download-btn:hover {
|
123 |
+
background: #514f50; /* Old browsers */
|
124 |
+
background: -moz-linear-gradient(top, #514f50 0%, #bcbcbd 100%); /* FF3.6+ */
|
125 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#514f50), color-stop(100%,#bcbcbd)); /* Chrome,Safari4+ */
|
126 |
+
background: -webkit-linear-gradient(top, #514f50 0%,#bcbcbd 100%); /* Chrome10+,Safari5.1+ */
|
127 |
+
background: -o-linear-gradient(top, #514f50 0%,#bcbcbd 100%); /* Opera 11.10+ */
|
128 |
+
background: -ms-linear-gradient(top, #514f50 0%,#bcbcbd 100%); /* IE10+ */
|
129 |
+
background: linear-gradient(to bottom, #514f50 0%,#bcbcbd 100%); /* W3C */
|
130 |
+
}
|
131 |
+
.pl-install-btn, .pl-install-btn:link, .pl-install-btn:visited, .pl-install-btn:active {
|
132 |
+
-webkit-box-sizing: border-box;
|
133 |
+
-moz-box-sizing: border-box;
|
134 |
+
box-sizing: border-box;
|
135 |
+
display: block;
|
136 |
+
width: 123px;
|
137 |
+
height: 40px;
|
138 |
+
font-size: 12px;
|
139 |
+
line-height: 40px;
|
140 |
+
text-align: center;
|
141 |
+
text-transform: uppercase;
|
142 |
+
color: white;
|
143 |
+
border: 1px solid #414042;
|
144 |
+
border-radius: 5px;
|
145 |
+
text-shadow: 0px -1px 0 #000;
|
146 |
+
background: #8a8b8e; /* Old browsers */
|
147 |
+
background: -moz-linear-gradient(top, #8a8b8e 0%, #434041 100%); /* FF3.6+ */
|
148 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#8a8b8e), color-stop(100%,#434041)); /* Chrome,Safari4+ */
|
149 |
+
background: -webkit-linear-gradient(top, #8a8b8e 0%,#434041 100%); /* Chrome10+,Safari5.1+ */
|
150 |
+
background: -o-linear-gradient(top, #8a8b8e 0%,#434041 100%); /* Opera 11.10+ */
|
151 |
+
background: -ms-linear-gradient(top, #8a8b8e 0%,#434041 100%); /* IE10+ */
|
152 |
+
background: linear-gradient(to bottom, #8a8b8e 0%,#434041 100%); /* W3C */
|
153 |
+
}
|
154 |
+
.pl-install-btn:hover {
|
155 |
+
background: #434041; /* Old browsers */
|
156 |
+
background: -moz-linear-gradient(top, #434041 0%, #8a8b8e 100%); /* FF3.6+ */
|
157 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#434041), color-stop(100%,#8a8b8e)); /* Chrome,Safari4+ */
|
158 |
+
background: -webkit-linear-gradient(top, #434041 0%,#8a8b8e 100%); /* Chrome10+,Safari5.1+ */
|
159 |
+
background: -o-linear-gradient(top, #434041 0%,#8a8b8e 100%); /* Opera 11.10+ */
|
160 |
+
background: -ms-linear-gradient(top, #434041 0%,#8a8b8e 100%); /* IE10+ */
|
161 |
+
background: linear-gradient(to bottom, #434041 0%,#8a8b8e 100%); /* W3C */
|
162 |
+
}
|
163 |
+
.pl-download-btn.center {
|
164 |
+
width: 250px;
|
165 |
+
}
|
166 |
+
.pl-download-btn.ie {
|
167 |
+
background: url("https://widget.nextwidgets.com/Admin/sellermvc3/content/images/pl-download-btn-bgr.png") repeat;
|
168 |
+
}
|
169 |
+
.pl-download-btn.ie:hover {
|
170 |
+
background: url("https://widget.nextwidgets.com/Admin/sellermvc3/content/images/pl-download-btn-hover-bgr.png") repeat;
|
171 |
+
}
|
172 |
+
.pl-install-btn.ie {
|
173 |
+
background: url("https://widget.nextwidgets.com/Admin/sellermvc3/content/images/pl-install-btn-bgr.png") repeat;
|
174 |
+
}
|
175 |
+
.pl-install-btn.ie:hover {
|
176 |
+
background: url("https://widget.nextwidgets.com/Admin/sellermvc3/content/images/pl-install-btn-hover-bgr.png") repeat;
|
177 |
+
}
|
178 |
+
|
179 |
+
|
180 |
+
/* end of global ------------------------------- */
|
181 |
+
|
182 |
+
|
183 |
+
.header2 {
|
184 |
+
position: fixed;
|
185 |
+
top: 0px;
|
186 |
+
left: 0px;
|
187 |
+
height: 70px;
|
188 |
+
width: 100%;
|
189 |
+
background: url("https://widget.nextwidgets.com/Admin/sellermvc3/content/images/pattern-bgr.png");
|
190 |
+
z-index: 999;
|
191 |
+
}
|
192 |
+
.header-desc2 {
|
193 |
+
position: fixed;
|
194 |
+
top: 65px;
|
195 |
+
left: 0px;
|
196 |
+
width: 100%;
|
197 |
+
background: #90c547;
|
198 |
+
color: #ffffff;
|
199 |
+
z-index: 999;
|
200 |
+
text-transform: uppercase;
|
201 |
+
text-align: center;
|
202 |
+
}
|
203 |
+
.header-desc2 span {
|
204 |
+
padding: 20px;
|
205 |
+
display: block;
|
206 |
+
}
|
207 |
+
|
208 |
+
.logo2 {
|
209 |
+
display: block;
|
210 |
+
width: 118px;
|
211 |
+
height: 20px;
|
212 |
+
margin: 225px auto;
|
213 |
+
background: url("https://widget.nextwidgets.com/Admin/sellermvc3/content/images/next-promote-login-pnl-logo.png") center no-repeat;
|
214 |
+
}
|
215 |
+
|
216 |
+
.login-wrapper, .signup-wrapper, .signup-form-wrapper, .reset-wrapper {
|
217 |
+
width: 232px;
|
218 |
+
margin: 30px auto 30px auto;
|
219 |
+
padding: 35px;
|
220 |
+
background: #e6e7e8;
|
221 |
+
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.6);
|
222 |
+
border-radius: 10px;
|
223 |
+
/*text-align: center;*/
|
224 |
+
position: relative;
|
225 |
+
}
|
226 |
+
.plugin-wrapper {
|
227 |
+
width: 800px;
|
228 |
+
margin: 160px auto 0 auto;
|
229 |
+
padding: 35px;
|
230 |
+
background: #e6e7e8;
|
231 |
+
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.6);
|
232 |
+
border-radius: 10px;
|
233 |
+
position: relative;
|
234 |
+
overflow: auto;
|
235 |
+
}
|
236 |
+
.platform-container {
|
237 |
+
float: left;
|
238 |
+
width: 250px;
|
239 |
+
}
|
240 |
+
.platform-header {
|
241 |
+
width: 250px;
|
242 |
+
height: 62px;
|
243 |
+
border-radius: 10px;
|
244 |
+
background: white;
|
245 |
+
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.3);
|
246 |
+
margin: 0 0 10px 0;
|
247 |
+
}
|
248 |
+
.platform-header img {
|
249 |
+
display: block;
|
250 |
+
width: 202px;
|
251 |
+
height: 62px;
|
252 |
+
margin: 0 auto;
|
253 |
+
}
|
254 |
+
.platform-btn-wrapper {
|
255 |
+
width: 250px;
|
256 |
+
}
|
257 |
+
.manual-signup {
|
258 |
+
clear: both;
|
259 |
+
text-align: center;
|
260 |
+
}
|
261 |
+
.login-wrapper {
|
262 |
+
width: 260px;
|
263 |
+
}
|
264 |
+
.login-wrapper .form-holder {
|
265 |
+
width: 260px;
|
266 |
+
text-align: center;
|
267 |
+
}
|
268 |
+
.signup-form-wrapper {
|
269 |
+
width: 600px;
|
270 |
+
}
|
271 |
+
.signup-wrapper {
|
272 |
+
display: none;
|
273 |
+
width: 460px;
|
274 |
+
margin: 30px auto;
|
275 |
+
overflow: auto;
|
276 |
+
padding: 20px;
|
277 |
+
}
|
278 |
+
.signup-wrapper p {
|
279 |
+
color: #ccc;
|
280 |
+
float: left;
|
281 |
+
font-size: 18px;
|
282 |
+
padding: 6px 0 0 20px;
|
283 |
+
}
|
284 |
+
h1 {
|
285 |
+
margin: 60px auto 50px auto;
|
286 |
+
/*width: 400px;
|
287 |
+
color: #ccc;*/
|
288 |
+
font-size: 18px;
|
289 |
+
border-radius: 5px;
|
290 |
+
text-align: center;
|
291 |
+
}
|
292 |
+
.form-holder {
|
293 |
+
width: 232px;
|
294 |
+
margin: 0 auto;
|
295 |
+
}
|
296 |
+
.form-holder li {
|
297 |
+
margin: 15px 0;
|
298 |
+
position: relative;
|
299 |
+
}
|
300 |
+
.form-holder li:first-child, .form-holder li.first-field {
|
301 |
+
margin-top: 0;
|
302 |
+
}
|
303 |
+
.form-holder li:last-child {
|
304 |
+
margin-bottom: 0;
|
305 |
+
}
|
306 |
+
input {
|
307 |
+
font-family: Arial, sans-serif;
|
308 |
+
font-size: 12px;
|
309 |
+
}
|
310 |
+
.general-text {
|
311 |
+
width: 220px;
|
312 |
+
height: 30px;
|
313 |
+
font-size: 12px;
|
314 |
+
color: #58595b;
|
315 |
+
background: white;
|
316 |
+
border: 1px solid #bcbec0;
|
317 |
+
border-radius: 5px;
|
318 |
+
padding: 0 5px;
|
319 |
+
}
|
320 |
+
.user:focus, .pass:focus, .general-text:focus, .register-select:focus {
|
321 |
+
background: white;
|
322 |
+
}
|
323 |
+
.watermark {
|
324 |
+
color: #666;
|
325 |
+
}
|
326 |
|
327 |
+
.login-error {
|
328 |
+
color: white; /*padding: 0 0 30px 0;*/
|
329 |
+
padding: 0 0 10px 0;
|
330 |
+
}
|
331 |
+
.signup-btn, .signup-btn:link, .signup-btn:visited, .signup-btn:active {
|
332 |
+
float: left;
|
333 |
+
display: block;
|
334 |
+
width: 100px;
|
335 |
+
height: 30px;
|
336 |
+
line-height: 30px;
|
337 |
+
background: #90c547;
|
338 |
+
color: white;
|
339 |
+
border-radius: 5px;
|
340 |
+
font-size: 12px;
|
341 |
+
cursor: pointer;
|
342 |
+
margin-left: 15px;
|
343 |
+
}
|
344 |
+
.signup-btn:hover {
|
345 |
+
background: #333;
|
346 |
+
}
|
347 |
+
.register-select {
|
348 |
+
width: 230px;
|
349 |
+
height: 35px;
|
350 |
+
border-radius: 5px;
|
351 |
+
color: #58595B;
|
352 |
+
padding: 8px;
|
353 |
+
font: 12px regular Arial, sans-serif;
|
354 |
+
border: 1px solid #bcbec0;
|
355 |
+
outline: none;
|
356 |
+
-webkit-appereance: none;
|
357 |
+
}
|
358 |
+
.register-select option {
|
359 |
+
margin: 5px 0;
|
360 |
+
}
|
361 |
+
a.reset-pass {
|
362 |
+
float: left;
|
363 |
+
line-height: 35px;
|
364 |
+
display: block;
|
365 |
+
height: 35px;
|
366 |
+
margin: 10px 0 20px 15px;
|
367 |
+
color: #464648;
|
368 |
+
text-decoration: underline;
|
369 |
+
text-transform: uppercase;
|
370 |
+
}
|
371 |
+
.grid-links {
|
372 |
+
color: #ccc;
|
373 |
+
text-decoration: underline;
|
374 |
+
}
|
375 |
+
.signup-text {
|
376 |
+
float:left;
|
377 |
+
padding: 25px 0 15px 0;
|
378 |
+
display: block;
|
379 |
+
width: 200px;
|
380 |
+
text-transform: uppercase;
|
381 |
+
text-shadow: 0 1px 0 white;
|
382 |
+
color: #58595B;
|
383 |
+
}
|
384 |
+
.signup-text-2 {
|
385 |
+
padding: 25px 0 15px 0;
|
386 |
+
display: block;
|
387 |
+
/* width: 200px; */
|
388 |
+
text-transform: uppercase;
|
389 |
+
text-shadow: 0 1px 0 white;
|
390 |
+
color: #58595B;
|
391 |
+
}
|
392 |
+
|
393 |
+
.label-hidden {
|
394 |
+
display: none;
|
395 |
+
}
|
396 |
+
.np-desc {
|
397 |
+
width:330px;
|
398 |
+
float: left;
|
399 |
+
text-align: left;
|
400 |
+
margin-left: 30px;
|
401 |
+
}
|
402 |
+
|
403 |
+
.np-desc p {
|
404 |
+
width: 95%;
|
405 |
+
float:left;
|
406 |
+
}
|
407 |
+
.text-dot {
|
408 |
+
background : url("https://widget.nextwidgets.com/Admin/sellermvc3/content/images/bullit-img.png");
|
409 |
+
width: 13px;
|
410 |
+
height: 13px;
|
411 |
+
margin-right: 15px;
|
412 |
+
float: left;
|
413 |
}
|
414 |
+
.text-title {
|
415 |
+
font-size: 14px;
|
416 |
+
font-weight: bold;
|
417 |
+
float: left;
|
418 |
}
|
419 |
+
p.text-desc {
|
420 |
+
width: 90%;
|
421 |
+
margin: 15px 0 40px 30px;
|
422 |
+
}
|
423 |
+
|
424 |
+
/*-----Error----*/
|
425 |
+
|
426 |
+
.input-validation-error {
|
427 |
+
color: #58595b;
|
428 |
+
background: #fde6e7;
|
429 |
+
border: 1px solid #ef4136;
|
430 |
+
}
|
431 |
+
.form-holder .field-validation-wrapper {
|
432 |
+
display: none;
|
433 |
+
position: absolute;
|
434 |
+
left: 237px;
|
435 |
+
top: 0px;
|
436 |
+
min-width: 250px;
|
437 |
+
}
|
438 |
+
.form-holder .field-validation-error {
|
439 |
+
height: 14px;
|
440 |
+
color: white;
|
441 |
+
background: #f58287;
|
442 |
+
border-radius: 5px;
|
443 |
+
padding: 9px;
|
444 |
+
font-size: 12px;
|
445 |
+
float: left;
|
446 |
+
}
|
447 |
+
.field-validation-wrapper .arrow-left {
|
448 |
+
float: left;
|
449 |
+
margin-top: 10px;
|
450 |
+
width: 0;
|
451 |
+
height: 0;
|
452 |
+
border-top: 6px solid transparent;
|
453 |
+
border-bottom: 6px solid transparent;
|
454 |
+
border-right: 8px solid #f58287;
|
455 |
+
}
|
456 |
+
.arrow-down {
|
457 |
+
width: 0;
|
458 |
+
height: 0;
|
459 |
+
border-left: 6px solid transparent;
|
460 |
+
border-right: 6px solid transparent;
|
461 |
+
border-top: 8px solid #f58287;
|
462 |
+
margin-left: 120px;
|
463 |
+
}
|
464 |
+
.validation-summary-errors {
|
465 |
+
background: none repeat scroll 0 0 #f58287;
|
466 |
+
border-radius: 5px 5px 5px 5px;
|
467 |
+
/*color: #912323;*/
|
468 |
+
color: white;
|
469 |
+
width: 210px;
|
470 |
+
font-size: 12px;
|
471 |
+
border-radius: 5px;
|
472 |
+
padding: 10px;
|
473 |
+
}
|
474 |
+
|
475 |
+
|
476 |
+
|
477 |
</style>
|
478 |
+
<!--<div class="content-header">
|
479 |
+
<table cellspacing="0" class="grid-header">
|
480 |
<tr>
|
481 |
+
<td><h3>Create a NextWidgets Account, It's free!</h3></td>
|
482 |
+
|
|
|
|
|
|
|
483 |
</tr>
|
484 |
</table>
|
485 |
+
|
486 |
+
</div>-->
|
487 |
+
<!--
|
488 |
<div class="entry-edit">
|
489 |
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post')?>">
|
490 |
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
499 |
</table>
|
500 |
|
501 |
</fieldset>
|
502 |
+
<div class='logo2'>2</div>
|
503 |
<fieldset id="my-fieldset">
|
504 |
<table cellspacing="0" class="form-list">
|
505 |
<tr>
|
506 |
+
<td class="label">eeeEmail <span class="required">*</span></td>
|
507 |
|
508 |
<td class="input-ele"><input class="input-text required-entry validate-email" name="email" value='<?php echo Mage::getSingleton('admin/session')->getUser()->getData('email'); ?>'/></td>
|
509 |
</tr>
|
526 |
</fieldset>
|
527 |
</form>
|
528 |
</div>
|
529 |
+
-->
|
530 |
+
<!-- NOVO -->
|
531 |
+
|
532 |
+
|
533 |
+
<div class="entry-edit">
|
534 |
+
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post')?>">
|
535 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
536 |
+
<input name="admin_key" type="hidden" value="<?php echo Mage::app()->getRequest()->getParam('key'); ?>" />
|
537 |
+
|
538 |
+
|
539 |
+
<!-- <form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post')?>"> -->
|
540 |
+
|
541 |
+
<input type="hidden" name="issubmit_login" value="1">
|
542 |
+
<ul class="form-holder">
|
543 |
+
<li class="first-field">
|
544 |
+
<?php // echo Mage::helper('nextpromote/registration')->registrationError(); ?>
|
545 |
+
</li>
|
546 |
+
<li>
|
547 |
+
<label for="Email" class="label-hidden">Email</label>
|
548 |
+
<input placeholder="Email" id="email" name="email" class="general-text transition" type="text" value="Email" onclick='this.value=""'>
|
549 |
+
</li>
|
550 |
+
<li>
|
551 |
+
<label for="Password" class="label-hidden">Password</label>
|
552 |
+
<input placeholder="Password" id="password" name="password" class="general-text transition" type="password" onclick='this.value=""'>
|
553 |
+
</li>
|
554 |
+
<li style="height: 80px;margin:25px 0 0 0;border-bottom: 1px solid #bcbec0;padding-bottom: 30px;">
|
555 |
+
<input value="Login" class="login" style="float:left;margin-left:0px;" type="submit">
|
556 |
+
<a class="reset-pass" href="<?php echo Mage::getStoreConfig('nw_registration/settings1/order_home_url3'); ?>/admin/sellermvc3/Sessions/PasswordReset">Forgot your password?</a>
|
557 |
+
</li>
|
558 |
+
<li style="height: 100px;border-top: 1px solid #ffffff;margin-top: 0;">
|
559 |
+
<span class="signup-text" style="text-align: center;">You don't have account?</span>
|
560 |
+
</form>
|
561 |
+
</li>
|
562 |
+
<li>
|
563 |
+
|
564 |
+
<form action="<?php echo Mage::getStoreConfig('nw_registration/settings1/order_home_url3') . Mage::getStoreConfig('nw_registration/settings1/register_url'); ?>" method="post" >
|
565 |
+
|
566 |
+
<input type="hidden" id="ShopIntegrationType" name="ShopIntegrationType" value="1" class="txtBox">
|
567 |
+
<input type="hidden" id="ProductFeedUrl" name="ProductFeedUrl" value="<?php echo Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . 'nextwidgets/product/getv4?auth_key='. md5(Mage::helper('nextpromote/registration')->authKey()); ?>">
|
568 |
+
<input type="hidden" id="Pagination" name="Pagination" value="<?php echo Mage::helper('nextpromote/registration')->pagination(); ?>" class="txtBox">
|
569 |
+
<input type="hidden" id="PageSize" name="PageSize" value="<?php echo Mage::helper('nextpromote/registration')->pageSize(); ?>">
|
570 |
+
<input type="hidden" id="AuthKey" name="AuthKey" value="<?php echo md5(Mage::helper('nextpromote/registration')->authKey());?>">
|
571 |
+
<input type="hidden" id="Domain" name="Domain" value="<?php echo Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>">
|
572 |
+
<input type="hidden" id="RegistrationUrl" name="RegistrationUrl" value="<?php echo Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . 'nextwidgets/registration/';?>">
|
573 |
+
|
574 |
+
<input value="Signup" class="login login2" style="float:left;margin-left:0px;" type="submit" style="z-index:100">
|
575 |
+
</form>
|
576 |
+
<!-- </form>-->
|
577 |
+
</div>
|
578 |
+
|
579 |
<script type="text/javascript">
|
580 |
var editForm = new varienForm('edit_form');
|
581 |
</script>
|
app/design/adminhtml/default/default/template/nextwidgets_registration/sacuvano/login.phtml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style>
|
2 |
+
|
3 |
+
input.input-text, textarea, select{
|
4 |
+
width: 250px
|
5 |
+
}
|
6 |
+
button, .form-button {
|
7 |
+
margin-left:88px;
|
8 |
+
}
|
9 |
+
</style>
|
10 |
+
<div class="content-header">
|
11 |
+
<table cellspacing="0" class="grid-header">
|
12 |
+
<tr>
|
13 |
+
<td><h3>Login NextWidgets Account!</h3></td>
|
14 |
+
<td></td>
|
15 |
+
<td class="a-right">
|
16 |
+
<button onclick="editForm.submit()" class="scalable save" type="button"><span>Login!</span></button>
|
17 |
+
</td>
|
18 |
+
</tr>
|
19 |
+
</table>
|
20 |
+
</div>
|
21 |
+
<div class="entry-edit">
|
22 |
+
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/loginpost')?>">
|
23 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
24 |
+
<input name="admin_key" type="hidden" value="<?php echo Mage::app()->getRequest()->getParam('key'); ?>" />
|
25 |
+
|
26 |
+
|
27 |
+
<fieldset id="my-fieldset">
|
28 |
+
<table cellspacing="0" class="form-list">
|
29 |
+
<tr>
|
30 |
+
<td class="label">Email <span class="required">*</span></td>
|
31 |
+
|
32 |
+
<td class="input-ele"><input class="input-text required-entry validate-email" name="email" value='<?php echo Mage::getSingleton('admin/session')->getUser()->getData('email'); ?>'/></td>
|
33 |
+
</tr>
|
34 |
+
<tr>
|
35 |
+
<td class="label" >Password <span class="required">*</span></td>
|
36 |
+
<td class="input-ele" ><input type="password" class="input-text required-entry validate-password'" title="Password" id="password" name="password" /></td>
|
37 |
+
</tr>
|
38 |
+
<tr>
|
39 |
+
<td class="label">Validate Password <span class="required">*</span></td>
|
40 |
+
<td class="input-ele"><input type="password" class="input-text required-entry validate-cpassword" id="confirmation" title="Confirm Password" name="confirmation" /></td>
|
41 |
+
</tr>
|
42 |
+
<tr>
|
43 |
+
<td class="label"></td>
|
44 |
+
<td class="input-ele"><button onclick="editForm.submit()" class="scalable save" type="button"><span>Login!</span></button> </td>
|
45 |
+
</tr>
|
46 |
+
|
47 |
+
</table>
|
48 |
+
|
49 |
+
</fieldset>
|
50 |
+
</form>
|
51 |
+
</div>
|
52 |
+
<script type="text/javascript">
|
53 |
+
var editForm = new varienForm('edit_form');
|
54 |
+
</script>
|
app/design/adminhtml/default/default/template/nextwidgets_registration/sacuvano/loginpost.phtml
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
sta god
|
2 |
+
|
app/design/adminhtml/default/default/template/nextwidgets_registration/sacuvano/registration.phtml
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style>
|
2 |
+
|
3 |
+
input.input-text, textarea, select{
|
4 |
+
width: 250px
|
5 |
+
}
|
6 |
+
button, .form-button {
|
7 |
+
margin-left:88px;
|
8 |
+
}
|
9 |
+
</style>
|
10 |
+
<div class="content-header">
|
11 |
+
<table cellspacing="0" class="grid-header">
|
12 |
+
<tr>
|
13 |
+
<td><h3>Create a NextWidgets Account, It's free!</h3></td>
|
14 |
+
<td></td>
|
15 |
+
<td class="a-right">
|
16 |
+
<button onclick="editForm.submit()" class="scalable save" type="button"><span>Create a free account!</span></button>
|
17 |
+
</td>
|
18 |
+
</tr>
|
19 |
+
</table>
|
20 |
+
</div>
|
21 |
+
<div class="entry-edit">
|
22 |
+
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post')?>">
|
23 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
24 |
+
<input name="admin_key" type="hidden" value="<?php echo Mage::app()->getRequest()->getParam('key'); ?>" />
|
25 |
+
|
26 |
+
<fieldset id="my-fieldset">
|
27 |
+
<table cellspacing="0" class="grid-header">
|
28 |
+
|
29 |
+
<?php $url = $this->getUrl('*/*/post') . "key/" . Mage::app()->getRequest()->getParam('key'); ?>
|
30 |
+
|
31 |
+
<p class="icon-head">Already have an account?<a href="<?php echo Mage::helper("adminhtml")->getUrl('*/*/login')?>"> Login</a></p>
|
32 |
+
</table>
|
33 |
+
|
34 |
+
</fieldset>
|
35 |
+
|
36 |
+
<fieldset id="my-fieldset">
|
37 |
+
<table cellspacing="0" class="form-list">
|
38 |
+
<tr>
|
39 |
+
<td class="label">Email <span class="required">*</span></td>
|
40 |
+
|
41 |
+
<td class="input-ele"><input class="input-text required-entry validate-email" name="email" value='<?php echo Mage::getSingleton('admin/session')->getUser()->getData('email'); ?>'/></td>
|
42 |
+
</tr>
|
43 |
+
<tr>
|
44 |
+
<td class="label" >Password <span class="required">*</span></td>
|
45 |
+
<td class="input-ele" ><input type="password" class="input-text required-entry validate-password'" title="Password" id="password" name="password" /></td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td class="label">Validate Password <span class="required">*</span></td>
|
49 |
+
<td class="input-ele"><input type="password" class="input-text required-entry validate-cpassword" id="confirmation" title="Confirm Password" name="confirmation" /></td>
|
50 |
+
</tr>
|
51 |
+
<tr>
|
52 |
+
<td class="label"></td>
|
53 |
+
<td class="input-ele"><button onclick="editForm.submit()" class="scalable save" type="button"><span>Create a free account!</span></button> </td>
|
54 |
+
</tr>
|
55 |
+
|
56 |
+
</table>
|
57 |
+
|
58 |
+
|
59 |
+
</fieldset>
|
60 |
+
</form>
|
61 |
+
</div>
|
62 |
+
<script type="text/javascript">
|
63 |
+
var editForm = new varienForm('edit_form');
|
64 |
+
</script>
|
app/design/adminhtml/default/default/template/nextwidgets_registration/sacuvano/registration2.phtml
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style>
|
2 |
+
|
3 |
+
input.input-text, textarea, select{
|
4 |
+
width: 250px
|
5 |
+
}
|
6 |
+
button, .form-button {
|
7 |
+
margin-left:50px;
|
8 |
+
}
|
9 |
+
</style>
|
10 |
+
<div class="content-header">
|
11 |
+
<table cellspacing="0" class="grid-header">
|
12 |
+
<tr>
|
13 |
+
<td><h3>NextWidgets Store registration</h3></td>
|
14 |
+
<td class="a-right">
|
15 |
+
<button onclick="editForm.submit()" class="scalable save" type="button"><span>I Accept, Register me!</span></button>
|
16 |
+
</td>
|
17 |
+
</tr>
|
18 |
+
</table>
|
19 |
+
</div>
|
20 |
+
<div class="entry-edit">
|
21 |
+
|
22 |
+
<?php $url = $this->getUrl('*/*/post2') . "key" . Mage::app()->getRequest()->getParam('key'); ?>
|
23 |
+
<!-- <form id="edit_form" name="edit_form" method="post" action="<?php echo $url; ?>"> -->
|
24 |
+
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post2'); ?>">
|
25 |
+
<input type="hidden" id="form_key" title="form_key" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
26 |
+
<input type="hidden" id="email" title="email" name="email" value="<?php print($_POST['email']); ?>" />
|
27 |
+
<input type="hidden" id="password" title="password" name="password" value="<?php print($_POST['password']); ?>" />
|
28 |
+
<input type="hidden" id="admin_key" title="admin_key" name="admin_key" value="<?php print($_POST['admin_key']); ?>" />
|
29 |
+
<input type="hidden" id="request_uri" title="request_uri" name="request_uri" value="<?php print($_SERVER['REQUEST_URI']); ?>" />
|
30 |
+
<input type="hidden" id="http_host" title="http_host" name="http_host" value="<?php print($_SERVER['HTTP_HOST']); ?>" />
|
31 |
+
|
32 |
+
|
33 |
+
<fieldset id="my-fieldset">
|
34 |
+
<table cellspacing="0" class="grid-header">
|
35 |
+
<pclass="icon-head">Adding a store to NextWidgets account: <strong><?php echo $_POST['email']; ?></strong>. <a href='<?php echo Mage::helper("adminhtml")->getUrl('*/*/login')?>'>Switch account</a>?</p>
|
36 |
+
</table>
|
37 |
+
</fieldset>
|
38 |
+
<fieldset id="my-fieldset">
|
39 |
+
<table cellspacing="0" class="form-list">
|
40 |
+
<tr>
|
41 |
+
<td class="label">Company Name <span class="required">*</span></td>
|
42 |
+
<td class="input-ele"><input type="text" class="input-text required-entry" name="company_name" value=""/></td>
|
43 |
+
</tr>
|
44 |
+
|
45 |
+
<tr>
|
46 |
+
<td class="label" >First Name<span class="required">*</span></td>
|
47 |
+
<td class="input-ele"><input type="text" class="input-text required-entry" id="first_name" title="first_name" name="first_name" value="<?php echo Mage::getSingleton('admin/session')->getUser()->getData('firstname'); ?>" /></td>
|
48 |
+
</tr>
|
49 |
+
<tr>
|
50 |
+
<td class="label">Last Name<span class="required">*</span></td>
|
51 |
+
<td class="input-ele"><input type="text" class="input-text required-entry" id="last_name" title="last_name" name="last_name" value="<?php echo Mage::getSingleton('admin/session')->getUser()->getData('lastname'); ?>" /></td>
|
52 |
+
</tr>
|
53 |
+
<!-- <tr>
|
54 |
+
<td class="label">Phone</td>
|
55 |
+
<td class="input-ele"><input type="text" class="input-text" id="phone" title="phone" name="phone" /></td>
|
56 |
+
</tr>
|
57 |
+
-->
|
58 |
+
<tr>
|
59 |
+
<td class="label">Terms of Service</td>
|
60 |
+
<td class="input-ele">
|
61 |
+
<iframe width="600" height="200" src="http://linux.nextwidgets.com/eula.html"></iframe>
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
|
65 |
+
|
66 |
+
</table>
|
67 |
+
<?php
|
68 |
+
/*
|
69 |
+
print_r(Mage::app()->getWebsite()->getDefaultStore()->getCode());
|
70 |
+
$storeId = Mage::app()->getWebsite()->getDefaultStore()->getCode();
|
71 |
+
echo "<br>";
|
72 |
+
print_r(Mage::getStoreConfig('general/locale', $storeId));
|
73 |
+
|
74 |
+
echo "<br>";
|
75 |
+
echo Mage::app()->getStore()->getBaseCurrencyCode();
|
76 |
+
echo "<br>";
|
77 |
+
echo Mage::app()->getStore()->getCurrentCurrencyCode();
|
78 |
+
echo "<br>";
|
79 |
+
$localeCut = substr(Mage::getStoreConfig('general/locale/code', $storeId), 0, 2);
|
80 |
+
echo $localeCut;
|
81 |
+
echo "<br>";
|
82 |
+
echo "<pre>";
|
83 |
+
print_r(Mage::getStoreConfig('web/unsecure/base_url'));
|
84 |
+
echo "</pre>";
|
85 |
+
|
86 |
+
echo "<br>";
|
87 |
+
$countryCode = Mage::getStoreConfig('general/country/default');
|
88 |
+
# $country = Mage::getModel('directory/contry')->loadByCode($countryCode);
|
89 |
+
|
90 |
+
echo $countryCode;
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
echo "<br>";
|
95 |
+
echo "Auth key: ";
|
96 |
+
echo md5(Mage::getStoreConfig('nw_registration/settings1/auth_key'));
|
97 |
+
*/
|
98 |
+
?>
|
99 |
+
</fieldset>
|
100 |
+
<span>By clicking on 'I accept, Register me.'you agree to the <a href="http://www.nextwidgets.com/en/Privacy" target='_blank'>Privacy Policy</a> and to the 'Terms of Service' above. </span>
|
101 |
+
<button onclick="editForm.submit()" class="scalable save" type="button"><span>I Accept, Register me!</span>
|
102 |
+
</form>
|
103 |
+
|
104 |
+
|
105 |
+
</div>
|
106 |
+
<script type="text/javascript">
|
107 |
+
var editForm = new varienForm('edit_form');
|
108 |
+
</script>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>NextWidgets_NextPromote</name>
|
4 |
-
<version>
|
5 |
<stability>stable</stability>
|
6 |
<license>NextWidgets Licence</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Best and easiest way to promote your Product.</description>
|
11 |
<notes>Added new features</notes>
|
12 |
<authors><author><name>NextWidgets</name><user>auto-converted</user><email>info@nextwidgets.com</email></author></authors>
|
13 |
-
<date>2012-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="NextWidgets"><dir name="NextPromote"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Company.php" hash="07774f4e06e70873a28d77a5d1c6b9ce"/><file name="Email.php" hash="09c4290d8900057b9c6a53eecd921383"/><file name="Isregistred.php" hash="a8a1188cce40cc3df6212bd969c7a661"/><file name="Reglink.php" hash="8b10e5ab0b4a1abcf29f6e6ea8d06be0"/><file name="Sellerreg.php" hash="12b297b411373aa682ec7f961a33a8a8"/><file name="Test.php" hash="4358144895b844804392c1c1073a53db"/></dir></dir></dir><file name="NextWidgets.php" hash="e23f3709502e1c4c846fd4eeff57cc29"/></dir><dir name="Helper"><file name="Data.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>NextWidgets_NextPromote</name>
|
4 |
+
<version>2.0.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>NextWidgets Licence</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Best and easiest way to promote your Product.</description>
|
11 |
<notes>Added new features</notes>
|
12 |
<authors><author><name>NextWidgets</name><user>auto-converted</user><email>info@nextwidgets.com</email></author></authors>
|
13 |
+
<date>2012-12-18</date>
|
14 |
+
<time>15:11:17</time>
|
15 |
+
<contents><target name="magelocal"><dir name="NextWidgets"><dir name="NextPromote"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Company.php" hash="07774f4e06e70873a28d77a5d1c6b9ce"/><file name="Email.php" hash="09c4290d8900057b9c6a53eecd921383"/><file name="Isregistred.php" hash="a8a1188cce40cc3df6212bd969c7a661"/><file name="Reglink.php" hash="8b10e5ab0b4a1abcf29f6e6ea8d06be0"/><file name="Sellerreg.php" hash="12b297b411373aa682ec7f961a33a8a8"/><file name="Test.php" hash="4358144895b844804392c1c1073a53db"/></dir></dir></dir><file name="NextWidgets.php" hash="e23f3709502e1c4c846fd4eeff57cc29"/></dir><dir name="Helper"><file name="Data.php" hash="cf17161f1b4992b9f1abfdd58633efd2"/><file name="Registration.php" hash="c8a8aa9b4bbe46a7d23554f01fae4131"/></dir><dir name="Model"><dir name="Catalog"><dir name="Product"><dir name="Type"><file name="Price.php" hash="1b02ef9eaf776ba6848a0a91cb78cb1c"/></dir></dir></dir><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="22b542f7ba5d8ccb3ece1dda39f2a475"/></dir><dir name="Nextwidgets"><file name="Collection.php" hash="d0bc3d9d7887e1100a01361ce4c13f7e"/></dir><file name="Log.php" hash="5710c40ac1bf52c3ce17cb18aeadbf6b"/><file name="Nextpromote.php" hash="ee9923eac875c91b62c694576a827857"/></dir><dir name="Order"><file name="Get.php" hash="0cfdab989398c0ba1da07de43a80c02e"/><file name="GetV2.php" hash="83604dc06aa532e05a267d6dcd65207d"/><file name="Parse.php" hash="a56d4c8cdff7261de6312fc3f232c4c1"/><file name="Success.php" hash="66369f2cf667e9a80f8e47b6fd24ba8a"/><file name="Xml.php" hash="f813c8808790013b758adce869f0c279"/></dir><dir name="Product"><file name="Get.php" hash="502067b2208f5745c67bf2cea53c45d8"/><file name="GetV2.php" hash="9429d60502cd5828d1b0745ca12096c4"/><file name="GetV3.php" hash="e2a304924eada4209da06bbd85cbff95"/><file name="GetV4.php" hash="2d9c072e32d33be73f1a0a2ff4ad4db2"/><file name="Getstock.php" hash="03923d68b5019301723d9f6f08c45e56"/><file name="Log.php" hash="d8febb4555fc15b903df7b747fa8563d"/><file name="Status.php" hash="7dd9f2dc4dc42b03337261410ccddc88"/><file name="Stock.php" hash="482dfd788ef973a59a44e26982c28932"/><file name="Stockupdate.php" hash="8a8ff1eff13de9a99b1fa1796df3426e"/><file name="Xml.php" hash="52046756e7de2eece4b24776768701a4"/><file name="XmlV2.php" hash="917c225949a08fa15f20b482325b1642"/><file name="XmlV3.php" hash="431bc5f2f648dd575b3648dbb4163913"/><file name="XmlV4.php" hash="b4a96b0eb49cf2e906da6486ae957e5f"/><file name="XmlV4.php_1" hash="7b6898f51f3186a7938dab22f1edd539"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="038045b9b274e0693934bca0883bb636"/></dir></dir><dir name="Source"><dir name="Config"><file name="Company.php" hash="781fa82942504a7ee2a8f609d8c57b1d"/></dir><file name="Yesno.php" hash="5f2c005e3dbdfa05421edc9458a233c8"/></dir><file name="Abstract.php" hash="e543b71752f987c940e17f19e13c71cc"/><file name="Dispatcher.php" hash="13ba6382751fe123520da4b12d16dda0"/><file name="Error.php" hash="d7878fe3517a372f77a3badfbc2e6b28"/><file name="Nextpromote.php" hash="cb2f9dabfeb03b4bc8d9994c7df0c6a9"/><file name="Observer.php" hash="85477dff6789ff50b28585034e0eb9f3"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="98790b8b73a9ba03213104ce7b2b4cb6"/><file name="IndexController1.php" hash="a0c82235b06f7fea3946d067104bcdab"/><file name="RegistrationController.php" hash="1bfc544042966acf7c842c4e4eb2149c"/><file name="RegistrationController1.php" hash="efb330228b541db4c9a00364dda17b3e"/></dir><file name="CallbacksController.php" hash="e9751f6c43ce3bbd20599c5c147faa0f"/><file name="FrontController.php" hash="2a2ec4df066ca0c8a0932a2e30207448"/><file name="ImagesController.php" hash="32c21fbe98c7db7045f99ff1f94ac533"/><file name="IndexController.php" hash="b223ce9497d6da194defbedd3a5330f4"/><file name="OrdersController.php" hash="e66f5be6321a2ba7245fc01fdf6f7a85"/><file name="ProductsController.php" hash="1e377185f70f00676ca54831404abe8d"/><file name="RegistrationController.php" hash="08cafac29bddc3d67743cb1cab07ea69"/><file name="ServiceController.php" hash="2a4fa44a9da1df2dfa4e4bcc03c88553"/><file name="StocksController.php" hash="a798676765352f07053649a5c974828d"/></dir><dir name="etc"><file name="config.xml" hash="1d9f165866af17c1f1caf89c71b6d67d"/></dir><dir name="sql"><dir name="nextpromote_setup"><file name="mysql4-install-0.1.0.php" hash="2bddef5dc1ae371fe1463989bf0b341b"/><file name="mysql4-install-0.1.0.php~" hash="54d4f78d23e3a600d70971dd5eced015"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="0780e528c3c8c360ef32e8e7fe22c052"/><file name="mysql4-upgrade-0.1.0-0.1.1.php1" hash="6278089270fa936aaee97a6056809fc5"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="NextWidgets_NextPromote.xml" hash="4722b27195f872b3f2921d3e75e61e0c"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="nextwidgets_registration"><dir name="sacuvano"><file name="login.phtml" hash="b83d90683ba3632b3d6ff2b1c51cbcd0"/><file name="loginpost.phtml" hash="471429b9dd817474a18c549f0fa25b40"/><file name="registration.phtml" hash="c320aa6b654d5ea99d9fe418313f9b6e"/><file name="registration2.phtml" hash="b040911fb0a545b25172aad7f0aba650"/></dir><file name="login.phtml" hash="b83d90683ba3632b3d6ff2b1c51cbcd0"/><file name="loginpost.phtml" hash="471429b9dd817474a18c549f0fa25b40"/><file name="registration.phtml" hash="959af8d9ed446a84d71b46bf4651635b"/><file name="registration2.phtml" hash="b040911fb0a545b25172aad7f0aba650"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|