Version Notes
Create account in extension page.
Download this release
Release Info
Developer | Ronen |
Extension | Camera_Malabi |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
app/code/local/Camera/Malabi/controllers/ProductController.php
CHANGED
@@ -8,17 +8,16 @@ class Camera_Malabi_ProductController extends Mage_Core_Controller_Front_Action
|
|
8 |
public function createuserAction(){
|
9 |
|
10 |
|
11 |
-
|
12 |
try {
|
13 |
$datas = array('firstName' => 'John',
|
14 |
'lastName' => 'Smith',
|
15 |
-
'userEmail' =>
|
16 |
-
'userPassword' => '
|
17 |
'customerId' => '405',
|
18 |
'customerToken' => 'qaq2254a-75b8-40ff-9ef8-2c6ad9cfa13a',
|
19 |
-
'acceptsMail' => '
|
20 |
);
|
21 |
-
//$url = "https://users.malabi.co/UsersServer/v1/retrieveUserData";
|
22 |
$url = "https://users.malabi.co/UsersServer/v1/createUser";
|
23 |
$json = json_encode($datas);
|
24 |
$client = new Zend_Http_Client($url);
|
@@ -26,19 +25,68 @@ class Camera_Malabi_ProductController extends Mage_Core_Controller_Front_Action
|
|
26 |
|
27 |
// var_dump($json);
|
28 |
$response =$client->setRawData($json, null)->request('POST');
|
29 |
-
|
30 |
$result = json_decode($response->getBody (),true);
|
31 |
-
|
32 |
-
print_r($result);
|
33 |
|
34 |
|
|
|
35 |
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
echo $result;
|
42 |
|
43 |
//echo $response->getBody();
|
44 |
} catch (Exception $ex) {
|
8 |
public function createuserAction(){
|
9 |
|
10 |
|
11 |
+
$email = $this->getRequest()->getParam('email');
|
12 |
try {
|
13 |
$datas = array('firstName' => 'John',
|
14 |
'lastName' => 'Smith',
|
15 |
+
'userEmail' => $email,
|
16 |
+
'userPassword' => 'mag' . rand(11112,99999),
|
17 |
'customerId' => '405',
|
18 |
'customerToken' => 'qaq2254a-75b8-40ff-9ef8-2c6ad9cfa13a',
|
19 |
+
'acceptsMail' => 'false',
|
20 |
);
|
|
|
21 |
$url = "https://users.malabi.co/UsersServer/v1/createUser";
|
22 |
$json = json_encode($datas);
|
23 |
$client = new Zend_Http_Client($url);
|
25 |
|
26 |
// var_dump($json);
|
27 |
$response =$client->setRawData($json, null)->request('POST');
|
28 |
+
|
29 |
$result = json_decode($response->getBody (),true);
|
30 |
+
if(!empty($result)){
|
|
|
31 |
|
32 |
|
33 |
+
if($result['status'] == 'fail'){
|
34 |
|
35 |
+
if($result['error'] == 'email_exists'){
|
36 |
+
echo json_encode(
|
37 |
+
[
|
38 |
+
'status' => 'fail',
|
39 |
+
'message' => 'email_exists'
|
40 |
+
]
|
41 |
+
);
|
42 |
+
exit;
|
43 |
+
}
|
44 |
+
echo json_encode(
|
45 |
+
[
|
46 |
+
'status' => 'fail',
|
47 |
+
'message' => 'email_notvalid'
|
48 |
+
]
|
49 |
+
);
|
50 |
+
exit;
|
51 |
|
52 |
|
53 |
+
}
|
54 |
+
else {
|
55 |
+
$magId = null;
|
56 |
+
$savedata = array('userid' => $result['user']['userId'], 'token' => $result['user']['userToken']);
|
57 |
+
$model = Mage::getModel('productclick/productclick');
|
58 |
+
$model->setData($savedata);
|
59 |
+
try {
|
60 |
+
$magId = $model->save();
|
61 |
+
$model->setId(1);
|
62 |
+
|
63 |
+
$model->save();
|
64 |
+
|
65 |
+
}
|
66 |
+
catch (Exception $e) {
|
67 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
68 |
+
}
|
69 |
+
|
70 |
+
echo json_encode(
|
71 |
+
[
|
72 |
+
'status' => 'success',
|
73 |
+
'subscription' => 'subscribed',
|
74 |
+
'userToken' => $result['user']['userToken'],
|
75 |
+
'userId' => $result['user']['userId']
|
76 |
+
|
77 |
+
]
|
78 |
+
);
|
79 |
+
exit;
|
80 |
+
}
|
81 |
+
} else {
|
82 |
+
echo json_encode(
|
83 |
+
[
|
84 |
+
'status' => 'fail',
|
85 |
+
'message' => 'could not retrieve info, check your Malabi Account'
|
86 |
+
]
|
87 |
+
);
|
88 |
+
}
|
89 |
|
|
|
90 |
|
91 |
//echo $response->getBody();
|
92 |
} catch (Exception $ex) {
|
app/design/adminhtml/default/default/template/catalog/product/helper/gallery-new.phtml
CHANGED
@@ -73,30 +73,15 @@ $_block = $this;
|
|
73 |
<img src="<?php echo $this->getSkinUrl('images/spacer.gif')?>" width="100" style="background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABYElEQVR42u3ZwQmAMBQFQRU7Sv8lpKbYQI7Coswc5d2WD0LOtdaxM+fcfh9j2L+4vw5SAsQEiAkQEyAmQEyA2P2V/+W/7l1ATICYADEBYgLEBIgJEDu9B7R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxLwHxHsXEBMgJkBMgJgAMQFiAsS8B8R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxLwHxHsXEBMgJkBMgJgAMQFiAsS8B8R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxLwHxHsXEBMgJkBMgJgAMQFiAsS8B8R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxLwHxHsXEBMgJkBMgJgAMQFiAsS8B8R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxB6KN5Q4wR/MdAAAAABJRU5ErkJggg==);display:none;border: 1px solid #aeaeae;" alt="" />
|
74 |
|
75 |
<script type="text/javascript">
|
76 |
-
|
77 |
-
// <?php //echo $_block->getJsObjectName(); ?>//.malabiAddRow = function() {
|
78 |
-
// var newImage = {};
|
79 |
-
// newImage.url = "http://ec2-54-82-245-66.compute-1.amazonaws.com/media/catalog/product/m/a/malabi_ad9c803899cb45398910eba18fa3b6e4_1.jpg";//response.url;
|
80 |
-
// newImage.file = "/m/a/malabi_ad9c803899cb45398910eba18fa3b6e4_1.jpg";//response.file;
|
81 |
-
// newImage.label = '';
|
82 |
-
// newImage.position = this.getNextPosition();
|
83 |
-
// newImage.disabled = 0;
|
84 |
-
// newImage.removed = 0;
|
85 |
-
// this.images.push(newImage);
|
86 |
-
// this.container.setHasChanges();
|
87 |
-
// this.updateImages();
|
88 |
-
//
|
89 |
-
// console.log(this.images);
|
90 |
-
// };
|
91 |
-
// });
|
92 |
function addImage(ele){
|
93 |
-
|
94 |
var eleImage = $(ele).up().siblings()[0];
|
95 |
var track = $(eleImage).getAttribute('data-trackid');
|
96 |
var imageSrc = $(eleImage).getAttribute('src');
|
97 |
-
|
98 |
var reloadurl = '<?php echo $this->getUrl("productclick/product/addimage")."product_id/" ?>' +ele.getAttribute("value")+'/trackid/'+track;
|
99 |
-
|
100 |
new Ajax.Request(reloadurl, {
|
101 |
method: 'post',
|
102 |
parameters: "newimage="+imageSrc,
|
@@ -104,10 +89,6 @@ $_block = $this;
|
|
104 |
// $('parent_id').update('Searching...');
|
105 |
},
|
106 |
onComplete: function(transport) {
|
107 |
-
// $('parent_id').update(transport.responseText);
|
108 |
-
// alert(transport.responseText);
|
109 |
-
console.log(transport.responseText);
|
110 |
-
|
111 |
Dialog.alert("Enhanced image has been added to your product",
|
112 |
{className: 'magento',width:300, height:100, okLabel: "close",
|
113 |
ok:function(win) {return true;}});
|
@@ -149,7 +130,7 @@ $_block = $this;
|
|
149 |
var res = JSON.parse(transport.responseText);
|
150 |
if(res.status == "fail"){
|
151 |
if(res["subscription"] == "malabi-user-not-set") {
|
152 |
-
Dialog.alert(
|
153 |
{
|
154 |
className: 'magento', width: 300, height: 100, okLabel: "close",
|
155 |
ok: function (win) {
|
@@ -158,7 +139,7 @@ $_block = $this;
|
|
158 |
});
|
159 |
}
|
160 |
if(res["subscription"] == "not-available") {
|
161 |
-
Dialog.alert(
|
162 |
{
|
163 |
className: 'magento', width: 300, height: 100, okLabel: "close",
|
164 |
ok: function (win) {
|
@@ -300,7 +281,7 @@ var <?php echo $_block->getJsObjectName(); ?> = new Product.Gallery('<?php echo
|
|
300 |
//]]>
|
301 |
</script>
|
302 |
<div id="loading-malabi" style=" display: none;">
|
303 |
-
<p class="loader" id="loading_mask_loader"><img src="
|
304 |
</div>
|
305 |
<div id="malabiparent">
|
306 |
<div id="modal1" class="modal modal-wider" style="margin-bottom: -8px;display: none;">
|
73 |
<img src="<?php echo $this->getSkinUrl('images/spacer.gif')?>" width="100" style="background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABYElEQVR42u3ZwQmAMBQFQRU7Sv8lpKbYQI7Coswc5d2WD0LOtdaxM+fcfh9j2L+4vw5SAsQEiAkQEyAmQEyA2P2V/+W/7l1ATICYADEBYgLEBIgJEDu9B7R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxLwHxHsXEBMgJkBMgJgAMQFiAsS8B8R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxLwHxHsXEBMgJkBMgJgAMQFiAsS8B8R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxLwHxHsXEBMgJkBMgJgAMQFiAsS8B8R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxLwHxHsXEBMgJkBMgJgAMQFiAsS8B8R7FxATICZATICYADEBYgLEvAfEexcQEyAmQEyAmAAxAWICxB6KN5Q4wR/MdAAAAABJRU5ErkJggg==);display:none;border: 1px solid #aeaeae;" alt="" />
|
74 |
|
75 |
<script type="text/javascript">
|
76 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
function addImage(ele){
|
78 |
+
|
79 |
var eleImage = $(ele).up().siblings()[0];
|
80 |
var track = $(eleImage).getAttribute('data-trackid');
|
81 |
var imageSrc = $(eleImage).getAttribute('src');
|
82 |
+
|
83 |
var reloadurl = '<?php echo $this->getUrl("productclick/product/addimage")."product_id/" ?>' +ele.getAttribute("value")+'/trackid/'+track;
|
84 |
+
|
85 |
new Ajax.Request(reloadurl, {
|
86 |
method: 'post',
|
87 |
parameters: "newimage="+imageSrc,
|
89 |
// $('parent_id').update('Searching...');
|
90 |
},
|
91 |
onComplete: function(transport) {
|
|
|
|
|
|
|
|
|
92 |
Dialog.alert("Enhanced image has been added to your product",
|
93 |
{className: 'magento',width:300, height:100, okLabel: "close",
|
94 |
ok:function(win) {return true;}});
|
130 |
var res = JSON.parse(transport.responseText);
|
131 |
if(res.status == "fail"){
|
132 |
if(res["subscription"] == "malabi-user-not-set") {
|
133 |
+
Dialog.alert('<b>Welcome to Malabi</b> <br>To activate Malabi go to the "background remover by malabi" tag on the menu bar and press "Malabi activation"',
|
134 |
{
|
135 |
className: 'magento', width: 300, height: 100, okLabel: "close",
|
136 |
ok: function (win) {
|
139 |
});
|
140 |
}
|
141 |
if(res["subscription"] == "not-available") {
|
142 |
+
Dialog.alert('<b>Purchase Malabi subscription</b> <br>To continue working with Malabi go to the "background remover by malabi" tag on the menu bar and press "subscription information" - "Subscribe"',
|
143 |
{
|
144 |
className: 'magento', width: 300, height: 100, okLabel: "close",
|
145 |
ok: function (win) {
|
281 |
//]]>
|
282 |
</script>
|
283 |
<div id="loading-malabi" style=" display: none;">
|
284 |
+
<p class="loader" id="loading_mask_loader"><img src="/skin/adminhtml/default/default/images/ajax-loader-tr.gif" alt="Loading..." pagespeed_url_hash="1122265435" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"><br>Please wait...</p>
|
285 |
</div>
|
286 |
<div id="malabiparent">
|
287 |
<div id="modal1" class="modal modal-wider" style="margin-bottom: -8px;display: none;">
|
app/design/adminhtml/default/default/template/malabi/urls.phtml
CHANGED
@@ -2,24 +2,44 @@
|
|
2 |
$model = Mage::getModel('productclick/productclick')->load(1);
|
3 |
$userid = $model->getUserid();
|
4 |
$token = $model->getToken();
|
|
|
|
|
|
|
|
|
5 |
|
|
|
6 |
|
7 |
?>
|
|
|
|
|
8 |
<form id="edit_form" action="<?php echo $this->getUrl('*/*/subscription', array('id' => 1)); ?>" method="post" enctype="multipart/form-data"><div><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>"></div>
|
9 |
|
10 |
-
<div class="entry-
|
11 |
-
<h4 class="
|
12 |
<div class="form-buttons"></div>
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
<table cellspacing="0" style="width:94%; padding: 25px;" class="form-list">
|
15 |
<tr>
|
16 |
-
<td class="value"
|
|
|
17 |
<td class="value">
|
18 |
<input id="cancel" name="cancel" onclick="clickme();" value="Cancel Subscription" class="submit_button" type="button"> </td>
|
19 |
</tr>
|
20 |
</table>
|
21 |
-
|
22 |
-
|
23 |
</div>
|
24 |
<div class="fieldset " id="productclick_form">
|
25 |
<div class="hor-scroll">
|
@@ -76,41 +96,281 @@ $model = Mage::getModel('productclick/productclick')->load(1);
|
|
76 |
<script>
|
77 |
var malabi_userId = "<?php echo $userid; ?>";
|
78 |
var malabi_userToken = "<?php echo $token; ?>";
|
79 |
-
|
80 |
Event.observe(window, "load", function() {
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
|
|
95 |
|
96 |
});
|
97 |
|
|
|
|
|
|
|
|
|
98 |
function clickme()
|
99 |
{
|
100 |
-
url = '
|
101 |
var newtab = window.open( '', '_blank' );
|
102 |
newtab.location = url;
|
103 |
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
</script>
|
107 |
|
108 |
<div id="requestemail" style="display:none">
|
109 |
<p><span id='login_error_msg' class="login_error" style="display:none"> </span></p>
|
110 |
<div style="clear:both"></div>
|
111 |
-
<
|
112 |
-
<p
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
<div style="clear:both"></div>
|
116 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
$model = Mage::getModel('productclick/productclick')->load(1);
|
3 |
$userid = $model->getUserid();
|
4 |
$token = $model->getToken();
|
5 |
+
$userEmpty = 0;
|
6 |
+
if(empty($userid)){
|
7 |
+
$userEmpty = 1;
|
8 |
+
}
|
9 |
|
10 |
+
$userEmail = Mage::getSingleton('admin/session')->getUser()->getEmail();
|
11 |
|
12 |
?>
|
13 |
+
|
14 |
+
|
15 |
<form id="edit_form" action="<?php echo $this->getUrl('*/*/subscription', array('id' => 1)); ?>" method="post" enctype="multipart/form-data"><div><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>"></div>
|
16 |
|
17 |
+
<div class="entry-edist-headnononon">
|
18 |
+
<h4 class="">Automatic Image Background Remover by Malabi</h4>
|
19 |
<div class="form-buttons"></div>
|
20 |
+
<?php if ( $userEmpty ==1) { ?>
|
21 |
+
|
22 |
+
<table cellspacing="0" style="width:94%; padding: 25px;" class="form-list">
|
23 |
+
<tr>
|
24 |
+
<td class="value">
|
25 |
+
<input id="save" name="save" onclick="activateMalabi();" value="Activate Malabi" class="submit_button submit" type="button">
|
26 |
+
</td>
|
27 |
+
|
28 |
+
</tr>
|
29 |
+
</table>
|
30 |
+
|
31 |
+
<?php } ?>
|
32 |
+
<?php if ( $userEmpty ==0) { ?>
|
33 |
<table cellspacing="0" style="width:94%; padding: 25px;" class="form-list">
|
34 |
<tr>
|
35 |
+
<td class="value">
|
36 |
+
<input id="save" name="save" onclick="clickme();" value="Subscription Information" class="submit_button submit" type="button"></td>
|
37 |
<td class="value">
|
38 |
<input id="cancel" name="cancel" onclick="clickme();" value="Cancel Subscription" class="submit_button" type="button"> </td>
|
39 |
</tr>
|
40 |
</table>
|
41 |
+
|
42 |
+
<?php } ?>
|
43 |
</div>
|
44 |
<div class="fieldset " id="productclick_form">
|
45 |
<div class="hor-scroll">
|
96 |
<script>
|
97 |
var malabi_userId = "<?php echo $userid; ?>";
|
98 |
var malabi_userToken = "<?php echo $token; ?>";
|
99 |
+
var contentWin = null;
|
100 |
Event.observe(window, "load", function() {
|
101 |
|
102 |
+
contentWin = new Window( { className: 'magento',
|
103 |
+
maxWidth: 350,
|
104 |
+
minHeight: 200,
|
105 |
+
maxHeight: 200,
|
106 |
+
top: 80,
|
107 |
+
minimizable: false,
|
108 |
+
closable:true,
|
109 |
+
maximizable: false,
|
110 |
+
showEffectOptions: {
|
111 |
+
duration: 0.4
|
112 |
+
},
|
113 |
+
hideEffectOptions:{
|
114 |
+
duration: 0.4
|
115 |
+
},
|
116 |
+
hideEffect:Element.hide,
|
117 |
+
showEffect:Element.show,
|
118 |
+
minWidth: 300,
|
119 |
+
resizable:false,
|
120 |
+
destroyOnClose: false});
|
121 |
+
try {
|
122 |
+
contentWin.getContent().update($('requestemail').innerHTML);
|
123 |
+
} catch (e){
|
124 |
|
125 |
+
}
|
126 |
|
127 |
});
|
128 |
|
129 |
+
function activateMalabi(){
|
130 |
+
contentWin.showCenter();
|
131 |
+
}
|
132 |
+
|
133 |
function clickme()
|
134 |
{
|
135 |
+
url = 'https://users.malabi.co/UsersServer/web/subscribeUser?userId=<?php echo $userid; ?>&userToken=<?php echo $token; ?>';
|
136 |
var newtab = window.open( '', '_blank' );
|
137 |
newtab.location = url;
|
138 |
|
139 |
}
|
140 |
|
141 |
+
function sendActivation() {
|
142 |
+
$('malabi-email-error-message').update( "");
|
143 |
+
var email = $$('#malabi-activation-email')[0].value;
|
144 |
+
var createUser = '<?php echo $this->getUrl("productclick/product/createuser")."email/" ?>' +email;
|
145 |
+
|
146 |
+
var bodyJson = '{"firstName":"","userEmail":"'+ email +'","userPassword":"'+makeid()+'","acceptsMail":"true"}';
|
147 |
+
new Ajax.Request(createUser, {
|
148 |
+
method: 'post',
|
149 |
+
parameters: "email="+email,
|
150 |
+
contentType:"application/x-www-form-urlencoded",
|
151 |
+
onLoading: function (transport) {
|
152 |
+
|
153 |
+
},
|
154 |
+
onComplete: function(transport) {
|
155 |
+
console.log(transport.responseText);
|
156 |
+
var res = JSON.parse(transport.responseText);
|
157 |
+
if(res.status == "fail"){
|
158 |
+
if(res["message"] == "email_exists") {
|
159 |
+
console.log("This email already exists in the Malabi database - please insert different email for activation");
|
160 |
+
$('malabi-email-error-message').update( "This email already exists in the Malabi database - please insert different email for activation");
|
161 |
+
}
|
162 |
+
if(res["message"] == "email_notvalid") {
|
163 |
+
console.log("This email is not valid - please insert different email for activation");
|
164 |
+
$('malabi-email-error-message').update( "This email is not valid - please insert different email for activation");
|
165 |
+
}
|
166 |
+
|
167 |
+
} else {
|
168 |
+
$('malabi-email-message').update( "Account created.");
|
169 |
+
contentWin.close();
|
170 |
+
$('userid').setAttribute('value',res["userId"]);
|
171 |
+
$('token').setAttribute('value',res["userToken"]);
|
172 |
+
// $(selectElement).next().firstDescendant().src = res.resultImageURL;
|
173 |
+
// $(selectElement).next().firstDescendant().setAttribute("data-trackId", res.trackId);
|
174 |
+
// $(selectElement).next().setStyle({'display': "block"});
|
175 |
+
// $(selectElement).setStyle({'display': "none"});
|
176 |
+
}
|
177 |
+
|
178 |
+
}
|
179 |
+
});
|
180 |
+
}
|
181 |
+
function makeid()
|
182 |
+
{
|
183 |
+
var text = "";
|
184 |
+
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
185 |
+
|
186 |
+
for( var i=0; i < 8; i++ )
|
187 |
+
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
188 |
+
|
189 |
+
return text;
|
190 |
+
}
|
191 |
</script>
|
192 |
|
193 |
<div id="requestemail" style="display:none">
|
194 |
<p><span id='login_error_msg' class="login_error" style="display:none"> </span></p>
|
195 |
<div style="clear:both"></div>
|
196 |
+
<h4>Malabi Activation</h4>
|
197 |
+
<p>
|
198 |
+
<div class="login_label">Email</div> <span class="email_input">
|
199 |
+
<input id="malabi-activation-email" type="text" value="<?php echo $userEmail ?>" style="width: 250px;"/></span>
|
200 |
+
<div id="malabi-email-error-message" style="color:red;margin: 5px;"></div>
|
201 |
+
<span id="malabi-email-message" style="color:green;margin: 5px;"></span>
|
202 |
+
<br>
|
203 |
+
<div style="text-align: right">
|
204 |
+
<button onclick="sendActivation()">activate</button>
|
205 |
+
</div>
|
206 |
+
</p>
|
207 |
<div style="clear:both"></div>
|
208 |
+
</div>
|
209 |
+
<style>
|
210 |
+
.overlay_dialog {
|
211 |
+
background-color: #666666;
|
212 |
+
filter:alpha(opacity=60);
|
213 |
+
-moz-opacity: 0.6;
|
214 |
+
opacity: 0.6;
|
215 |
+
}
|
216 |
+
|
217 |
+
.overlay___invisible__ {
|
218 |
+
background-color: #666666;
|
219 |
+
filter:alpha(opacity=0);
|
220 |
+
-moz-opacity: 0;
|
221 |
+
opacity: 0;
|
222 |
+
}
|
223 |
+
|
224 |
+
.dialog_nw {
|
225 |
+
width: 9px;
|
226 |
+
height: 23px;
|
227 |
+
background: transparent url(default/top_left.gif) no-repeat 0 0;
|
228 |
+
}
|
229 |
+
|
230 |
+
.dialog_n {
|
231 |
+
background: transparent url(default/top_mid.gif) repeat-x 0 0;
|
232 |
+
height: 23px;
|
233 |
+
}
|
234 |
+
|
235 |
+
.dialog_ne {
|
236 |
+
width: 9px;
|
237 |
+
height: 23px;
|
238 |
+
background: transparent url(default/top_right.gif) no-repeat 0 0;
|
239 |
+
}
|
240 |
+
|
241 |
+
.dialog_e {
|
242 |
+
width: 2px;
|
243 |
+
background: transparent url(default/center_right.gif) repeat-y 0 0;
|
244 |
+
}
|
245 |
+
|
246 |
+
.dialog_w {
|
247 |
+
width: 2px;
|
248 |
+
background: transparent url(default/center_left.gif) repeat-y 0 0;
|
249 |
+
}
|
250 |
+
|
251 |
+
.dialog_sw {
|
252 |
+
width: 9px;
|
253 |
+
height: 19px;
|
254 |
+
background: transparent url(default/bottom_left.gif) no-repeat 0 0;
|
255 |
+
}
|
256 |
+
|
257 |
+
.dialog_s {
|
258 |
+
background: transparent url(default/bottom_mid.gif) repeat-x 0 0;
|
259 |
+
height: 19px;
|
260 |
+
}
|
261 |
+
|
262 |
+
.dialog_se {
|
263 |
+
width: 9px;
|
264 |
+
height: 19px;
|
265 |
+
background: transparent url(default/bottom_right.gif) no-repeat 0 0;
|
266 |
+
}
|
267 |
+
|
268 |
+
.dialog_sizer {
|
269 |
+
width: 9px;
|
270 |
+
height: 19px;
|
271 |
+
background: transparent url(default/sizer.gif) no-repeat 0 0;
|
272 |
+
cursor:se-resize;
|
273 |
+
}
|
274 |
+
|
275 |
+
.dialog_close {
|
276 |
+
width: 14px;
|
277 |
+
height: 14px;
|
278 |
+
background: transparent url(default/close.gif) no-repeat 0 0;
|
279 |
+
position:absolute;
|
280 |
+
top:5px;
|
281 |
+
left:8px;
|
282 |
+
cursor:pointer;
|
283 |
+
z-index:2000;
|
284 |
+
}
|
285 |
+
|
286 |
+
.dialog_minimize {
|
287 |
+
width: 14px;
|
288 |
+
height: 15px;
|
289 |
+
background: transparent url(default/minimize.gif) no-repeat 0 0;
|
290 |
+
position:absolute;
|
291 |
+
top:5px;
|
292 |
+
left:28px;
|
293 |
+
cursor:pointer;
|
294 |
+
z-index:2000;
|
295 |
+
}
|
296 |
+
|
297 |
+
.dialog_maximize {
|
298 |
+
width: 14px;
|
299 |
+
height: 15px;
|
300 |
+
background: transparent url(default/maximize.gif) no-repeat 0 0;
|
301 |
+
position:absolute;
|
302 |
+
top:5px;
|
303 |
+
left:49px;
|
304 |
+
cursor:pointer;
|
305 |
+
z-index:2000;
|
306 |
+
}
|
307 |
+
|
308 |
+
.dialog_title {
|
309 |
+
float:left;
|
310 |
+
height:14px;
|
311 |
+
font-family: Tahoma, Arial, sans-serif;
|
312 |
+
font-size:12px;
|
313 |
+
text-align:center;
|
314 |
+
width:100%;
|
315 |
+
color:#000;
|
316 |
+
}
|
317 |
+
|
318 |
+
.dialog_content {
|
319 |
+
overflow:auto;
|
320 |
+
color: #DDD;
|
321 |
+
font-family: Tahoma, Arial, sans-serif;
|
322 |
+
font-size: 10px;
|
323 |
+
background-color:#123;
|
324 |
+
}
|
325 |
+
|
326 |
+
.top_draggable, .bottom_draggable {
|
327 |
+
cursor:move;
|
328 |
+
}
|
329 |
+
|
330 |
+
.status_bar {
|
331 |
+
font-size:12px;
|
332 |
+
}
|
333 |
+
.status_bar input{
|
334 |
+
font-size:12px;
|
335 |
+
}
|
336 |
+
|
337 |
+
.wired_frame {
|
338 |
+
display: block;
|
339 |
+
position: absolute;
|
340 |
+
border: 1px #000 dashed;
|
341 |
+
}
|
342 |
+
|
343 |
+
/* DO NOT CHANGE THESE VALUES*/
|
344 |
+
.dialog {
|
345 |
+
display: block;
|
346 |
+
position: absolute;
|
347 |
+
}
|
348 |
+
|
349 |
+
.dialog table.table_window {
|
350 |
+
border-collapse: collapse;
|
351 |
+
border-spacing: 0;
|
352 |
+
width: 100%;
|
353 |
+
margin: 0px;
|
354 |
+
padding:0px;
|
355 |
+
}
|
356 |
+
|
357 |
+
.dialog table.table_window td , .dialog table.table_window th {
|
358 |
+
padding: 0;
|
359 |
+
}
|
360 |
+
|
361 |
+
.dialog .title_window {
|
362 |
+
-moz-user-select:none;
|
363 |
+
}
|
364 |
+
|
365 |
+
|
366 |
+
</style>
|
367 |
+
<link rel="stylesheet" type="text/css" href="/js/calendar/calendar-win2k-1.css"/>
|
368 |
+
<link rel="stylesheet" type="text/css" href="/js/extjs/resources/css/ext-all.css"/>
|
369 |
+
<link rel="stylesheet" type="text/css" href="/js/extjs/resources/css/ytheme-magento.css"/>
|
370 |
+
<link rel="stylesheet" type="text/css" href="/js/prototype/windows/themes/default.css"/>
|
371 |
+
<link rel="stylesheet" type="text/css" href="/skin/adminhtml/default/default/reset.css" media="all"/>
|
372 |
+
<link rel="stylesheet" type="text/css" href="/skin/adminhtml/default/default/boxes.css" media="all"/>
|
373 |
+
<link rel="stylesheet" type="text/css" href="/skin/adminhtml/default/default/custom.css" media="all"/>
|
374 |
+
<link rel="stylesheet" type="text/css" href="/skin/adminhtml/default/default/lib/prototype/windows/themes/magento.css" media="all"/>
|
375 |
+
<link rel="stylesheet" type="text/css" href="/skin/adminhtml/default/default/print.css" media="print"/>
|
376 |
+
<link rel="stylesheet" type="text/css" href="/skin/adminhtml/default/default/menu.css" media="screen, projection"/>
|
package.xml
CHANGED
@@ -1,29 +1,52 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Camera_Malabi</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
-
<license uri="https://www.malabi.co/eula
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
|
|
|
|
11 |

|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |

|
14 |
-
|
15 |

|
16 |
-
|
17 |
-
|
18 |

|
19 |
-
When entering the app, our algorithm automatically removes the backgrounds and delivers studio quality product images to all of your Magento uploaded photos. Once you view the outcome you decide which enhanced images to add to your product listings. 
|
20 |

|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
<
|
26 |
-
<
|
|
|
|
|
|
|
27 |
<compatible/>
|
28 |
<dependencies><required><php><min>5.3.1</min><max>5.7.0</max></php></required></dependencies>
|
29 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Camera_Malabi</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="https://www.malabi.co/eula">Malabi EULA and privacy policy</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Malabi Background Remover will automatically remove the background from any image.</summary>
|
10 |
+
<description>Remove background from multiple images in seconds with <a href="https://www.malabi.co">Malabi</a>.
|
11 |
+
<br />
|
12 |
+
<br />The automatic image background remover by Malabi will quickly remove the background from any product photo. Our patented technology does all the work for you. <br />
|
13 |

|
14 |
+
&star; <b>Try out Malabi Background Remover for FREE</b>&star; <b>After free trial pay ONLY $5 per month for unlimited number of images!</b>&star; 
|
15 |
+
<br />
|
16 |
+
<br /> Malabi is a computer-vision based technology that will allow any Magento seller remove backgrounds from product images quickly and easily in seconds, saving money and time!
|
17 |
+
<br />
|
18 |
+
<br />When selling a product online, image quality is crucial. A professional looking image means higher conversion rates. <br />Malabi is a fast, simple and cost effective solution for Magento seller’s needs.
|
19 |
+
<br />
|
20 |
+
<br />When entering the app, our algorithm automatically removes the backgrounds and delivers studio quality product images to all of your Magento uploaded photos. 
|
21 |
+
Once you view the outcome you decide which enhanced images to add to your product listings.
|
22 |
+
<br />
|
23 |
+
<br />If the automatically enhanced image is not good enough for you, you can always manually edit the outcome by using the 'Touch up’ mode.
|
24 |
+
<br />
|
25 |
+
<br />Malabi offers:
|
26 |
+
<br />
|
27 |
+
<br />
|
28 |
+
<ul><li /> &check; <b>Automatic background removal.</b>
|
29 |
+
<li />&check; <b>Immediate Results.</b>
|
30 |
+
<li />&check; <b>Studio quality images.</b>
|
31 |
+
<li />&check; <b>Choose between transparent or White background.</b>
|
32 |
+
<li />&check; <b>Choose between with or without shadow.</b>
|
33 |
+
<li />&check; <b>Manual 'Touch up' mode.</b></ul>
|
34 |

|
35 |
+
Malabi’s enhanced images ensures a faster and more profitable sale!
|
36 |

|
37 |
+

|
38 |
+
<p /> Become an affiliate of Malabi Background Remover - Write us to info@malabi.co
|
39 |

|
|
|
40 |

|
41 |
+
<br />
|
42 |
+

|
43 |
+
<br /> By using Malabi Background Remover you accept the terms of its <a href="http://www.malabi.co/eula">EULA and privacy policy</a>.
|
44 |
+
© Copyright ArtInCam Ltd. (2017). All rights reserved.</description>
|
45 |
+
<notes>Create account in extension page.</notes>
|
46 |
+
<authors><author><name>Ronen</name><user>Malabi</user><email>info@malabi.co</email></author></authors>
|
47 |
+
<date>2017-03-16</date>
|
48 |
+
<time>09:17:38</time>
|
49 |
+
<contents><target name="magelocal"><dir name="Camera"><dir name="Malabi"><dir name="Block"><dir name="Adminhtml"><dir name="Productclick"><dir name="Edit"><file name="Form.php" hash="d123f3e614dbea83917283162163c713"/><dir name="Renderer"><file name="Urls.php" hash="dff3ec0ca9b46977f9544498b6ae8532"/></dir></dir><file name="Edit.php" hash="fa6562d8bb6ef549b4c585cfd55ee350"/></dir><file name="Productclick.php" hash="0b08e8a9e55910e35ec3fa00f10ff1f4"/></dir></dir><dir name="Helper"><file name="Data.php" hash="2bc4e4b0706da3774cb7248c12d150c7"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Productclick"><file name="Collection.php" hash="b94110ec7a16a54e2b9e50724f83da47"/></dir><file name="Productclick.php" hash="890d56f493c01d964a7b629bf6a4e322"/></dir><file name="Observer.php" hash="4629e9d62d4648b27e550534b047276e"/><file name="Productclick.php" hash="ef0cf5873bf9947eb2aa45b3f50212ed"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ProductclickController.php" hash="f0d7345cb71b68deedf13964ce75582b"/></dir><file name="ProductController.php" hash="dad3eba8eb57c19e4cf2e12d03fec2a3"/></dir><dir name="etc"><file name="config.xml" hash="c5f55d8a8842ffb53efdf64a045c6983"/></dir><dir name="sql"><dir name="productclick_setup"><file name="mysql4-install-0.1.0.php" hash="bdf82a0397e524ac47f20179bdd0f9d2"/></dir></dir></dir></dir><dir name="Mage"><dir name="Adminhtml"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="Helper"><dir name="Form"><dir name="Gallery"><file name="Content.php" hash="214e148885166f36bf4126d11ebc1da8"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Camera_Malabi.xml" hash="da762d589eddd255b0a522081c2f958c"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="productclick.xml" hash="579ea5b43a32dfafaec53096c2ec292e"/></dir><dir name="template"><dir name="catalog"><dir name="product"><dir name="helper"><file name="gallery-new.phtml" hash="59f618000cf6edd81aca24be1a169ec3"/></dir></dir></dir><dir name="malabi"><file name="urls.phtml" hash="429b9e19508e8faf60d3cce5220babb0"/></dir></dir></dir></dir></dir></target></contents>
|
50 |
<compatible/>
|
51 |
<dependencies><required><php><min>5.3.1</min><max>5.7.0</max></php></required></dependencies>
|
52 |
</package>
|