zinc - Version 1.0.4

Version Notes

Zinc enables online merchants to seamlessly offer product protection insurance and warranty plans for their products. Similar to a white-labelled Apple Care experience, after a quick on-boarding process, merchants would be able to deploy an “insure” button on their site, and Zinc takes care of the rest to issue, bind and support the insurance and warranty contracts.
Zinc partners with the best insurance and warranty providers to offer tailored policies for each merchant. For product lines including jewelries, furniture, apparels, sporting goods and consumer electronics, enjoy the additional margin and improved customer satisfaction without writing a single line of code.

Download this release

Release Info

Developer ZincPlatform
Extension zinc
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/local/Zinc/Carebyzinc/Block/Adminhtml/Catalog/Product/Grid.php CHANGED
@@ -10,7 +10,6 @@ class Zinc_Carebyzinc_Block_Adminhtml_Catalog_Product_Grid extends Mage_Adminhtm
10
11
public function setCollection($collection)
12
{
13
- //$collection->addAttributeToSelect('carebyzinc');
14
$collection->addExpressionAttributeToSelect('carebyzinc','round({{carebyzinc}},0)','carebyzinc');
15
parent::setCollection($collection);
16
}
10
11
public function setCollection($collection)
12
{
13
$collection->addExpressionAttributeToSelect('carebyzinc','round({{carebyzinc}},0)','carebyzinc');
14
parent::setCollection($collection);
15
}
app/code/local/Zinc/Carebyzinc/Block/Adminhtml/Order/Grid.php CHANGED
@@ -52,15 +52,20 @@ class Zinc_Carebyzinc_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Wi
52
'align' =>'left',
53
'index' => 'product_name',
54
));
55
$this->addColumn('price', array(
56
'header' => Mage::helper('carebyzinc')->__('Price'),
57
'align' =>'left',
58
'index' => 'product_price',
59
));
60
$this->addColumn('warrenty_price', array(
61
- 'header' => Mage::helper('carebyzinc')->__('Warrenty Price'),
62
'align' =>'left',
63
'index' => 'warrenty_price',
64
));
65
66
$this->addColumn('customer_name', array(
@@ -75,8 +80,16 @@ class Zinc_Carebyzinc_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Wi
75
'index' => 'customer_email',
76
));
77
78
- $this->addColumn('carebyzinc_key', array(
79
- 'header' => Mage::helper('carebyzinc')->__('Care by Zinc Key'),
80
'align' =>'right',
81
'index' => 'carebyzinc_key',
82
));
@@ -97,6 +110,11 @@ class Zinc_Carebyzinc_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Wi
97
}
98
return false;
99
}
100
101
102
}
52
'align' =>'left',
53
'index' => 'product_name',
54
));
55
+ $store = $this->_getStore();
56
$this->addColumn('price', array(
57
'header' => Mage::helper('carebyzinc')->__('Price'),
58
'align' =>'left',
59
+ 'type' => 'price',
60
'index' => 'product_price',
61
+ 'currency_code' => $store->getBaseCurrency()->getCode(),
62
));
63
$this->addColumn('warrenty_price', array(
64
+ 'header' => Mage::helper('carebyzinc')->__('Premium'),
65
'align' =>'left',
66
+ 'type' => 'price',
67
'index' => 'warrenty_price',
68
+ 'currency_code' => $store->getBaseCurrency()->getCode(),
69
));
70
71
$this->addColumn('customer_name', array(
80
'index' => 'customer_email',
81
));
82
83
+ $this->addColumn('order_created_mode', array(
84
+ 'header' => Mage::helper('carebyzinc')->__('Orders Made To'),
85
+ 'align' =>'left',
86
+ 'index' => 'order_created_mode',
87
+ 'type' => 'options',
88
+ 'options' => Mage::getSingleton('carebyzinc/order')->getOptionArray(),
89
+ ));
90
+
91
+ $this->addColumn('carebyzinc_key', array(
92
+ 'header' => Mage::helper('carebyzinc')->__('Zinc Policy ID'),
93
'align' =>'right',
94
'index' => 'carebyzinc_key',
95
));
110
}
111
return false;
112
}
113
+ protected function _getStore()
114
+ {
115
+ $storeId = (int) $this->getRequest()->getParam('store', 0);
116
+ return Mage::app()->getStore($storeId);
117
+ }
118
119
120
}
app/code/local/Zinc/Carebyzinc/Block/Adminhtml/Product/Grid.php CHANGED
@@ -19,12 +19,12 @@ class Zinc_Carebyzinc_Block_Adminhtml_Product_Grid extends Mage_Adminhtml_Block_
19
public function setCollection($collection)
20
{
21
22
- //$collection->addAttributeToSelect('carebyzinc');
23
$collection->addFieldToFilter('price',array('gteq' => 500));
24
$collection->addAttributeToSelect('carebyzinc');
25
$collection->addExpressionAttributeToSelect('carebyzinc','round({{carebyzinc}},0)','carebyzinc');
26
- parent::setCollection($collection);
27
-
28
}
29
30
protected function _prepareColumns()
@@ -75,6 +75,18 @@ class Zinc_Carebyzinc_Block_Adminhtml_Product_Grid extends Mage_Adminhtml_Block_
75
'type' => 'options',
76
'options' => array('1' => 'Enable', '0' => 'Disable')
77
));
78
$this->addColumn('action', array(
79
'header' => Mage::helper('carebyzinc')->__('Action'),
80
'width' => '100',
19
public function setCollection($collection)
20
{
21
22
$collection->addFieldToFilter('price',array('gteq' => 500));
23
$collection->addAttributeToSelect('carebyzinc');
24
+ $collection->addAttributeToSelect('carebyzinc_category');
25
+ //$collection->addAttributeToSelect('carebyzinc_subcategory');
26
$collection->addExpressionAttributeToSelect('carebyzinc','round({{carebyzinc}},0)','carebyzinc');
27
+ parent::setCollection($collection);
28
}
29
30
protected function _prepareColumns()
75
'type' => 'options',
76
'options' => array('1' => 'Enable', '0' => 'Disable')
77
));
78
+
79
+ $this->addColumn('carebyzinc_category',
80
+ array(
81
+ 'header'=> Mage::helper('catalog')->__('Category'),
82
+ 'index' => 'carebyzinc_category',
83
+ ));
84
+ /* $this->addColumn('carebyzinc_subcategory',
85
+ array(
86
+ 'header'=> Mage::helper('catalog')->__('Subcategory'),
87
+ 'index' => 'carebyzinc_subcategory',
88
+ ));*/
89
+
90
$this->addColumn('action', array(
91
'header' => Mage::helper('carebyzinc')->__('Action'),
92
'width' => '100',
app/code/local/Zinc/Carebyzinc/Helper/Data.php CHANGED
@@ -16,7 +16,8 @@ class Zinc_Carebyzinc_Helper_Data extends Mage_Core_Helper_Abstract
16
$zip = '';
17
if(Mage::getSingleton('customer/session')->isLoggedIn()){
18
$primaryAddress = Mage::getSingleton('customer/session')->getCustomer()->getPrimaryShippingAddress();
19
- if($primaryAddress->getPostcode()){
20
$zip = $primaryAddress->getPostcode();
21
}
22
}
16
$zip = '';
17
if(Mage::getSingleton('customer/session')->isLoggedIn()){
18
$primaryAddress = Mage::getSingleton('customer/session')->getCustomer()->getPrimaryShippingAddress();
19
+ if($primaryAddress){
20
+ if($primaryAddress->getPostcode())
21
$zip = $primaryAddress->getPostcode();
22
}
23
}
app/code/local/Zinc/Carebyzinc/Model/Carebyzinc.php CHANGED
@@ -119,25 +119,48 @@ class Zinc_Carebyzinc_Model_Carebyzinc extends Mage_Core_Model_Abstract
119
$path = Mage::getStoreConfig('carebyzinc/api/url');
120
else
121
$path = Mage::getStoreConfig('carebyzinc/api/test_url');
122
-
123
- $url = $path.'/'.$action;
124
return $url;
125
}
126
127
- private function getUserId()
128
{
129
- $userId = Mage::getStoreConfig('carebyzinc/api/user_id');
130
return $userId;
131
}
132
133
public function callApi($data, $action, $method = 'post'){
134
$outData = array();
135
$values = json_encode($data);
136
$url = $this->getApiUrl($action);
137
$uid = $this->getUserId();
138
- $token = Mage::getStoreConfig('carebyzinc/api/access_token');
139
- $client = Mage::getStoreConfig('carebyzinc/api/client');
140
- $header = array( "Content-Type: application/json","uid:$uid","access-token:$token","client:$client","token-type:Bearer");
141
$ch = curl_init($url);
142
curl_setopt($ch, CURLOPT_URL, $url);
143
if($method == 'post'){
@@ -147,6 +170,7 @@ class Zinc_Carebyzinc_Model_Carebyzinc extends Mage_Core_Model_Abstract
147
curl_setopt($ch, CURLOPT_HEADER ,FALSE);
148
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
149
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,TRUE);
150
$outData['response'] = curl_exec($ch);
151
$outData['code'] = curl_getinfo($ch, CURLINFO_HTTP_CODE);
152
curl_close($ch);
119
$path = Mage::getStoreConfig('carebyzinc/api/url');
120
else
121
$path = Mage::getStoreConfig('carebyzinc/api/test_url');
122
+ if(Mage::getStoreConfig('carebyzinc/api/protocol') == 'https')
123
+ $protocol = 'https://' ;
124
+ else
125
+ $protocol = 'http://' ;
126
+ $url = $protocol.$path.'/'.$action;
127
return $url;
128
}
129
130
+ public function getUserId()
131
{
132
+
133
+ if((Mage::getStoreConfig('carebyzinc/api/testmode')) == 'live')
134
+ $userId = Mage::getStoreConfig('carebyzinc/api/user_id');
135
+ else
136
+ $userId = Mage::getStoreConfig('carebyzinc/api/test_user_id');
137
return $userId;
138
}
139
+ public function getToken()
140
+ {
141
+
142
+ if((Mage::getStoreConfig('carebyzinc/api/testmode')) == 'live')
143
+ $token = Mage::getStoreConfig('carebyzinc/api/xuser_token');
144
+ else
145
+ $token = Mage::getStoreConfig('carebyzinc/api/test_xuser_token');
146
+ return $token;
147
+ }
148
149
public function callApi($data, $action, $method = 'post'){
150
$outData = array();
151
$values = json_encode($data);
152
$url = $this->getApiUrl($action);
153
$uid = $this->getUserId();
154
+ $token = $this->getToken();
155
+ $email = Mage::getStoreConfig('carebyzinc/api/xuser_email');
156
+ if(($action =='price_quotes/generate') || ($action == 'policies' ))
157
+ $header = array( "Content-Type: application/json","uid:$uid","X-User-Token:$token","X-User-Email:$email","token-type:Bearer");
158
+ elseif($action == 'token')
159
+ $header = array( "Content-Type: application/json","X-User-Token:$token","X-User-Email:$email","token-type:Bearer");
160
+
161
+ else
162
+ $header = array( "Content-Type: application/json","uid:$uid","token-type:Bearer");
163
+
164
$ch = curl_init($url);
165
curl_setopt($ch, CURLOPT_URL, $url);
166
if($method == 'post'){
170
curl_setopt($ch, CURLOPT_HEADER ,FALSE);
171
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
172
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,TRUE);
173
+ curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
174
$outData['response'] = curl_exec($ch);
175
$outData['code'] = curl_getinfo($ch, CURLINFO_HTTP_CODE);
176
curl_close($ch);
app/code/local/Zinc/Carebyzinc/Model/Checkout/Cart.php CHANGED
@@ -119,7 +119,6 @@ class Zinc_Carebyzinc_Model_Checkout_Cart extends Mage_Checkout_Model_Cart
119
120
Mage::dispatchEvent('checkout_cart_product_add_after', array('quote_item' => $result, 'product' => $product));
121
$this->getCheckoutSession()->setLastAddedProductId($productId);
122
- //}Mage::getSingleton('core/session')->unsCareQuote();
123
}else{
124
if ($productId) {
125
try {
119
120
Mage::dispatchEvent('checkout_cart_product_add_after', array('quote_item' => $result, 'product' => $product));
121
$this->getCheckoutSession()->setLastAddedProductId($productId);
122
}else{
123
if ($productId) {
124
try {
app/code/local/Zinc/Carebyzinc/Model/Order.php CHANGED
@@ -7,6 +7,9 @@
7
*/
8
class Zinc_Carebyzinc_Model_Order extends Mage_Core_Model_Abstract
9
{
10
public function _construct()
11
{
12
parent::_construct();
@@ -20,12 +23,23 @@ class Zinc_Carebyzinc_Model_Order extends Mage_Core_Model_Abstract
20
$currencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
21
$data['user_id'] = $this->getUserId();
22
$data['customer'] = $this->getUserAddress($order);
23
- $carebyItem = 0;
24
- $orderItems = $order->getAllVisibleItems();
25
- $model = Mage::getModel('carebyzinc/carebyzinc');
26
foreach($orderItems as $item){
27
if($item->getCarebyzincOption()){
28
- $carebyItem++;
29
$policyNo = '';
30
$carebyzincAry = (array) unserialize($item->getCarebyzincOption()) ;
31
$product = Mage::getModel('catalog/product')->load($item->getProductId());
@@ -36,7 +50,9 @@ class Zinc_Carebyzinc_Model_Order extends Mage_Core_Model_Abstract
36
if($result['code'] == 200){
37
$policyArray = (array) json_decode($policyAry);
38
$policyNo = $policyArray['policy_id'];
39
- }
40
$careOrder = Mage::getModel('carebyzinc/order');
41
$careOrder->setOrderId($order->getId());
42
$careOrder->setProductId($item->getProductId());
@@ -54,7 +70,9 @@ class Zinc_Carebyzinc_Model_Order extends Mage_Core_Model_Abstract
54
$careOrder->setCustomerName($name);
55
$careOrder->setCustomerEmail($order->getCustomerEmail());
56
$careOrder->setCreatedTime(now());
57
$careOrder->save();
58
}
59
}
60
if($carebyItem){
@@ -65,21 +83,22 @@ class Zinc_Carebyzinc_Model_Order extends Mage_Core_Model_Abstract
65
$name = 'Zinc';
66
$templateId = Mage::getStoreConfig('sales_email/order/template');
67
if($email){
68
- $storeObj = Mage::getModel('core/store')->load($order->getStoreId());
69
- $anyDate = $order->getCreatedAt();
70
- $dateTimestamp = Mage::getModel('core/date')->timestamp(strtotime($anyDate));
71
- $date = date("Y-m-d",$dateTimestamp);
72
- $subject = $this->getUserId().'_policyid_'.$storeObj->getFrontendName().'_'.$date;
73
- $emailTemplate = Mage::getModel('core/email_template')->loadDefault('sales_email_order_template');
74
- $emailTemplateVariables = array();
75
- $emailTemplateVariables['order'] = $order;
76
- $emailTemplateVariables['store'] = $storeObj;
77
- $emailTemplate->setSenderName($fromname);
78
- $emailTemplate->setSenderEmail($fromemail);
79
- $emailTemplate->setType('html');
80
- $emailTemplate->setTemplateSubject($subject);
81
- $emailTemplate->send($email, $name, $emailTemplateVariables);
82
-
83
84
}
85
@@ -111,4 +130,15 @@ class Zinc_Carebyzinc_Model_Order extends Mage_Core_Model_Abstract
111
return $address;
112
113
}
114
}
7
*/
8
class Zinc_Carebyzinc_Model_Order extends Mage_Core_Model_Abstract
9
{
10
+
11
+ const PRODUCTION = 1;
12
+ const SANDBOX = 0;
13
public function _construct()
14
{
15
parent::_construct();
23
$currencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
24
$data['user_id'] = $this->getUserId();
25
$data['customer'] = $this->getUserAddress($order);
26
+ $carebyItem = 0;$policyKeyArray = array();
27
+ $orderItems = $order->getAllVisibleItems();
28
+ $fromname = Mage::getStoreConfig('trans_email/ident_general/name');
29
+ $fromemail = Mage::getStoreConfig('trans_email/ident_general/email');
30
+ $translate = Mage::getSingleton('core/translate');
31
+ $email = 'support@zincplatform.com';
32
+ $name = 'Zinc';
33
+ $templateId = Mage::getStoreConfig('sales_email/order/template');
34
+
35
+ $model = Mage::getModel('carebyzinc/carebyzinc');
36
+ if((Mage::getStoreConfig('carebyzinc/api/testmode')) == 'live')
37
+ $mode = 1;
38
+ else
39
+ $mode = 0;
40
foreach($orderItems as $item){
41
if($item->getCarebyzincOption()){
42
+
43
$policyNo = '';
44
$carebyzincAry = (array) unserialize($item->getCarebyzincOption()) ;
45
$product = Mage::getModel('catalog/product')->load($item->getProductId());
50
if($result['code'] == 200){
51
$policyArray = (array) json_decode($policyAry);
52
$policyNo = $policyArray['policy_id'];
53
+ }
54
+ $policyKeyArray[] = $policyNo;
55
+ $carebyItem++;
56
$careOrder = Mage::getModel('carebyzinc/order');
57
$careOrder->setOrderId($order->getId());
58
$careOrder->setProductId($item->getProductId());
70
$careOrder->setCustomerName($name);
71
$careOrder->setCustomerEmail($order->getCustomerEmail());
72
$careOrder->setCreatedTime(now());
73
+ $careOrder->setOrderCreatedMode($mode);
74
$careOrder->save();
75
+
76
}
77
}
78
if($carebyItem){
83
$name = 'Zinc';
84
$templateId = Mage::getStoreConfig('sales_email/order/template');
85
if($email){
86
+ for($i =0;$i<count($policyKeyArray);$i++){
87
+ $storeObj = Mage::getModel('core/store')->load($order->getStoreId());
88
+ $anyDate = $order->getCreatedAt();
89
+ $dateTimestamp = Mage::getModel('core/date')->timestamp(strtotime($anyDate));
90
+ $date = date("Y-m-d",$dateTimestamp);
91
+ $subject = $this->getUserId().'_'.$policyKeyArray[$i].'_'.$storeObj->getFrontendName().'_'.$date;
92
+ $emailTemplate = Mage::getModel('core/email_template')->loadDefault('sales_email_order_template');
93
+ $emailTemplateVariables = array();
94
+ $emailTemplateVariables['order'] = $order;
95
+ $emailTemplateVariables['store'] = $storeObj;
96
+ $emailTemplate->setSenderName($fromname);
97
+ $emailTemplate->setSenderEmail($fromemail);
98
+ $emailTemplate->setType('html');
99
+ $emailTemplate->setTemplateSubject($subject);
100
+ $emailTemplate->send($email, $name, $emailTemplateVariables);
101
+ }
102
103
}
104
130
return $address;
131
132
}
133
+
134
+
135
+
136
+
137
+ static public function getOptionArray()
138
+ {
139
+ return array(
140
+ self::PRODUCTION => Mage::helper('carebyzinc')->__('Production'),
141
+ self::SANDBOX => Mage::helper('carebyzinc')->__('Sandbox')
142
+ );
143
+ }
144
}
app/code/local/Zinc/Carebyzinc/Model/System/Config/Protocol.php ADDED
@@ -0,0 +1,23 @@
1
+ <?php
2
+ /**
3
+ * ZincPlatform
4
+ * @package Zinc_Carebyzinc
5
+ * @copyright Copyright (c) 2016-2017 Zinplatform (http://www.zincplatform.com/)
6
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
7
+ */
8
+ class Zinc_Carebyzinc_Model_System_Config_Protocol
9
+ {
10
+ public function toOptionArray()
11
+ {
12
+ return array(
13
+ array(
14
+ 'value' => 'http',
15
+ 'label' => 'http',
16
+ ),
17
+ array(
18
+ 'value' => 'https',
19
+ 'label' => 'https',
20
+ ),
21
+ );
22
+ }
23
+ }
app/code/local/Zinc/Carebyzinc/controllers/Adminhtml/CarebyzincController.php CHANGED
@@ -9,12 +9,13 @@ class Zinc_Carebyzinc_Adminhtml_CarebyzincController extends Mage_Adminhtml_Cont
9
{
10
public function validateAction()
11
{
12
- $data['uid'] = Mage::getStoreConfig('carebyzinc/api/user_id');
13
- $data['access-token'] = Mage::getStoreConfig('carebyzinc/api/access_token');
14
- $data['client'] = Mage::getStoreConfig('carebyzinc/api/client');
15
16
- $model = Mage::getModel('carebyzinc/carebyzinc');
17
- $result = $model->callApi($data,'auth/validate_token','get');
18
if($result['code'] == 200)
19
$response = 'Success';
20
else
9
{
10
public function validateAction()
11
{
12
+ $model = Mage::getModel('carebyzinc/carebyzinc');
13
+ $data['uid'] = $model->getUserId();
14
+ $data['X-User-Token'] = $model->getToken();
15
+ $data['X-User-Email'] = Mage::getStoreConfig('carebyzinc/api/xuser_email');
16
17
+
18
+ $result = $model->callApi($data,'token','post');
19
if($result['code'] == 200)
20
$response = 'Success';
21
else
app/code/local/Zinc/Carebyzinc/controllers/IndexController.php CHANGED
@@ -28,9 +28,7 @@ class Zinc_Carebyzinc_IndexController extends Mage_Core_Controller_Front_Action
28
$this->loadLayout();
29
$product = Mage::getModel('catalog/product')->load($product_id);
30
if(! empty($configOptionsArray)){
31
- //$childProduct = Mage::getModel('catalog/product_type_configurable')->getProductByAttributes( $configOptionsArray, $product);
32
- //$product = Mage::getModel('catalog/product')->load($childProduct->getId());
33
- $attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
34
$priceVal = 0;
35
foreach ($attributes as $attribute){
36
$prices = $attribute->getPrices();
@@ -89,7 +87,6 @@ class Zinc_Carebyzinc_IndexController extends Mage_Core_Controller_Front_Action
89
$item->getProduct()->setIsSuperMode(true);
90
if($price = $carebyzincItem['price_per_year']){
91
$product = Mage::getModel('catalog/product')->load($item->getProductId());
92
- //$productPrice = $product->getFinalPrice();
93
$productPrice = $item->getProduct()->getFinalPrice();
94
$newPrice = $productPrice + $price;
95
$item->setCarebyzincPrice($price);
28
$this->loadLayout();
29
$product = Mage::getModel('catalog/product')->load($product_id);
30
if(! empty($configOptionsArray)){
31
+ $attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
32
$priceVal = 0;
33
foreach ($attributes as $attribute){
34
$prices = $attribute->getPrices();
87
$item->getProduct()->setIsSuperMode(true);
88
if($price = $carebyzincItem['price_per_year']){
89
$product = Mage::getModel('catalog/product')->load($item->getProductId());
90
$productPrice = $item->getProduct()->getFinalPrice();
91
$newPrice = $productPrice + $price;
92
$item->setCarebyzincPrice($price);
app/code/local/Zinc/Carebyzinc/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
<config>
11
<modules>
12
<Zinc_Carebyzinc>
13
- <version>1.0.3</version>
14
</Zinc_Carebyzinc>
15
</modules>
16
<frontend>
@@ -170,4 +170,12 @@
170
</carebyzinc>
171
</helpers>
172
</global>
173
</config>
10
<config>
11
<modules>
12
<Zinc_Carebyzinc>
13
+ <version>1.0.4</version>
14
</Zinc_Carebyzinc>
15
</modules>
16
<frontend>
170
</carebyzinc>
171
</helpers>
172
</global>
173
+ <default>
174
+ <carebyzinc>
175
+ <general>
176
+ <showquote>0</showquote>
177
+ <carebytitle>Care by Zinc</carebytitle>
178
+ </general>
179
+ </carebyzinc>
180
+ </default>
181
</config>
app/code/local/Zinc/Carebyzinc/etc/system.xml CHANGED
@@ -40,7 +40,7 @@
40
<source_model>adminhtml/system_config_source_Yesno</source_model>
41
</enabled>
42
<carebytitle>
43
- <label>Title</label>
44
<sort_order>20</sort_order>
45
<show_in_default>1</show_in_default>
46
<show_in_website>1</show_in_website>
@@ -75,6 +75,15 @@
75
<show_in_website>1</show_in_website>
76
<show_in_store>1</show_in_store>
77
<fields>
78
<testmode>
79
<label>Test / Production Mode</label>
80
<frontend_type>select</frontend_type>
@@ -86,7 +95,12 @@
86
</testmode>
87
<test_url>
88
<label>Test API URL</label>
89
- <frontend_type>text</frontend_type>
90
<sort_order>15</sort_order>
91
<show_in_default>1</show_in_default>
92
<show_in_website>1</show_in_website>
@@ -95,6 +109,11 @@
95
<url>
96
<label>Production API URL</label>
97
<frontend_type>text</frontend_type>
98
<sort_order>10</sort_order>
99
<show_in_default>1</show_in_default>
100
<show_in_website>1</show_in_website>
@@ -103,27 +122,63 @@
103
<user_id>
104
<label>User ID</label>
105
<frontend_type>text</frontend_type>
106
<sort_order>20</sort_order>
107
<show_in_default>1</show_in_default>
108
<show_in_website>1</show_in_website>
109
<show_in_store>1</show_in_store>
110
</user_id>
111
- <access_token>
112
- <label>Access Token</label>
113
<frontend_type>text</frontend_type>
114
<sort_order>30</sort_order>
115
<show_in_default>1</show_in_default>
116
<show_in_website>1</show_in_website>
117
<show_in_store>1</show_in_store>
118
- </access_token>
119
- <client>
120
- <label>Client</label>
121
- <frontend_type>text</frontend_type>
122
<sort_order>40</sort_order>
123
<show_in_default>1</show_in_default>
124
<show_in_website>1</show_in_website>
125
<show_in_store>1</show_in_store>
126
- </client>
127
<validate translate="label" module="carebyzinc">
128
<comment>Please save configuration value before validating.</comment>
129
<frontend_type>button</frontend_type>
40
<source_model>adminhtml/system_config_source_Yesno</source_model>
41
</enabled>
42
<carebytitle>
43
+ <label>Display Label</label>
44
<sort_order>20</sort_order>
45
<show_in_default>1</show_in_default>
46
<show_in_website>1</show_in_website>
75
<show_in_website>1</show_in_website>
76
<show_in_store>1</show_in_store>
77
<fields>
78
+ <protocol>
79
+ <label>Protocol</label>
80
+ <frontend_type>select</frontend_type>
81
+ <sort_order>0</sort_order>
82
+ <source_model>carebyzinc/system_config_protocol</source_model>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_website>1</show_in_website>
85
+ <show_in_store>1</show_in_store>
86
+ </protocol>
87
<testmode>
88
<label>Test / Production Mode</label>
89
<frontend_type>select</frontend_type>
95
</testmode>
96
<test_url>
97
<label>Test API URL</label>
98
+ <frontend_type>text</frontend_type>
99
+ <depends>
100
+ <testmode>
101
+ <value>test</value>
102
+ </testmode>
103
+ </depends>
104
<sort_order>15</sort_order>
105
<show_in_default>1</show_in_default>
106
<show_in_website>1</show_in_website>
109
<url>
110
<label>Production API URL</label>
111
<frontend_type>text</frontend_type>
112
+ <depends>
113
+ <testmode>
114
+ <value>live</value>
115
+ </testmode>
116
+ </depends>
117
<sort_order>10</sort_order>
118
<show_in_default>1</show_in_default>
119
<show_in_website>1</show_in_website>
122
<user_id>
123
<label>User ID</label>
124
<frontend_type>text</frontend_type>
125
+ <depends>
126
+ <testmode>
127
+ <value>live</value>
128
+ </testmode>
129
+ </depends>
130
<sort_order>20</sort_order>
131
<show_in_default>1</show_in_default>
132
<show_in_website>1</show_in_website>
133
<show_in_store>1</show_in_store>
134
</user_id>
135
+ <xuser_token>
136
+ <label>X-User-Token</label>
137
<frontend_type>text</frontend_type>
138
+ <depends>
139
+ <testmode>
140
+ <value>live</value>
141
+ </testmode>
142
+ </depends>
143
<sort_order>30</sort_order>
144
<show_in_default>1</show_in_default>
145
<show_in_website>1</show_in_website>
146
<show_in_store>1</show_in_store>
147
+ </xuser_token>
148
+ <test_user_id>
149
+ <label>Test API User ID</label>
150
+ <frontend_type>text</frontend_type>
151
+ <depends>
152
+ <testmode>
153
+ <value>test</value>
154
+ </testmode>
155
+ </depends>
156
+ <sort_order>20</sort_order>
157
+ <show_in_default>1</show_in_default>
158
+ <show_in_website>1</show_in_website>
159
+ <show_in_store>1</show_in_store>
160
+ </test_user_id>
161
+ <test_xuser_token>
162
+ <label>Test API X-User-Token</label>
163
+ <frontend_type>text</frontend_type>
164
+ <depends>
165
+ <testmode>
166
+ <value>test</value>
167
+ </testmode>
168
+ </depends>
169
+ <sort_order>30</sort_order>
170
+ <show_in_default>1</show_in_default>
171
+ <show_in_website>1</show_in_website>
172
+ <show_in_store>1</show_in_store>
173
+ </test_xuser_token>
174
+ <xuser_email>
175
+ <label>X-User-Email</label>
176
+ <frontend_type>text</frontend_type>
177
<sort_order>40</sort_order>
178
<show_in_default>1</show_in_default>
179
<show_in_website>1</show_in_website>
180
<show_in_store>1</show_in_store>
181
+ </xuser_email>
182
<validate translate="label" module="carebyzinc">
183
<comment>Please save configuration value before validating.</comment>
184
<frontend_type>button</frontend_type>
app/code/local/Zinc/Carebyzinc/sql/carebyzinc_setup/mysql4-upgrade-1.0.0-1.0.1.php CHANGED
@@ -24,7 +24,7 @@ $this->getConnection()
24
25
$switch = new Mage_Core_Model_Config();
26
27
- $switch ->saveConfig('carebyzinc/general/carebytitle', "Care By Zinc", 'default', 0);
28
29
30
24
25
$switch = new Mage_Core_Model_Config();
26
27
+ $switch->saveConfig('carebyzinc/general/carebytitle', "Care by Zinc", 'default', 0);
28
29
30
app/code/local/Zinc/Carebyzinc/sql/carebyzinc_setup/mysql4-upgrade-1.0.3-1.0.4.php ADDED
@@ -0,0 +1,16 @@
1
+ <?php
2
+ /**
3
+ * ZincPlatform
4
+ * @package Zinc_Carebyzinc
5
+ * @copyright Copyright (c) 2016-2017 Zinplatform (http://www.zincplatform.com/)
6
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
7
+ */
8
+
9
+ $installer = $this;
10
+ $installer->startSetup();
11
+
12
+ $this->startSetup();
13
+
14
+ $this->getConnection()
15
+ ->addColumn($installer->getTable('zinc_carebyzinc_order'),'order_created_mode',"INT(11) COMMENT 'OrderCreatedMode'");
16
+
app/design/frontend/base/default/template/carebyzinc/carebyzinc.phtml CHANGED
@@ -58,8 +58,7 @@ function showCarebyzinc(){
58
$('carebyzincCnt').update(content);
59
jQuery("#care-loader").removeClass('show');
60
jQuery( "button" ).removeClass( "selected" );
61
- // jQuery(".showCarebyzinc").hide();
62
- // jQuery("#zipcode").hide();
63
}
64
65
});
58
$('carebyzincCnt').update(content);
59
jQuery("#care-loader").removeClass('show');
60
jQuery( "button" ).removeClass( "selected" );
61
+
62
}
63
64
});
app/design/frontend/base/default/template/carebyzinc/checkout/cart.phtml CHANGED
@@ -84,9 +84,7 @@
84
</th>
85
86
<th class="a-center cart-total-head" colspan="<?php echo $mergedCells; ?>">
87
- <!-- <div class="cart-total-placeholder">-->
88
<?php echo $this->__('Subtotal') ?>
89
- <!-- </div>-->
90
</th>
91
92
<th class="a-center" rowspan="<?php echo $mergedCells; ?>">&nbsp;</th>
@@ -192,9 +190,7 @@ function showCarebyzinc(pid,itemId){
192
var content = JSON.parse(transport.responseText);
193
$(cntid).update(content);
194
jQuery(loader).hide();
195
- // var id = "#showCarebyzinc_"+itemId;
196
- // jQuery(id).hide();
197
- //jQuery("#zipcode_"+itemId).hide();
198
}
199
200
});
84
</th>
85
86
<th class="a-center cart-total-head" colspan="<?php echo $mergedCells; ?>">
87
<?php echo $this->__('Subtotal') ?>
88
</th>
89
90
<th class="a-center" rowspan="<?php echo $mergedCells; ?>">&nbsp;</th>
190
var content = JSON.parse(transport.responseText);
191
$(cntid).update(content);
192
jQuery(loader).hide();
193
+
194
}
195
196
});
app/design/frontend/base/default/template/carebyzinc/checkout/cart/item/default.phtml CHANGED
@@ -355,7 +355,8 @@ if(($productType == Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) || ($productTy
355
356
<?php $carebyzincAry = (array) unserialize($careByZinc); ?>
357
<div class="product-cart-careby">
358
- <a href="<?php echo $helper->getDeleteUrl($_item->getId()) ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove Warranty')) ?>" class="remove_warranty"><?php //echo $this->__('Remove Warranty') ?></a>
359
<p class="care-price"><?php echo $this->helper('checkout')->formatPrice($carebyzincAry['price_per_year']) ?></p>
360
<p class="warranty_desc quotelabel"><?php echo $carebyzincAry['description'] ?></p>
361
355
356
<?php $carebyzincAry = (array) unserialize($careByZinc); ?>
357
<div class="product-cart-careby">
358
+ <a href="<?php echo $helper->getDeleteUrl($_item->getId()) ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove Warranty')) ?>" class="remove_warranty"><?php //echo $this->__('Remove Warranty') ?>
359
+ </a>
360
<p class="care-price"><?php echo $this->helper('checkout')->formatPrice($carebyzincAry['price_per_year']) ?></p>
361
<p class="warranty_desc quotelabel"><?php echo $carebyzincAry['description'] ?></p>
362
app/design/frontend/base/default/template/carebyzinc/checkout/cart/item/default.phtml-10-08-2016 DELETED
@@ -1,415 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magento.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magento.com for more information.
20
- *
21
- * @category design
22
- * @package rwd_default
23
- * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
- */
26
- ?>
27
- <?php
28
- $_item = $this->getItem();
29
- $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
30
- $canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
31
- ?>
32
- <?php
33
-
34
- $product = Mage::getModel('catalog/product')->load($_item->getProductId());
35
- $productType = $product->getTypeId();
36
- $flag = 0;
37
- $model = Mage::getModel('carebyzinc/carebyzinc');
38
- if($product->getCarebyzinc() != 1)
39
- $carebyStatus = $model->getwarrantyStatus($_item->getId());
40
-
41
- if($productType == Mage_Catalog_Model_Product_Type::TYPE_SIMPLE || $productType == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
42
- $flag = 1;
43
-
44
- ?>
45
-
46
- <tr <?php if($flag) echo "style='border-bottom:0px'"; ?>>
47
- <td class="product-cart-image" rowspan="2">
48
- <?php if ($this->hasProductUrl()):?>
49
- <a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image">
50
- <?php endif;?>
51
- <img src="<?php echo $this->getProductThumbnail()->resize(180); ?>" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" />
52
- <?php if ($this->hasProductUrl()):?>
53
- </a>
54
- <?php endif;?>
55
-
56
- <ul class="cart-links">
57
- <?php if ($isVisibleProduct): ?>
58
- <li>
59
- <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Edit item parameters')) ?>"><?php echo $this->__('Edit') ?></a>
60
- </li>
61
- <?php endif ?>
62
-
63
- <?php if ($this->helper('wishlist')->isAllowInCart() && $isVisibleProduct) : ?>
64
- <li>
65
- <a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist use-ajax"><?php echo $this->__('Move to wishlist'); ?></a>
66
- </li>
67
- <?php endif ?>
68
- </ul>
69
- </td>
70
-
71
- <td class="product-cart-info">
72
-
73
- <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove Item')) ?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove Item') ?></a>
74
-
75
- <h2 class="product-name">
76
- <?php if ($this->hasProductUrl()):?>
77
- <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a>
78
- <?php else: ?>
79
- <?php echo $this->escapeHtml($this->getProductName()) ?>
80
- <?php endif; ?>
81
- </h2>
82
-
83
- <div class="product-cart-sku">
84
- <span class="label"><?php echo $this->__('SKU'); ?>:</span> <?php echo $this->escapeHtml($_item->getSku()); ?>
85
- </div>
86
-
87
- <?php if ($_options = $this->getOptionList()):?>
88
- <dl class="item-options">
89
- <?php foreach ($_options as $_option) : ?>
90
- <?php if($_option['label'] != 'carebyzinc'):?>
91
- <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
92
- <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
93
- <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
94
- <?php if (isset($_formatedOptionValue['full_view'])): ?>
95
- <div class="truncated_full_value">
96
- <dl class="item-options">
97
- <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
98
- <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
99
- </dl>
100
- </div>
101
- <?php endif; ?>
102
- </dd>
103
- <?php endif;?>
104
- <?php endforeach; ?>
105
- </dl>
106
- <?php endif;?>
107
-
108
- <?php if ($messages = $this->getMessages()): ?>
109
- <?php foreach ($messages as $message): ?>
110
- <p class="item-msg <?php echo $message['type'] ?>">
111
- * <?php echo $this->escapeHtml($message['text']) ?>
112
- </p>
113
- <?php endforeach; ?>
114
- <?php endif; ?>
115
-
116
- <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
117
- <?php if ($addInfoBlock): ?>
118
- <?php echo $addInfoBlock->setItem($_item)->toHtml() ?>
119
- <?php endif;?>
120
-
121
- </td>
122
-
123
- <?php if ($canApplyMsrp): ?>
124
- <td class="a-center product-cart-price"<?php if ($this->helper('tax')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>>
125
- <span class="cart-price">
126
- <span class="cart-msrp-unit"><?php echo $this->__('See price before order confirmation.'); ?></span>
127
- <?php $helpLinkId = 'cart-msrp-help-' . $_item->getId(); ?>
128
- <a id="<?php echo $helpLinkId ?>" href="#" class="map-help-link"><?php echo $this->__("What's this?"); ?></a>
129
-
130
- <script type="text/javascript">
131
- Catalog.Map.addHelpLink($('<?php echo $helpLinkId ?>'), "<?php echo $this->__("What&#39;s this?") ?>");
132
- </script>
133
-
134
- </span>
135
- </td>
136
- <?php else: ?>
137
-
138
- <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
139
- <td class="product-cart-price" data-rwd-label="<?php echo $this->__('Price'); ?>" data-rwd-tax-label="<?php echo $this->__('Excl. Tax'); ?>">
140
-
141
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
142
- <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
143
- <?php else: ?>
144
- <span class="cart-price">
145
- <?php endif; ?>
146
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
147
- <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
148
- <?php else: ?>
149
- <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
150
- <?php endif; ?>
151
-
152
- </span>
153
-
154
- <?php if (Mage::helper('weee')->getApplied($_item)): ?>
155
-
156
- <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
157
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
158
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
159
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
160
- <?php endforeach; ?>
161
- <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
162
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
163
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
164
- <?php endforeach; ?>
165
- <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
166
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
167
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
168
- <?php endforeach; ?>
169
- <?php endif; ?>
170
- </div>
171
-
172
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
173
- <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
174
- <span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
175
- </div>
176
- <?php endif; ?>
177
- <?php endif; ?>
178
- </td>
179
- <?php endif; ?><!-- inclusive price starts here -->
180
- <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
181
- <td class="product-cart-price" data-rwd-label="<?php echo $this->__('Price'); ?>" data-rwd-tax-label="<?php echo $this->__('Incl. Tax'); ?>">
182
- <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
183
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
184
- <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
185
- <?php else: ?>
186
- <span class="cart-price">
187
- <?php endif; ?>
188
-
189
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
190
- <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
191
- <?php else: ?>
192
- <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
193
- <?php endif; ?>
194
-
195
- </span>
196
- <?php if (Mage::helper('weee')->getApplied($_item)): ?>
197
-
198
- <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
199
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
200
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
201
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
202
- <?php endforeach; ?>
203
- <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
204
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
205
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
206
- <?php endforeach; ?>
207
- <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
208
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
209
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
210
- <?php endforeach; ?>
211
- <?php endif; ?>
212
- </div>
213
-
214
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
215
- <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
216
- <span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
217
- </div>
218
- <?php endif; ?>
219
- <?php endif; ?>
220
- </td>
221
- <?php endif; ?>
222
- <?php endif; ?>
223
- <td class="product-cart-actions" data-rwd-label="<?php echo $this->__('Qty'); ?>">
224
- <input type="text" pattern="\d*" name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4"
225
- data-cart-item-id="<?php echo $this->jsQuoteEscape($_item->getSku()) ?>"
226
- title="<?php echo Mage::helper('core')->quoteEscape($this->__('Qty')) ?>" class="input-text qty" maxlength="12" />
227
-
228
- <button type="submit" name="update_cart_action" data-cart-item-update value="update_qty" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Update')); ?>" class="button btn-update"><span><span><?php echo $this->__('Update'); ?></span></span>
229
- </button>
230
-
231
- <ul class="cart-links">
232
- <?php if ($isVisibleProduct): ?>
233
- <li>
234
- <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Edit item parameters')) ?>"><?php echo $this->__('Edit') ?></a>
235
- </li>
236
- <?php endif ?>
237
-
238
- <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
239
- <li>
240
- <?php if ($isVisibleProduct): ?>
241
- <a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist use-ajax"><?php echo $this->__('Move to wishlist'); ?></a>
242
- <?php endif ?>
243
- </li>
244
- <?php endif ?>
245
- </ul>
246
-
247
- </td>
248
-
249
- <!--Sub total starts here -->
250
- <?php if (($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
251
- <td class="product-cart-total" data-rwd-label="<?php echo $this->__('Subtotal'); ?>">
252
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
253
- <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
254
- <?php else: ?>
255
- <span class="cart-price">
256
- <?php endif; ?>
257
-
258
- <?php if ($canApplyMsrp): ?>
259
- <span class="cart-msrp-subtotal">--</span>
260
- <?php else: ?>
261
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
262
- <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
263
- <?php else: ?>
264
- <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
265
- <?php endif; ?>
266
- <?php endif; ?>
267
-
268
- </span>
269
- <?php if (Mage::helper('weee')->getApplied($_item)): ?>
270
-
271
- <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
272
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
273
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
274
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
275
- <?php endforeach; ?>
276
- <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
277
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
278
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
279
- <?php endforeach; ?>
280
- <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
281
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
282
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
283
- <?php endforeach; ?>
284
- <?php endif; ?>
285
- </div>
286
-
287
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
288
- <div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
289
- <span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
290
- </div>
291
- <?php endif; ?>
292
- <?php endif; ?>
293
- </td>
294
- <?php endif; ?>
295
- <?php if (($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
296
- <td class="product-cart-total" data-rwd-label="<?php echo $this->__('Subtotal'); ?>">
297
- <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
298
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
299
- <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
300
- <?php else: ?>
301
- <span class="cart-price">
302
- <?php endif; ?>
303
-
304
- <?php if ($canApplyMsrp): ?>
305
- <span class="cart-msrp-subtotal">--</span>
306
- <?php else: ?>
307
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
308
- <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
309
- <?php else: ?>
310
- <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
311
- <?php endif; ?>
312
- <?php endif; ?>
313
-
314
- </span>
315
-
316
-
317
- <?php if (Mage::helper('weee')->getApplied($_item)): ?>
318
-
319
- <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
320
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
321
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
322
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
323
- <?php endforeach; ?>
324
- <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
325
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
326
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
327
- <?php endforeach; ?>
328
- <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
329
- <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
330
- <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
331
- <?php endforeach; ?>
332
- <?php endif; ?>
333
- </div>
334
-
335
- <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
336
- <div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
337
- <span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
338
- </div>
339
- <?php endif; ?>
340
- <?php endif; ?>
341
- </td>
342
- <?php endif; ?>
343
- <td class="a-center product-cart-remove">
344
- <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove Item')) ?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove Item') ?></a>
345
- </td>
346
- </tr>
347
- <?php
348
- $helper = Mage::helper('carebyzinc');
349
- if($flag):
350
- $careByZinc = $_item->getCarebyzincOption();
351
- ?>
352
- <tr><td colspan="5">
353
- <?php if($careByZinc): ?>
354
-
355
-
356
- <?php $carebyzincAry = (array) unserialize($careByZinc); ?>
357
- <div class="product-cart-careby">
358
- <a href="<?php echo $helper->getDeleteUrl($_item->getId()) ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove Warranty')) ?>" class="remove_warranty"><?php //echo $this->__('Remove Warranty') ?></a>
359
- <p class="care-price"><?php echo $this->helper('checkout')->formatPrice($carebyzincAry['price_per_year']) ?></p>
360
- <p class="warranty_desc quotelabel"><?php echo $carebyzincAry['description'] ?></p>
361
-
362
- </div>
363
-
364
- <?php else:?>
365
- <?php
366
- if ($product->getCarebyzinc() == 1):
367
- $zip = $helper->getZipCode();
368
- ?>
369
-
370
- <div class="product-box">
371
- <h1 class="product-title"><?php echo $helper->getTitle()?></h1>
372
- <input type="text" name="zipcode_<?php echo $_item->getId(); ?>" id="zipcode_<?php echo $_item->getId(); ?>" value="<?php echo $zip ;?>" placeholder="Enter Zip code here" style="width:21%"/>
373
-
374
- <button class="btn-zinc showCarebyzinc" id="showCarebyzinc_<?php echo $_item->getId(); ?>" onclick="showCarebyzinc(<?php echo $_item->getProductId(); ?>,<?php echo $_item->getId(); ?>); return false;"><?php echo $this->__('Get Quote')?><span id="care-loader_<?php echo $_item->getId(); ?>" class="care-loader"></span></button>
375
-
376
- <div id="carebyzincCnt_<?php echo $_item->getId(); ?>" class="carebyzincCnt product-container" style="display:block;">
377
- <?php
378
- $product = Mage::getModel('catalog/product')->load($_item->getProductId());
379
- $itemId = $_item->getId();
380
- $quoteDataSession = $model->getPriceQuoteinCart($product, $itemId,$zip);
381
-
382
- ?>
383
- <?php if( is_array($quoteDataSession)):
384
- $quoteData = $quoteDataSession[$itemId];?>
385
- <ul class="product-list">
386
- <?php foreach($quoteData as $qitem): ?>
387
- <li>
388
- <div class="bx-l">
389
- <div class="squared input">
390
- <input type="radio" value="<?php echo $qitem['id']; ?>" id="carebyzinc_<?php echo $itemId.'_'.$qitem['id']; ?>" name="carebyzinc_option_<?php echo $itemId?>" />
391
- <label for="carebyzinc_<?php echo $itemId.'_'.$qitem['id']; ?>" ></label>
392
- </div>
393
- </div>
394
- <div class="bx-r">
395
- <h2 class="p-price"><?php echo Mage::helper('core')->currency($qitem['price_per_year']); ?></h2>
396
- <h3 class="p-name quotelabel"><?php echo $qitem['description']; ?></h3>
397
-
398
- </div>
399
- </li>
400
- <?php endforeach; ?>
401
- </ul>
402
- <button type="button" title="Add" class="button" id="button-container_<?php echo $itemId?>" onclick="updateCareByZinc(<?php echo $itemId?>)"><span><span>Add</span></span></button>
403
- <?php else:
404
- echo $quoteDataSession;
405
- ?>
406
- <?php endif; ?>
407
-
408
-
409
-
410
- </div>
411
- </div>
412
- <?php endif;?>
413
- <?php endif;?>
414
- </td></tr>
415
- <?php endif;?>
app/etc/modules/Zinc_Carebyzinc.xml CHANGED
@@ -1,9 +1,9 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Zinc_Carebyzinc>
5
- <active>true</active>
6
- <codePool>local</codePool>
7
- </Zinc_Carebyzinc>
8
- </modules>
9
</config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Zinc_Carebyzinc>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Zinc_Carebyzinc>
8
+ </modules>
9
</config>
package.xml CHANGED
@@ -1,18 +1,20 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>zinc</name>
4
- <version>1.0.3</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
<channel>community</channel>
8
<extends/>
9
- <summary>Zinc is an application to allow merchants cross sell warranties and product protections online without ever have to worry about the technology and contract work behind them.</summary>
10
- <description>Zinc allows merchants to display warranty and product protection quotes next to the product being sold. Customers can add those policies to their purchases at point of sale, and Zinc follow up to complete the sale. Merchants earn additional margin while Zinc takes care of all the heavy lifting to execute the contract and handle the claims.</description>
11
- <notes>Zinc allows merchants to display warranty and product protection quotes next to the product being sold. Customers can add those policies to their purchases at point of sale, and Zinc follow up to complete the sale. Merchants earn additional margin while Zinc takes care of all the heavy lifting to execute the contract and handle the claims.</notes>
12
<authors><author><name>ZincPlatform</name><user>ZincPlatform</user><email>sam.li@zincplatform.com</email></author></authors>
13
- <date>2016-08-18</date>
14
- <time>04:11:02</time>
15
- <contents><target name="magelocal"><dir name="Zinc"><dir name="Carebyzinc"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><file name="Grid.php" hash="a1a97f2ea591ad821ea54a77f5c4cc28"/><dir name="Renderer"><file name="Category.php" hash="35314c66e1c37f7ebb2ce2a5257e7d88"/></dir></dir></dir><dir name="Order"><file name="Grid.php" hash="e320db07d090731de9e0cc98153d2473"/></dir><file name="Order.php" hash="8ad16b270a3d721125f598582d59065b"/><dir name="Product"><dir name="Edit"><file name="Form.php" hash="676122e90b68bfec48e7d8c32b330ea8"/><dir name="Tab"><file name="Form.php" hash="aac4c1be4ef687610012e6aad6d89fb4"/></dir><file name="Tabs.php" hash="db637798104873a38241fe683f511e27"/></dir><file name="Edit.php" hash="504cc82857251201ff83bd10544d5927"/><file name="Grid.php" hash="4224f8f3a53a9fe014e20d087bfb26c9"/></dir><file name="Product.php" hash="e603838ed67849456c5230395d081e1b"/><dir name="System"><dir name="Config"><file name="Tokenvalidate.php" hash="24e6f31db4da9d1bbb1b8380b42d1f05"/></dir></dir></dir><file name="Carebyzinc.php" hash="e7cab3fcb5c8792677a7db8d39603d6a"/></dir><dir name="Helper"><file name="Data.php" hash="7bc4f9b6dd31133114e441559f08d3bc"/></dir><dir name="Model"><file name="Carebyzinc.php" hash="021aa626104faa52421d46e1fe8e5591"/><dir name="Checkout"><file name="Cart.php" hash="afae7a9eb76266e60a825880db280a9e"/></dir><dir name="Entity"><file name="Category.php" hash="cfca0b90e178b2f695236925d4318df1"/><file name="Subcategory.php" hash="3dc00a09a3caee211fed08ebeb4e9c5e"/></dir><dir name="Mysql4"><dir name="Order"><file name="Collection.php" hash="73eb61cc74cfdd568f1644c664a25ed6"/></dir><file name="Order.php" hash="fdc62f0551b1714f7c0e7fec8e87495c"/></dir><file name="Observer.php" hash="00a0f1b4ac0ad91956622ed19558d86d"/><file name="Order.php" hash="1f82b148059a74038e2d5189a0c8fdaf"/><dir name="Sales"><file name="Quote.php" hash="65cb7a95b7c01e1ee259e9ab38e73ece"/></dir><dir name="System"><dir name="Config"><file name="Source.php" hash="2e29cb2b89d849ca20bcfde1648c6dd9"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CarebyzincController.php" hash="c9825829c818b62124fad08a6eafe9d6"/><file name="OrderController.php" hash="abb2466958fa6f7b9ed13b5675e06f5c"/><file name="ProductController.php" hash="4175dbf2b87dda0757080060d9916a89"/></dir><file name="CartController.php" hash="24758faa94cbd54c9646085142332483"/><file name="IndexController.php" hash="83fb9491996678544874cadc6282c5d7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="06cfc2ccc3fe727bee732ff3dd6df96f"/><file name="config.xml" hash="5e330ca3b268930f0537c0f4cee48971"/><file name="system.xml" hash="c7f7abfbec8e977642d9bb875a73d16e"/></dir><dir name="sql"><dir name="carebyzinc_setup"><file name="mysql4-install-0.1.0.php" hash="c342593327c1d0428217b315dcdced1c"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="108da13421767fab0083f7c4cc9b16e2"/><file name="mysql4-upgrade-0.2.0-1.0.0.php" hash="10ebb8695adeba50e281b39ad0cf20ed"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="2ba025c3d3405e3be85c4940f82c85b7"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="fd29cdd9a47b882ecea7de944d8e4d38"/><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="ac78f6811e781b4a03233188918658d3"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zinc_Carebyzinc.xml" hash="cda422c48c3f76e04d5dd609b1da33bf"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="carebyzinc"><dir name="order"><dir name="creditmemo"><dir name="create"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="a4895ad08ec75605c3dc6678647762ca"/></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="20c580806b7240e3d19cc0a7dce46142"/></dir></dir></dir></dir><dir name="invoice"><dir name="create"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="77e6e5fdb4be945178d09c1815ab14b2"/></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="a984189e5dd627aa3497458aea7c9cb6"/></dir></dir></dir></dir><dir name="shipment"><dir name="create"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="a3f4b3b21862422e0675a3411df545a7"/></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="e9f0d61dc484f8b3179608f941bbc827"/></dir></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="ba480a97ff97df6fae56931a5d878e26"/></dir></dir></dir></dir><dir name="system"><file name="tokenvalidate.phtml" hash="c8f6847678e6327cc168d19bb1f889f9"/></dir></dir></dir><dir name="layout"><file name="zinc_carebyzinc.xml" hash="755c6fa9b8ebea40cf085cb4781b735a"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="carebyzinc"><file name="carebyzinc.phtml" hash="93e7be82387291f24aaeb91dd16bbea0"/><dir name="checkout"><dir name="cart"><dir name="item"><file name="default.phtml" hash="a4c5b53ccaafff95a0d4b7fb157417a5"/><file name="default.phtml-10-08-2016" hash="6d30023d9d5d10122bb19504adb8a78d"/></dir><dir name="minicart"><file name="default.phtml" hash="059d0ac79a1c4ac4b668882e5d5e189a"/></dir></dir><file name="cart.phtml" hash="f3b231f03951e0e18adfecc7ad563c31"/><dir name="multishipping"><dir name="item"><file name="default.phtml" hash="302298bf393f3c0d94b26ea7ee39096d"/></dir></dir><dir name="onepage"><dir name="review"><file name="item.phtml" hash="d5448146086a1f01e9ce193575a481bf"/></dir></dir></dir><dir name="email"><dir name="order"><dir name="items"><dir name="creditmemo"><file name="default.phtml" hash="05f2240b619bccd7b126b8140174749b"/></dir><dir name="invoice"><file name="default.phtml" hash="f709eb917fd5de6a82ff0a04a4413459"/></dir><dir name="order"><file name="default.phtml" hash="bbb4a160b0ae393d2d2e7ef81705463c"/></dir><dir name="shipment"><file name="default.phtml" hash="806df424ce07c15195bfd5fc4b8da192"/></dir></dir></dir></dir><dir name="options"><file name="cart.phtml" hash="0c847ef443520ffdad30c10424a5ce37"/><file name="default.phtml" hash="f9807435fc04e76610d265a0e5da5f11"/></dir><dir name="sales"><dir name="order"><dir name="creditmemo"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="aa9efe3d2eac3422ea96c4a5e54c738d"/></dir></dir></dir><dir name="invoice"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="1ae13d107b76d113360afe8526ecc286"/></dir></dir></dir><dir name="items"><dir name="renderer"><file name="default.phtml" hash="ba81982f366ea2d222c2615a0e90c3e4"/></dir></dir><dir name="shipment"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="e8ac8a72cb4a4e9b5d5fc75b4d542225"/></dir></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="zinc_carebyzinc.xml" hash="416ecb557e7ccb03fab996dcfc216d26"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="carebyzinc"><dir name="css"><file name="carebyzinc.css" hash="61a00a3992f44bd396cc71dfaac0fa8d"/><file name="colorbox.css" hash="4b7379294ea68f88b0bba06cd803a646"/><dir name="images"><file name="border.png" hash="b593eef877678cd14706323d199e047d"/><file name="cancel.png" hash="7d54d20abee3ff4e694a98798f261d09"/><file name="care-preloader.gif" hash="eba7ca3ef216ece9ab9974f0cc524536"/><file name="controls.png" hash="05ad6ec2cbc17a7f3d1b1aac6dbe770d"/><file name="loading.gif" hash="f1d7268ba36b264f8b33b5b2bf0f108c"/><file name="loading_background.png" hash="7649e6a7c32b6d29ce63255a30b7405a"/><file name="overlay.png" hash="8918e1f6fbaae9e65880f3eff6fa3713"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="carebyzinc"><file name="jquery.colorbox.js" hash="931988f42363a4824812885ffc27d99e"/><file name="product.js" hash="007f9365ae78449497daa03e83169fd3"/></dir></dir></target></contents>
16
<compatible/>
17
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>zinc</name>
4
+ <version>1.0.4</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
<channel>community</channel>
8
<extends/>
9
+ <summary>Zinc is an application to allow merchants cross sell warranties and product protections online.</summary>
10
+ <description>Zinc enables online merchants to seamlessly offer product protection insurance and warranty plans for their products. Similar to a white-labelled Apple Care experience, after a quick on-boarding process, merchants would be able to deploy an &#x201C;insure&#x201D; button on their site, and Zinc takes care of the rest to issue, bind and support the insurance and warranty contracts.&#xD;
11
+ Zinc partners with the best insurance and warranty providers to offer tailored policies for each merchant. For product lines including jewelries, furniture, apparels, sporting goods and consumer electronics, enjoy the additional margin and improved customer satisfaction without writing a single line of code.</description>
12
+ <notes>Zinc enables online merchants to seamlessly offer product protection insurance and warranty plans for their products. Similar to a white-labelled Apple Care experience, after a quick on-boarding process, merchants would be able to deploy an &#x201C;insure&#x201D; button on their site, and Zinc takes care of the rest to issue, bind and support the insurance and warranty contracts.&#xD;
13
+ Zinc partners with the best insurance and warranty providers to offer tailored policies for each merchant. For product lines including jewelries, furniture, apparels, sporting goods and consumer electronics, enjoy the additional margin and improved customer satisfaction without writing a single line of code.</notes>
14
<authors><author><name>ZincPlatform</name><user>ZincPlatform</user><email>sam.li@zincplatform.com</email></author></authors>
15
+ <date>2016-09-23</date>
16
+ <time>11:18:06</time>
17
+ <contents><target name="magelocal"><dir name="Zinc"><dir name="Carebyzinc"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><file name="Grid.php" hash="dc6cb39059a6be0f4388e6157156932d"/><dir name="Renderer"><file name="Category.php" hash="35314c66e1c37f7ebb2ce2a5257e7d88"/></dir></dir></dir><dir name="Order"><file name="Grid.php" hash="f3686d6d5eb5084fb6a6ff52d10e2700"/></dir><file name="Order.php" hash="8ad16b270a3d721125f598582d59065b"/><dir name="Product"><dir name="Edit"><file name="Form.php" hash="676122e90b68bfec48e7d8c32b330ea8"/><dir name="Tab"><file name="Form.php" hash="aac4c1be4ef687610012e6aad6d89fb4"/></dir><file name="Tabs.php" hash="db637798104873a38241fe683f511e27"/></dir><file name="Edit.php" hash="504cc82857251201ff83bd10544d5927"/><file name="Grid.php" hash="098916a3543f4c9fdd15d0d2beebae9f"/></dir><file name="Product.php" hash="e603838ed67849456c5230395d081e1b"/><dir name="System"><dir name="Config"><file name="Tokenvalidate.php" hash="24e6f31db4da9d1bbb1b8380b42d1f05"/></dir></dir></dir><file name="Carebyzinc.php" hash="e7cab3fcb5c8792677a7db8d39603d6a"/></dir><dir name="Helper"><file name="Data.php" hash="af8aedf07070a2687ff9846bd1e5ea3d"/></dir><dir name="Model"><file name="Carebyzinc.php" hash="55be6ffd0c9d5fb439fdfeaab36a863d"/><dir name="Checkout"><file name="Cart.php" hash="066cdb9d428f8e7841ede8496538294b"/></dir><dir name="Entity"><file name="Category.php" hash="cfca0b90e178b2f695236925d4318df1"/><file name="Subcategory.php" hash="3dc00a09a3caee211fed08ebeb4e9c5e"/></dir><dir name="Mysql4"><dir name="Order"><file name="Collection.php" hash="73eb61cc74cfdd568f1644c664a25ed6"/></dir><file name="Order.php" hash="fdc62f0551b1714f7c0e7fec8e87495c"/></dir><file name="Observer.php" hash="00a0f1b4ac0ad91956622ed19558d86d"/><file name="Order.php" hash="59129ae6c623e34c3ad78057b79d9f87"/><dir name="Sales"><file name="Quote.php" hash="65cb7a95b7c01e1ee259e9ab38e73ece"/></dir><dir name="System"><dir name="Config"><file name="Protocol.php" hash="7fa3b71a3ff8d7c50a9c7fd0dd02062f"/><file name="Source.php" hash="2e29cb2b89d849ca20bcfde1648c6dd9"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CarebyzincController.php" hash="aae737218c7850dec382d4b3904476c0"/><file name="OrderController.php" hash="abb2466958fa6f7b9ed13b5675e06f5c"/><file name="ProductController.php" hash="4175dbf2b87dda0757080060d9916a89"/></dir><file name="CartController.php" hash="24758faa94cbd54c9646085142332483"/><file name="IndexController.php" hash="e75309459f126240209707f5e1f8fd5c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="06cfc2ccc3fe727bee732ff3dd6df96f"/><file name="config.xml" hash="5793c069e5c1ab75fc6ff6c557b55b73"/><file name="system.xml" hash="341fcc4a5ca5bc1d8b54be339b21718e"/></dir><dir name="sql"><dir name="carebyzinc_setup"><file name="mysql4-install-0.1.0.php" hash="c342593327c1d0428217b315dcdced1c"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="108da13421767fab0083f7c4cc9b16e2"/><file name="mysql4-upgrade-0.2.0-1.0.0.php" hash="10ebb8695adeba50e281b39ad0cf20ed"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="761f18c5ecf1635e95c597e6ee137f45"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="fd29cdd9a47b882ecea7de944d8e4d38"/><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="ac78f6811e781b4a03233188918658d3"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="b661111a5ded4c7604932caa6467ecb7"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zinc_Carebyzinc.xml" hash="4d2b3b715ff40beadbf897a373561e85"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="zinc_carebyzinc.xml" hash="755c6fa9b8ebea40cf085cb4781b735a"/></dir><dir name="template"><dir name="carebyzinc"><dir name="order"><dir name="creditmemo"><dir name="create"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="a4895ad08ec75605c3dc6678647762ca"/></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="20c580806b7240e3d19cc0a7dce46142"/></dir></dir></dir></dir><dir name="invoice"><dir name="create"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="77e6e5fdb4be945178d09c1815ab14b2"/></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="a984189e5dd627aa3497458aea7c9cb6"/></dir></dir></dir></dir><dir name="shipment"><dir name="create"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="a3f4b3b21862422e0675a3411df545a7"/></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="e9f0d61dc484f8b3179608f941bbc827"/></dir></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="ba480a97ff97df6fae56931a5d878e26"/></dir></dir></dir></dir><dir name="system"><file name="tokenvalidate.phtml" hash="c8f6847678e6327cc168d19bb1f889f9"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="zinc_carebyzinc.xml" hash="416ecb557e7ccb03fab996dcfc216d26"/></dir><dir name="template"><dir name="carebyzinc"><file name="carebyzinc.phtml" hash="4e0fc49993f641e794d466b8f5d728b3"/><dir name="checkout"><dir name="cart"><dir name="item"><file name="default.phtml" hash="c8efaf7fece8e1834d5eed19d7ff8aaa"/></dir><dir name="minicart"><file name="default.phtml" hash="059d0ac79a1c4ac4b668882e5d5e189a"/></dir></dir><file name="cart.phtml" hash="d3f071659786d33a98cb1aa844f36416"/><dir name="multishipping"><dir name="item"><file name="default.phtml" hash="302298bf393f3c0d94b26ea7ee39096d"/></dir></dir><dir name="onepage"><dir name="review"><file name="item.phtml" hash="d5448146086a1f01e9ce193575a481bf"/></dir></dir></dir><dir name="email"><dir name="order"><dir name="items"><dir name="creditmemo"><file name="default.phtml" hash="05f2240b619bccd7b126b8140174749b"/></dir><dir name="invoice"><file name="default.phtml" hash="f709eb917fd5de6a82ff0a04a4413459"/></dir><dir name="order"><file name="default.phtml" hash="bbb4a160b0ae393d2d2e7ef81705463c"/></dir><dir name="shipment"><file name="default.phtml" hash="806df424ce07c15195bfd5fc4b8da192"/></dir></dir></dir></dir><dir name="options"><file name="cart.phtml" hash="0c847ef443520ffdad30c10424a5ce37"/><file name="default.phtml" hash="f9807435fc04e76610d265a0e5da5f11"/></dir><dir name="sales"><dir name="order"><dir name="creditmemo"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="aa9efe3d2eac3422ea96c4a5e54c738d"/></dir></dir></dir><dir name="invoice"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="1ae13d107b76d113360afe8526ecc286"/></dir></dir></dir><dir name="items"><dir name="renderer"><file name="default.phtml" hash="ba81982f366ea2d222c2615a0e90c3e4"/></dir></dir><dir name="shipment"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="e8ac8a72cb4a4e9b5d5fc75b4d542225"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="carebyzinc"><file name="jquery.colorbox.js" hash="931988f42363a4824812885ffc27d99e"/><file name="product.js" hash="007f9365ae78449497daa03e83169fd3"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="carebyzinc"><dir name="css"><file name="carebyzinc.css" hash="61a00a3992f44bd396cc71dfaac0fa8d"/><file name="colorbox.css" hash="4b7379294ea68f88b0bba06cd803a646"/><dir name="images"><file name="border.png" hash="b593eef877678cd14706323d199e047d"/><file name="cancel.png" hash="7d54d20abee3ff4e694a98798f261d09"/><file name="care-preloader.gif" hash="eba7ca3ef216ece9ab9974f0cc524536"/><file name="controls.png" hash="05ad6ec2cbc17a7f3d1b1aac6dbe770d"/><file name="loading.gif" hash="f1d7268ba36b264f8b33b5b2bf0f108c"/><file name="loading_background.png" hash="7649e6a7c32b6d29ce63255a30b7405a"/><file name="overlay.png" hash="8918e1f6fbaae9e65880f3eff6fa3713"/></dir></dir></dir></dir></dir></dir></target></contents>
18
<compatible/>
19
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
20
</package>