Linc_Care - Version 1.2.3

Version Notes

Welcome to the Linc Care extension for Magento.

Installation and configuration process:

1. Go to System / Magento Connect / Magento Connect Manager

2. Search for Linc Care and then follow the normal procedure for installing an extension

3. Go to System / Configuration / Linc Care / General

4. Select a store to configure. You must register and configure each store separately.

5. Enter the store's url and admin email (defaults to the Magento values) Specify and confirm a password, then click register. Each store must have a unique URL and admin email.

6. When the Linc Care Merchant portal is launched, login with the URL, email and password you just specified. Fill in the requested information. Some information is optional, but you must complete the configuration before continuing. If you need to
come back and finish later, the URL to the portal is https://care.letslinc.com/merchants

7. On the last page of the configuration, you will be given the widget code to be inserted into your emails.

8. Go to System / Transactional Email

9. If you have a have custom New Order template already, edit it and insert the widget code where you want the Linc Care widget to appear. Then save the template.

10. Repeat for any other order-based emails you want connected to Linc Care. We suggest the New Order Guest, New Shipment and New Shipment Guest templates as well.

11. Go to System / Sales / Sales Email and select the new templates

12. Save the configuration and you're done.

If you have any comments or questions, please email us at support-magento@letslinc.com

Download this release

Release Info

Developer Linc Care
Extension Linc_Care
Version 1.2.3
Comparing to
See all releases


Code changes from version 1.2.2 to 1.2.3

app/code/community/Linc/Care/Model/Fulfillmentobserver.php CHANGED
@@ -5,17 +5,24 @@ class Linc_Care_Model_Fulfillmentobserver
5
  {
6
  public $client = null;
7
  public $queue = null;
 
 
 
 
 
 
 
8
 
9
  public function exportFulfillment(Varien_Event_Observer $observer)
10
  {
11
- if (DBGLOG) Mage::log("exportFulfillment started", null, 'fulfillment.log', true);
12
 
13
  # get store_id
14
  $track = $observer->getEvent()->getTrack();
15
  $shipment = $track->getShipment();
16
  $order = $shipment->getOrder();
17
  $store_id = $order->getStoreId();
18
- if (DBGLOG) Mage::log("exportFulfillment got the store id ($store_id)", null, 'fulfillment.log', true);
19
 
20
  #$accessToken = Mage::getStoreConfig('linc_access_key', $store_id);
21
  # get access_key
@@ -35,23 +42,23 @@ class Linc_Care_Model_Fulfillmentobserver
35
  {
36
  $accessToken = $rows[0]['value'];
37
  }
38
- if (DBGLOG) Mage::log("exportFulfillment got the accessKey ($accessToken)", null, 'fulfillment.log', true);
39
 
40
  if ($accessToken != null)
41
  {
42
- if (DBGLOG) Mage::log("exportFulfillment building the JSON", null, 'fulfillment.log', true);
43
  $post_data_json = $this->buildJson($observer);
44
 
45
- if (DBGLOG) Mage::log("exportFulfillment making the API call", null, 'fulfillment.log', true);
46
  $this->sendFulfillment($accessToken, $post_data_json);
47
 
48
- if (DBGLOG) Mage::log("exportFulfillment ending", null, 'fulfillment.log', true);
49
  }
50
  }
51
 
52
  public function sendFulfillment($accessToken, $postData)
53
  {
54
- if (DBGLOG) Mage::log("sendFulfillment started", null, 'fulfillment.log', true);
55
 
56
  if ($this->client == null)
57
  {
@@ -81,11 +88,11 @@ class Linc_Care_Model_Fulfillmentobserver
81
  $response = $this->client->request();
82
 
83
  $temp = $response->getStatus();
84
- Mage::log("Linc_Care HTTP Status $temp", null, 'fulfillment.log', true);
85
  if ($response->getStatus() == 201)
86
  {
87
  $temp = $response->getBody();
88
- Mage::log("Linc_Care $temp", null, 'fulfillment.log', true);
89
  }
90
  else
91
  {
@@ -97,7 +104,7 @@ class Linc_Care_Model_Fulfillmentobserver
97
 
98
  public function connectToLincCare($accessToken)
99
  {
100
- if (DBGLOG) Mage::log("connectToLincCare started", null, 'fulfillment.log', true);
101
 
102
  $this->client = new Zend_Http_Client();
103
  $protocol = SERVER_PROTOCOL;
@@ -118,20 +125,20 @@ class Linc_Care_Model_Fulfillmentobserver
118
 
119
  public function buildJson(Varien_Event_Observer $observer)
120
  {
121
- if (DBGLOG) Mage::log("buildJson started", null, 'fulfillment.log', true);
122
 
123
  $track = $observer->getEvent()->getTrack();
124
- if (DBGLOG) Mage::log("buildJson Got order", null, 'fulfillment.log', true);
125
  $store = $track->getStore();
126
- if (DBGLOG) Mage::log("buildJson Got order", null, 'fulfillment.log', true);
127
  $shipment = $track->getShipment();
128
- if (DBGLOG) Mage::log("buildJson Got order", null, 'fulfillment.log', true);
129
  $order = $shipment->getOrder();
130
- if (DBGLOG) Mage::log("buildJson Got order", null, 'fulfillment.log', true);
131
  $carrier = $order->getShippingCarrier();
132
- if (DBGLOG) Mage::log("buildJson Got order", null, 'fulfillment.log', true);
133
  $store_id = $observer->getStoreId();
134
- if (DBGLOG) Mage::log("buildJson Got order", null, 'fulfillment.log', true);
135
 
136
  $postdata = "";
137
  $CarrierCode = "";
@@ -149,9 +156,9 @@ class Linc_Care_Model_Fulfillmentobserver
149
  );
150
 
151
  $postdata = json_encode($dataorder);
152
- if (DBGLOG) Mage::log($postdata, null, 'fulfillment.log', true);
153
 
154
- if (DBGLOG) Mage::log("buildJson ended", null, 'fulfillment.log', true);
155
 
156
  return $postdata;
157
  }
5
  {
6
  public $client = null;
7
  public $queue = null;
8
+ public $logname = 'fulfillment.log';
9
+
10
+ public function log($msg)
11
+ {
12
+ if (DBGLOG) Mage::log($msg, null, $this->logname, true);
13
+ #print("<p>$msg</p>");
14
+ }
15
 
16
  public function exportFulfillment(Varien_Event_Observer $observer)
17
  {
18
+ $this->log("exportFulfillment started");
19
 
20
  # get store_id
21
  $track = $observer->getEvent()->getTrack();
22
  $shipment = $track->getShipment();
23
  $order = $shipment->getOrder();
24
  $store_id = $order->getStoreId();
25
+ $this->log("exportFulfillment got the store id ($store_id)");
26
 
27
  #$accessToken = Mage::getStoreConfig('linc_access_key', $store_id);
28
  # get access_key
42
  {
43
  $accessToken = $rows[0]['value'];
44
  }
45
+ $this->log("exportFulfillment got the accessKey ($accessToken)");
46
 
47
  if ($accessToken != null)
48
  {
49
+ $this->log("exportFulfillment building the JSON");
50
  $post_data_json = $this->buildJson($observer);
51
 
52
+ $this->log("exportFulfillment making the API call");
53
  $this->sendFulfillment($accessToken, $post_data_json);
54
 
55
+ $this->log("exportFulfillment ending");
56
  }
57
  }
58
 
59
  public function sendFulfillment($accessToken, $postData)
60
  {
61
+ $this->log("sendFulfillment started");
62
 
63
  if ($this->client == null)
64
  {
88
  $response = $this->client->request();
89
 
90
  $temp = $response->getStatus();
91
+ Mage::log("Linc_Care HTTP Status $temp");
92
  if ($response->getStatus() == 201)
93
  {
94
  $temp = $response->getBody();
95
+ Mage::log("Linc_Care $temp");
96
  }
97
  else
98
  {
104
 
105
  public function connectToLincCare($accessToken)
106
  {
107
+ $this->log("connectToLincCare started");
108
 
109
  $this->client = new Zend_Http_Client();
110
  $protocol = SERVER_PROTOCOL;
125
 
126
  public function buildJson(Varien_Event_Observer $observer)
127
  {
128
+ $this->log("buildJson started");
129
 
130
  $track = $observer->getEvent()->getTrack();
131
+ $this->log("buildJson Got order");
132
  $store = $track->getStore();
133
+ $this->log("buildJson Got order");
134
  $shipment = $track->getShipment();
135
+ $this->log("buildJson Got order");
136
  $order = $shipment->getOrder();
137
+ $this->log("buildJson Got order");
138
  $carrier = $order->getShippingCarrier();
139
+ $this->log("buildJson Got order");
140
  $store_id = $observer->getStoreId();
141
+ $this->log("buildJson Got order");
142
 
143
  $postdata = "";
144
  $CarrierCode = "";
156
  );
157
 
158
  $postdata = json_encode($dataorder);
159
+ $this->log($postdata);
160
 
161
+ $this->log("buildJson ended");
162
 
163
  return $postdata;
164
  }
app/code/community/Linc/Care/Model/Orderobserver.php CHANGED
@@ -5,11 +5,52 @@ class Linc_Care_Model_Orderobserver
5
  {
6
  public $client = null;
7
  public $queue = null;
 
 
 
 
 
 
 
8
 
9
  public function exportOrder(Varien_Event_Observer $observer)
10
  {
11
- $store_id = $observer->getStoreId();
12
- $accessToken = Mage::getStoreConfig('linc_access_key', $store_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  if ($accessToken != null)
14
  {
15
  $post_data_json = $this->buildJson($observer);
@@ -21,11 +62,14 @@ class Linc_Care_Model_Orderobserver
21
  {
22
  if ($this->client == null)
23
  {
 
24
  $this->connectToLincCare($accessToken);
25
  if ($this->client != null && $this->queue != null)
26
  {
 
27
  $sendQueue = $this->queue;
28
  unset($this->queue);
 
29
 
30
  foreach ($sendQueue as $data)
31
  {
@@ -34,6 +78,7 @@ class Linc_Care_Model_Orderobserver
34
  }
35
  else
36
  {
 
37
  if ($this->queue == null)
38
  {
39
  $this->queue = array();
@@ -45,21 +90,23 @@ class Linc_Care_Model_Orderobserver
45
 
46
  if ($this->client != null)
47
  {
 
 
48
  $this->client->setRawData($postData, 'application/json');
49
  $response = $this->client->request();
50
 
51
- if (DBGLOG) {
52
- $temp = $response->getStatus();
53
- Mage::log("Linc_Care HTTP Status $temp", null, 'order.log', true);
54
- }
55
 
56
  if ($response->getStatus() == 201)
57
  {
58
  $temp = $response->getBody();
59
- if (DBGLOG) Mage::log("Linc_Care $temp", null, 'order.log', true);
60
  }
61
  else
62
  {
 
 
63
  $this->client = null;
64
  array_push($this->queue, $postData);
65
  }
@@ -68,9 +115,10 @@ class Linc_Care_Model_Orderobserver
68
 
69
  public function connectToLincCare($accessToken)
70
  {
71
- $this->client = new Zend_Http_Client();
72
  $protocol = SERVER_PROTOCOL;
73
  $url = SERVER_PATH;
 
 
74
  $this->client->setUri("$protocol://pub-api.$url/v1/order");
75
 
76
  $this->client->setConfig(array(
@@ -87,25 +135,25 @@ class Linc_Care_Model_Orderobserver
87
 
88
  public function buildJson(Varien_Event_Observer $observer)
89
  {
90
- if (DBGLOG) Mage::log("exportOrder started", null, 'order.log', true);
91
 
92
  $order = $observer->getEvent()->getOrder();
93
- if (DBGLOG) Mage::log("exportOrder Got order", null, 'order.log', true);
94
  $orderdata = $order->getData();
95
- if (DBGLOG) Mage::log("exportOrder Got data", null, 'order.log', true);
96
 
97
  $b_addr = $order->getBillingAddress();
98
  if (DBGLOG)
99
  {
100
  $temp = json_encode($b_addr->getData());
101
- Mage::log("exportOrder got billing address $temp", null, 'order.log', true);
102
  }
103
 
104
  $s_addr = $order->getShippingAddress();
105
  if (DBGLOG && $s_addr != null)
106
  {
107
  $temp = json_encode($s_addr->getData());
108
- Mage::log("exportOrder got shipping address $temp", null, 'order.log', true);
109
  }
110
  else
111
  {
@@ -114,10 +162,10 @@ class Linc_Care_Model_Orderobserver
114
  }
115
 
116
  $phone = $b_addr->getTelephone();
117
- if (DBGLOG) Mage::log("exportOrder got phone $phone", null, 'order.log', true);
118
 
119
  $items = $order->getItemsCollection();
120
- if (DBGLOG) Mage::log("exportOrder got item collection", null, 'order.log', true);
121
 
122
  $dataitems = array();
123
  foreach ($items as $item)
@@ -136,17 +184,17 @@ class Linc_Care_Model_Orderobserver
136
  #if (DBGLOG)
137
  {
138
  $temp = json_encode($dataitem);
139
- Mage::log("exportOrder built an item $temp", null, 'order.log', true);
140
  }
141
 
142
  array_push($dataitems, $dataitem);
143
  }
144
  }
145
 
146
- if (DBGLOG) Mage::log("exportOrder built items", null, 'order.log', true);
147
 
148
  $user = array (
149
- 'user_id' => $order->getCustomerId(),
150
  'first_name' => $order->getCustomerFirstname(),
151
  'last_name' => $order->getCustomerLastname(),
152
  'email' => $order->getCustomerEmail(),
@@ -155,39 +203,39 @@ class Linc_Care_Model_Orderobserver
155
  if (DBGLOG)
156
  {
157
  $temp = json_encode($user);
158
- Mage::log("exportOrder built user $temp", null, 'order.log', true);
159
  }
160
 
161
- $country = Mage::getModel('directory/country')->loadByCode($b_addr->getCountry());
162
  $addrB = array(
163
  'address' => $b_addr->getStreet1(),
164
  'address2' => $b_addr->getStreet2(),
165
  'city' => $b_addr->getCity(),
166
  'state' => $b_addr->getRegion(),
167
  'country_code' => $b_addr->getCountry(),
168
- 'country' => $country->getName(),
169
  'zip' => $b_addr->getPostcode());
170
 
171
  if (DBGLOG)
172
  {
173
  $temp = json_encode($addrB);
174
- Mage::log("exportOrder built billing address $temp", null, 'order.log', true);
175
  }
176
 
177
- $country = Mage::getModel('directory/country')->loadByCode($s_addr->getCountry());
178
  $addrS = array(
179
  'address' => $s_addr->getStreet1(),
180
  'address2' => $s_addr->getStreet2(),
181
  'city' => $s_addr->getCity(),
182
  'state' => $s_addr->getRegion(),
183
  'country_code' => $s_addr->getCountry(),
184
- 'country' => $country->getName(),
185
  'zip' => $s_addr->getPostcode());
186
 
187
  if (DBGLOG)
188
  {
189
  $temp = json_encode($addrS);
190
- Mage::log("exportOrder built shipping address $temp", null, 'order.log', true);
191
  }
192
 
193
  $dataorder = array(
@@ -201,9 +249,9 @@ class Linc_Care_Model_Orderobserver
201
  'products' => $dataitems);
202
 
203
  $postdata = json_encode($dataorder);
204
- if (DBGLOG) Mage::log($postdata, null, 'order.log', true);
205
 
206
- if (DBGLOG) Mage::log("exportOrder ended", null, 'order.log', true);
207
 
208
  return $postdata;
209
  }
5
  {
6
  public $client = null;
7
  public $queue = null;
8
+ public $logname = 'order.log';
9
+
10
+ public function log($msg)
11
+ {
12
+ if (DBGLOG) Mage::log($msg, null, $this->logname, true);
13
+ #print("<p>$msg</p>");
14
+ }
15
 
16
  public function exportOrder(Varien_Event_Observer $observer)
17
  {
18
+ $this->log("Beginning exportOrder");
19
+
20
+ $store_id = $observer->getEvent()->getOrder()->getStoreId();
21
+ #$this->log($observer->debug());
22
+ $this->log("Got store ID - " . $store_id);
23
+
24
+ # get access key
25
+ $resource = Mage::getSingleton('core/resource');
26
+ $this->log("Got Resource");
27
+
28
+ $read = $resource->getConnection('core_read');
29
+ $this->log("Got Read");
30
+
31
+ $configDataTable = $read->getTableName('core_config_data');
32
+ $this->log("Got config table");
33
+
34
+ $accessToken = '';
35
+ $select = $read->select()
36
+ ->from(array('cd'=>$configDataTable))
37
+ ->where('cd.scope=?', 'store')
38
+ ->where("cd.scope_id=?", $store_id)
39
+ ->where("cd.path=?", 'linc_access_key');
40
+ $this->log("Got Select");
41
+
42
+ $rows = $read->fetchAll($select);
43
+
44
+ if (count($rows) > 0)
45
+ {
46
+ $accessToken = $rows[0]['value'];
47
+ $this->log("Got access token - $accessToken");
48
+ }
49
+ else
50
+ {
51
+ $this->log("Got config table");
52
+ }
53
+
54
  if ($accessToken != null)
55
  {
56
  $post_data_json = $this->buildJson($observer);
62
  {
63
  if ($this->client == null)
64
  {
65
+ $this->log("Connecting to Linc Care");
66
  $this->connectToLincCare($accessToken);
67
  if ($this->client != null && $this->queue != null)
68
  {
69
+ $this->log("Processing the queue");
70
  $sendQueue = $this->queue;
71
  unset($this->queue);
72
+ $this->queue = null;
73
 
74
  foreach ($sendQueue as $data)
75
  {
78
  }
79
  else
80
  {
81
+ $this->log("Saving to queue");
82
  if ($this->queue == null)
83
  {
84
  $this->queue = array();
90
 
91
  if ($this->client != null)
92
  {
93
+ $this->log("Building request");
94
+
95
  $this->client->setRawData($postData, 'application/json');
96
  $response = $this->client->request();
97
 
98
+ $temp = $response->getStatus();
99
+ $this->log("Linc_Care HTTP Status $temp");
 
 
100
 
101
  if ($response->getStatus() == 201)
102
  {
103
  $temp = $response->getBody();
104
+ $this->log("Linc_Care $temp");
105
  }
106
  else
107
  {
108
+ $adapter = $this->client->getAdapter();
109
+ $adapter->close();
110
  $this->client = null;
111
  array_push($this->queue, $postData);
112
  }
115
 
116
  public function connectToLincCare($accessToken)
117
  {
 
118
  $protocol = SERVER_PROTOCOL;
119
  $url = SERVER_PATH;
120
+
121
+ $this->client = new Zend_Http_Client();
122
  $this->client->setUri("$protocol://pub-api.$url/v1/order");
123
 
124
  $this->client->setConfig(array(
135
 
136
  public function buildJson(Varien_Event_Observer $observer)
137
  {
138
+ $this->log("exportOrder started");
139
 
140
  $order = $observer->getEvent()->getOrder();
141
+ $this->log("exportOrder Got order");
142
  $orderdata = $order->getData();
143
+ $this->log("exportOrder Got data");
144
 
145
  $b_addr = $order->getBillingAddress();
146
  if (DBGLOG)
147
  {
148
  $temp = json_encode($b_addr->getData());
149
+ $this->log("exportOrder got billing address $temp");
150
  }
151
 
152
  $s_addr = $order->getShippingAddress();
153
  if (DBGLOG && $s_addr != null)
154
  {
155
  $temp = json_encode($s_addr->getData());
156
+ $this->log("exportOrder got shipping address $temp");
157
  }
158
  else
159
  {
162
  }
163
 
164
  $phone = $b_addr->getTelephone();
165
+ $this->log("exportOrder got phone $phone");
166
 
167
  $items = $order->getItemsCollection();
168
+ $this->log("exportOrder got item collection");
169
 
170
  $dataitems = array();
171
  foreach ($items as $item)
184
  #if (DBGLOG)
185
  {
186
  $temp = json_encode($dataitem);
187
+ $this->log("exportOrder built an item $temp");
188
  }
189
 
190
  array_push($dataitems, $dataitem);
191
  }
192
  }
193
 
194
+ $this->log("exportOrder built items");
195
 
196
  $user = array (
197
+ 'user_id' => $order->getCustomerEmail(),
198
  'first_name' => $order->getCustomerFirstname(),
199
  'last_name' => $order->getCustomerLastname(),
200
  'email' => $order->getCustomerEmail(),
203
  if (DBGLOG)
204
  {
205
  $temp = json_encode($user);
206
+ $this->log("exportOrder built user $temp");
207
  }
208
 
209
+ #$country = Mage::getModel('directory/country')->loadByCode($b_addr->getCountry());
210
  $addrB = array(
211
  'address' => $b_addr->getStreet1(),
212
  'address2' => $b_addr->getStreet2(),
213
  'city' => $b_addr->getCity(),
214
  'state' => $b_addr->getRegion(),
215
  'country_code' => $b_addr->getCountry(),
216
+ #'country' => $country->getName(),
217
  'zip' => $b_addr->getPostcode());
218
 
219
  if (DBGLOG)
220
  {
221
  $temp = json_encode($addrB);
222
+ $this->log("exportOrder built billing address $temp");
223
  }
224
 
225
+ #$country = Mage::getModel('directory/country')->loadByCode($s_addr->getCountry());
226
  $addrS = array(
227
  'address' => $s_addr->getStreet1(),
228
  'address2' => $s_addr->getStreet2(),
229
  'city' => $s_addr->getCity(),
230
  'state' => $s_addr->getRegion(),
231
  'country_code' => $s_addr->getCountry(),
232
+ #'country' => $country->getName(),
233
  'zip' => $s_addr->getPostcode());
234
 
235
  if (DBGLOG)
236
  {
237
  $temp = json_encode($addrS);
238
+ $this->log("exportOrder built shipping address $temp");
239
  }
240
 
241
  $dataorder = array(
249
  'products' => $dataitems);
250
 
251
  $postdata = json_encode($dataorder);
252
+ $this->log($postdata);
253
 
254
+ $this->log("exportOrder ended");
255
 
256
  return $postdata;
257
  }
app/code/community/Linc/Care/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Linc_Care>
13
- <version>1.2.2</version>
14
  </Linc_Care>
15
  </modules>
16
  <admin>
10
  <config>
11
  <modules>
12
  <Linc_Care>
13
+ <version>1.2.3</version>
14
  </Linc_Care>
15
  </modules>
16
  <admin>
app/code/community/Linc/Care/readme DELETED
@@ -1,22 +0,0 @@
1
- Welcome to the Linc Care extension for Magento.
2
-
3
- Here is one possible process for installing our extension.
4
-
5
- For those of you installing manually:
6
- 1. Go to System / Magento Connect / Magento Connect Manager
7
- 2. If you're installing via the Magento Connect website, follow the normal procedure then skip to step 5
8
- 3. If you're installing manually, download the package from http://care.letslinc.com/Downloads/Proximant_Linccare-1.1.0.tgz
9
- 4. Click the Browse button and select the file you just downloaded, the click the Upload button.
10
- 5. Go to System/Configuration/Linc Care/General
11
- 6. Enter the store's url and admin email along with a password, then click register.
12
- 7. When the Linc Care Merchant portal is launched, fill in the requested information.
13
- 8. Go to System/Transactional Email
14
- 9. If you have a have custom emails already, edit it and insert {{block type='care/widget' order=$order}} where you want the Linc Care widget to appear. Then save the template and skip to step 11
15
- 10. If not Click the Add New Template button.
16
- 11. On the next page select New Order from the Template dropdown and click the Load Template button
17
- 12. Name the new template and insert {{block type='care/widget' order=$order}} where you want the Linc Care widget to appear. Then save the template.
18
- 13. Repeat for any other order-based emails you want connected to Linc Care. We suggest New Order Guest
19
- 14. Go to System / Sales / Sales Email / Order and select the new templates for New Order Confirmation Email
20
- 15. Save the configuration
21
-
22
- If you have any comments or questions, please email us at support@linccare.com
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Linc/Care/sql/linc_setup/{mysql4-install-1.2.2.php → mysql4-install-1.2.3.php} RENAMED
@@ -4,9 +4,10 @@ require_once "Linc/Care/common.php";
4
  $installer = $this;
5
  $installer->startSetup();
6
 
7
- $client = new Zend_Http_Client();
8
  $protocol = SERVER_PROTOCOL;
9
  $url = SERVER_PATH;
 
 
10
  $client->setUri("$protocol://pub-api.$url/v1/install");
11
 
12
  $client->setConfig(array(
@@ -18,10 +19,6 @@ $client->setConfig(array(
18
  $client->setMethod(Zend_Http_Client::POST);
19
  $client->setHeaders(array('Content-Type' => 'application/json'));
20
 
21
- $resource = Mage::getSingleton('core/resource');
22
- $read = $resource->getConnection('core_read');
23
- $configDataTable = $read->getTableName('core_config_data');
24
-
25
  $dataorder = array(
26
  'ecommerce' => 'magento',
27
  'product' => 'Linc Care Extension',
4
  $installer = $this;
5
  $installer->startSetup();
6
 
 
7
  $protocol = SERVER_PROTOCOL;
8
  $url = SERVER_PATH;
9
+
10
+ $client = new Zend_Http_Client();
11
  $client->setUri("$protocol://pub-api.$url/v1/install");
12
 
13
  $client->setConfig(array(
19
  $client->setMethod(Zend_Http_Client::POST);
20
  $client->setHeaders(array('Content-Type' => 'application/json'));
21
 
 
 
 
 
22
  $dataorder = array(
23
  'ecommerce' => 'magento',
24
  'product' => 'Linc Care Extension',
package.xml CHANGED
@@ -1,88 +1,70 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Linc_Care</name>
4
- <version>1.2.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.letslinc.com/legal/linccarelicenseagreement/">Linc Global Commercial License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Linc Care streamlines a personal and contextual self-serviced customer care experience that drives loyalty.</summary>
10
- <description>&lt;p&gt;&amp;#154;ber customer care experience is the &lt;strong&gt;#1 driver for customer loyalty&lt;/strong&gt;. Linc Care makes it easy for retailers to offer a personal and contextual &lt;strong&gt;customer care experience&lt;/strong&gt; that wins loyalty and referral, at the same time reduces customer service cost.&lt;/p&gt;&#xD;
11
- &#xD;
12
- &lt;p&gt;Install in minutes, you will get a major face-lift for all your order confirmation and order shipped notification emails, which has:&#xD;
13
- &#xD;
14
- &lt;strong&gt;A dynamically updated one-touch service center&lt;/strong&gt; that&#xD;
15
- &#xD;
16
- &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. shows your customers &lt;strong&gt;live order tracking status&lt;/strong&gt; right within the email at the time the customers open the emails. &lt;a href="https://internal.letslinc.com/ecare/dashboard/demo/36ad21cc-eabd-11e3-b42b-22000ac69e83"&gt;&lt;b&gt;Click to see a live demo&lt;/b&gt;&lt;/a&gt;&#xD;
17
- &#xD;
18
- &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. offers your customers &lt;strong&gt;text message notifications&lt;/strong&gt; on an opt-in basis for shipping and delivery (we are integrated to all shippers and manages both notifications and customer preference without any development on your end)&#xD;
19
- &#xD;
20
- &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;3. assists your customers on interactions with you. Let it be a product question or a general inquiry, Linc Care uses the customer&#x2019;s own purchase details to &lt;strong&gt;intelligently guide the customer through a seamless experience&lt;/strong&gt;, plus customers can request a call back or receive answers in text messages. We handle it all, and all you need is a customer service email address and reply the email inquiries :) &lt;a href="https://internal.letslinc.com/ecare/dashboard/demo/36ad21cc-eabd-11e3-b42b-22000ac69e83"&gt;&lt;b&gt;Click to see a live demo&lt;/b&gt;&lt;/a&gt;&#xD;
21
- &#xD;
22
- &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;4. [Optional] assists your customers with return / exchange, where they can directly view the return policy, give you feedback on reasons for return, and directly print out shipping label.&lt;/p&gt;&#xD;
23
- &#xD;
24
- &lt;p&gt;&lt;strong&gt; &lt;/strong&gt;&#xD;
25
- &#xD;
26
- &lt;h2&gt;Responsive Design for all Devices&lt;/h2&gt;&#xD;
27
- &#xD;
28
- Fully responsive design for large screens or small screens like smart phones, &lt;strong&gt;delighting on-the-go shoppers&lt;/strong&gt; wherever they access their order status.&lt;/p&gt;&#xD;
29
- &#xD;
30
- &lt;h2&gt;Dedicated Customer Success Team and Full Support for A/B Testing&lt;/h2&gt;&#xD;
31
- &#xD;
32
  &lt;p&gt;Linc Care can be easily installed in minutes. But if you do need help or customization, regardless the size of your organization, we make sure you have a dedicated account manager to assist you.&lt;/p&gt;&#xD;
33
- &#xD;
34
  &lt;h2&gt;Follow Linc&lt;/h2&gt;&#xD;
35
- &#xD;
36
- &lt;p&gt;Linc Care is built by a team of seasoned technologists who brought to life large scale consumer products for companies like &lt;strong&gt;Google, Yahoo and Amazon&lt;/strong&gt;. We were driven by the passion and believe that technology can truly empower mid-sized retail owners to compete and out-perform large retailers. We are new to Magneto platform, but are&lt;strong&gt; serving internet 1000 everyday&lt;/strong&gt;. If you have feature requests and suggestions for us, please do contact us at &lt;a href="mailto:linc-care-issues-magento@letslinc.com"&gt;linc-care-issues-magento@letslinc.com&lt;/a&gt;. We want to hear from you! &lt;/p&gt;&#xD;
37
- &#xD;
38
- &lt;p&gt;&lt;a href="http://www.letslinc.com"&gt;www.letslinc.com&lt;/a&gt;&lt;/p&gt;&#xD;
39
- &#xD;
40
- &lt;p&gt;&#xD;
41
- &#xD;
42
- The Linc Care Professional Services Team is available to help you customize your experience at: &lt;a href="mailto:sales@letslinc.com"&gt;sales@letslinc.com&lt;/a&gt;&lt;/p&gt;</description>
43
  <notes>Welcome to the Linc Care extension for Magento.&#xD;
44
- &#xD;
45
- &#xD;
46
- &#xD;
47
- Here is one possible process for installing our extension.&#xD;
48
- &#xD;
49
- &#xD;
50
- &#xD;
51
- For those of you installing manually:&#xD;
52
- &#xD;
53
- 1. Go to System / Magento Connect / Magento Connect Manager&#xD;
54
- &#xD;
55
- 2. Follow the normal procedure for installing an extension&#xD;
56
- &#xD;
57
- 3. Go to System / Configuration / Linc Care / General&#xD;
58
- &#xD;
59
- 4. Enter the store's url and admin email along with a password, then click register.&#xD;
60
- &#xD;
61
- 5. When the Linc Care Merchant portal is launched, fill in the requested information.&#xD;
62
- &#xD;
63
- 6. Go to System / Transactional Email&#xD;
64
- &#xD;
65
- 7. If you have a have custom New Order template already, edit it and insert {{block type='care/widget' order=$order}} where you want the Linc Care widget to appear. Then save the template and skip to step 10&#xD;
66
- &#xD;
67
- 8. If not Click the Add New Template button.&#xD;
68
- &#xD;
69
- 9. On the next page select New Order from the Template dropdown and click the Load Template button&#xD;
70
- &#xD;
71
- 10. Name the new template and insert {{block type='care/widget' order=$order}} where you want the Linc Care widget to appear. Then save the template.&#xD;
72
- &#xD;
73
- 11. Repeat for any other order-based emails you want connected to Linc Care. We suggest the New Order Guest template as well.&#xD;
74
- &#xD;
75
- 12. Go to System / Sales / Sales Email / Order and select the new templates for New Order Confirmation Email&#xD;
76
- &#xD;
77
- 13. Save the configuration&#xD;
78
- &#xD;
79
- &#xD;
80
- If you have any comments or questions, please email us at support-magento@letslinc.com&#xD;
81
  </notes>
82
  <authors><author><name>Linc Care</name><user>letslincapp</user><email>apps@letslinc.com</email></author></authors>
83
- <date>2015-01-30</date>
84
- <time>06:58:09</time>
85
- <contents><target name="mageetc"><dir name="modules"><file name="Linc_Care.xml" hash="8dd7784200f8ff440a0c970d89db190d"/></dir></target><target name="magecommunity"><dir name="Linc"><dir name="Care"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Register.php" hash="aaae24f105064ce11e9da2e5c3d778e2"/></dir></dir></dir></dir><file name="Confirm.php" hash="c5802e17ab99fe29759d4f0c3b61c16d"/><file name="Email.php" hash="8f6eb60dd06f7258c842377cb92bec07"/><file name="Faqbutton.php" hash="e9804ff3824aaaa5383af0f97fc75c1b"/><file name="Note.php" hash="637733c4a7ad19ef66b9db1d75c28b8d"/><file name="Pwd.php" hash="7dbe6f455456f06cb47ebdd072bdbd7f"/><file name="Url.php" hash="98d81a2b8c1fbbccc3928cdc4c8d9a5b"/><file name="Widget.php" hash="9f14b52eac49e43a6bb172a502554ba2"/></dir><dir name="Helper"><file name="Data.php" hash="34aec0a0ed4d5a1652b46fb7fe54707d"/></dir><dir name="Model"><file name="Fulfillmentobserver.php" hash="09cd26ecf5c128eba3267392904c1ed4"/><file name="Orderobserver.php" hash="7a80b9c07e1bd32e65e373e0a31db429"/><dir name="Resource"><file name="Setup.php" hash="7169ea333f6a42a0edc86effa4a11195"/></dir></dir><file name="common.php" hash="82b09b911018f12ce42efd9a32bbddf1"/><dir name="controllers"><file name="CareController.php" hash="5c65bf047fcddc87ad7f3a2ebff0e924"/></dir><dir name="etc"><file name="config.xml" hash="70b9eb6c153774b49cb819eb2d3a7906"/><file name="system.xml" hash="95036d9df5911e0c0d2e6db996a4bbff"/></dir><file name="readme" hash="01f2eed106a3cf9d67bb200665b22c48"/><dir name="sql"><dir name="linc_setup"><file name="mysql4-install-1.2.2.php" hash="f94f63b057b5e0d911140805f2a80687"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="care"><dir name="system"><dir name="config"><file name="register.phtml" hash="0efab1b7ae4c930961a396ebc9c48d2b"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
86
  <compatible/>
87
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
88
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Linc_Care</name>
4
+ <version>1.2.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.letslinc.com/legal/linccarelicenseagreement/">Linc Global Commercial License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Linc Care streamlines a personal and contextual self-serviced customer care experience that drives loyalty.</summary>
10
+ <description>&lt;p&gt;Uber customer care experience is the &lt;strong&gt;#1 driver for customer loyalty&lt;/strong&gt;. Linc Care makes it easy for retailers to offer a personal and contextual &lt;strong&gt;customer care experience&lt;/strong&gt; that wins loyalty and referral, at the same time reduces customer service cost.&lt;/p&gt;&#xD;
11
+ &lt;p&gt;Install in minutes, you will get a major face-lift for all your order confirmation and order shipped notification emails, which has:&#xD;
12
+ &lt;strong&gt;A dynamically updated one-touch service center&lt;/strong&gt; that&#xD;
13
+ &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. shows your customers &lt;strong&gt;live order tracking status&lt;/strong&gt; right within the email at the time the customers open the emails. &lt;a href="https://internal.letslinc.com/ecare/dashboard/demo/36ad21cc-eabd-11e3-b42b-22000ac69e83"&gt;&lt;b&gt;Click to see a live demo &amp;gt;&amp;gt;&lt;/b&gt;&lt;/a&gt;&#xD;
14
+ &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. offers your customers &lt;strong&gt;text message notifications&lt;/strong&gt; on an opt-in basis for shipping and delivery (we are integrated to all shippers and manages both notifications and customer preference without any development on your end)&#xD;
15
+ &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;3. assists your customers on interactions with you. Let it be a product question or a general inquiry, Linc Care uses the customer&#x2019;s own purchase details to &lt;strong&gt;intelligently guide the customer through a seamless experience&lt;/strong&gt;, plus customers can request a call back or receive answers in text messages. We handle it all, and all you need is a customer service email address and reply the email inquiries :) &lt;a href="https://internal.letslinc.com/ecare/dashboard/demo/36ad21cc-eabd-11e3-b42b-22000ac69e83"&gt;&lt;b&gt;Click to see a live demo &amp;gt;&amp;gt;&lt;/b&gt;&lt;/a&gt;&#xD;
16
+ &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;4. [Optional] assists your customers with return / exchange, where they can directly view the return policy, give you feedback on reasons for return, and directly print out shipping label.&lt;/p&gt;&#xD;
17
+ &#xD;
18
+ &lt;h2&gt;Personalized Product Recommendations&lt;/h2&gt;&#xD;
19
+ &lt;p&gt;A product recommendation section that is &lt;strong&gt;constantly optimized&lt;/strong&gt; using product correlations learned from your own sales data. We check against your product listing and inventory data to make sure all product recommendations are up-to-date at the time customers are viewing their emails.&lt;p /&gt;&#xD;
20
+ &lt;a href="https://internal.letslinc.com/ecare/dashboard/demo/36ad21cc-eabd-11e3-b42b-22000ac69e83"&gt;&lt;b&gt;Click to see a live demo &amp;gt;&amp;gt;&lt;/b&gt;&lt;/a&gt;&#xD;
21
+ &#xD;
22
+ &lt;h2&gt;Responsive Design for all Devices&lt;/h2&gt;&#xD;
23
+ &lt;p&gt;Fully responsive design for large screens or small screens like smart phones, &lt;strong&gt;delighting on-the-go shoppers&lt;/strong&gt; wherever they access their order status.&lt;/p&gt;&#xD;
24
+ &#xD;
25
+ &lt;h2&gt;Dedicated Customer Success Team and Full Support for A/B Testing&lt;/h2&gt;&#xD;
 
 
 
 
 
 
26
  &lt;p&gt;Linc Care can be easily installed in minutes. But if you do need help or customization, regardless the size of your organization, we make sure you have a dedicated account manager to assist you.&lt;/p&gt;&#xD;
27
+ &#xD;
28
  &lt;h2&gt;Follow Linc&lt;/h2&gt;&#xD;
29
+ &lt;p&gt;Linc Care is built by a team of seasoned technologists who brought to life large scale consumer products for companies like &lt;strong&gt;Google, Yahoo and Amazon&lt;/strong&gt;. We were driven by the passion and believe that technology can truly empower mid-sized retail owners to compete and out-perform large retailers. We are new to Magneto platform, but are&lt;strong&gt; serving internet 1000 everyday&lt;/strong&gt;. If you have feature requests and suggestions for us, please do contact us at &lt;a href="mailto:support@letslinc.com"&gt;support@letslinc.com&lt;/a&gt;. We want to hear from you! &lt;/p&gt;&#xD;
30
+ &lt;p&gt;&lt;a href="http://www.letslinc.com"&gt;www.letslinc.com&lt;/a&gt;&lt;/p&gt;&#xD;
31
+ &#xD;
32
+ &lt;p&gt;The Linc Care Professional Services Team is available to help you customize your experience at: &lt;a href="mailto:sales@linccare.com"&gt;sales@linccare.com&lt;/a&gt;&lt;/p&gt;</description>
 
 
 
 
33
  <notes>Welcome to the Linc Care extension for Magento.&#xD;
34
+ &#xD;
35
+ Installation and configuration process:&#xD;
36
+ &#xD;
37
+ 1. Go to System / Magento Connect / Magento Connect Manager&#xD;
38
+ &#xD;
39
+ 2. Search for Linc Care and then follow the normal procedure for installing an extension&#xD;
40
+ &#xD;
41
+ 3. Go to System / Configuration / Linc Care / General&#xD;
42
+ &#xD;
43
+ 4. Select a store to configure. You must register and configure each store separately.&#xD;
44
+ &#xD;
45
+ 5. Enter the store's url and admin email (defaults to the Magento values) Specify and confirm a password, then click register. Each store must have a unique URL and admin email.&#xD;
46
+ &#xD;
47
+ 6. When the Linc Care Merchant portal is launched, login with the URL, email and password you just specified. Fill in the requested information. Some information is optional, but you must complete the configuration before continuing. If you need to&#xD;
48
+ come back and finish later, the URL to the portal is https://care.letslinc.com/merchants&#xD;
49
+ &#xD;
50
+ 7. On the last page of the configuration, you will be given the widget code to be inserted into your emails.&#xD;
51
+ &#xD;
52
+ 8. Go to System / Transactional Email&#xD;
53
+ &#xD;
54
+ 9. If you have a have custom New Order template already, edit it and insert the widget code where you want the Linc Care widget to appear. Then save the template.&#xD;
55
+ &#xD;
56
+ 10. Repeat for any other order-based emails you want connected to Linc Care. We suggest the New Order Guest, New Shipment and New Shipment Guest templates as well.&#xD;
57
+ &#xD;
58
+ 11. Go to System / Sales / Sales Email and select the new templates&#xD;
59
+ &#xD;
60
+ 12. Save the configuration and you're done.&#xD;
61
+ &#xD;
62
+ If you have any comments or questions, please email us at support-magento@letslinc.com&#xD;
 
 
 
 
 
 
 
 
63
  </notes>
64
  <authors><author><name>Linc Care</name><user>letslincapp</user><email>apps@letslinc.com</email></author></authors>
65
+ <date>2015-02-10</date>
66
+ <time>22:48:13</time>
67
+ <contents><target name="mageetc"><dir name="modules"><file name="Linc_Care.xml" hash="8dd7784200f8ff440a0c970d89db190d"/></dir></target><target name="magecommunity"><dir name="Linc"><dir name="Care"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Register.php" hash="aaae24f105064ce11e9da2e5c3d778e2"/></dir></dir></dir></dir><file name="Confirm.php" hash="c5802e17ab99fe29759d4f0c3b61c16d"/><file name="Email.php" hash="8f6eb60dd06f7258c842377cb92bec07"/><file name="Faqbutton.php" hash="e9804ff3824aaaa5383af0f97fc75c1b"/><file name="Note.php" hash="637733c4a7ad19ef66b9db1d75c28b8d"/><file name="Pwd.php" hash="7dbe6f455456f06cb47ebdd072bdbd7f"/><file name="Url.php" hash="98d81a2b8c1fbbccc3928cdc4c8d9a5b"/><file name="Widget.php" hash="9f14b52eac49e43a6bb172a502554ba2"/></dir><dir name="Helper"><file name="Data.php" hash="34aec0a0ed4d5a1652b46fb7fe54707d"/></dir><dir name="Model"><file name="Fulfillmentobserver.php" hash="2d9b00406a908235fced0d27e128976a"/><file name="Orderobserver.php" hash="9942bc307a6027cbbd932ac1028289aa"/><dir name="Resource"><file name="Setup.php" hash="7169ea333f6a42a0edc86effa4a11195"/></dir></dir><file name="common.php" hash="82b09b911018f12ce42efd9a32bbddf1"/><dir name="controllers"><file name="CareController.php" hash="5c65bf047fcddc87ad7f3a2ebff0e924"/></dir><dir name="etc"><file name="config.xml" hash="3eeb59f6ad643e8321e9ab789aa2d86d"/><file name="system.xml" hash="95036d9df5911e0c0d2e6db996a4bbff"/></dir><dir name="sql"><dir name="linc_setup"><file name="mysql4-install-1.2.3.php" hash="ab29cefebab6089b060584cda4ad7d77"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="care"><dir name="system"><dir name="config"><file name="register.phtml" hash="0efab1b7ae4c930961a396ebc9c48d2b"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
68
  <compatible/>
69
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
70
  </package>