Linc_Care - Version 1.1.3

Version Notes

Welcome to the Linc Care extension for Magento.

Here is one possible process for installing our extension.

For those of you installing manually:
1. Go to System / Magento Connect / Magento Connect Manager
2. Follow the normal procedure for installing an extension
3. Go to System / Configuration / Linc Care / General
4. Enter the store's url and admin email along with a password, then click register.
5. When the Linc Care Merchant portal is launched, fill in the requested information.
6. Go to System / Transactional Email
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
8. If not Click the Add New Template button.
9. On the next page select New Order from the Template dropdown and click the Load Template button
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.
11. Repeat for any other order-based emails you want connected to Linc Care. We suggest the New Order Guest template as well.
12. Go to System / Sales / Sales Email / Order and select the new templates for New Order Confirmation Email
13. Save the configuration

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.1.3
Comparing to
See all releases


Code changes from version 1.1.2 to 1.1.3

app/code/community/Linc/Care/Block/Adminhtml/System/Config/Form/Register.php CHANGED
@@ -5,7 +5,7 @@ class Linc_Care_Block_Adminhtml_System_Config_Form_Register extends Mage_Adminht
5
  {
6
  protected function _construct()
7
  {
8
- if (DEBUG) Mage::log("construct called", null, 'register.log', true);
9
 
10
  parent::_construct();
11
  $this->setTemplate('care/system/config/register.phtml');
@@ -20,38 +20,38 @@ class Linc_Care_Block_Adminhtml_System_Config_Form_Register extends Mage_Adminht
20
 
21
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
22
  {
23
- if (DEBUG) Mage::log("getElementHtml called", null, 'register.log', true);
24
 
25
  return $this->_toHtml();
26
  }
27
 
28
  public function getAjaxRegisterUrl()
29
  {
30
- if (DEBUG) Mage::log("getAjaxRegisterUrl called", null, 'register.log', true);
31
 
32
  $url = Mage::app()->getStore()->getUrl('linccare/care/register');
33
 
34
- if (DEBUG) Mage::log("getAjaxRegisterUrl $url", null, 'register.log', true);
35
 
36
  return $url;
37
  }
38
 
39
  public function getMerchantOnboardUrl()
40
  {
41
- if (DEBUG) Mage::log("getMerchantOnboardUrl called", null, 'register.log', true);
42
 
43
  $protocol = SERVER_PROTOCOL;
44
  $path = SERVER_PATH;
45
  $url = "$protocol://care.$path/merchants";
46
 
47
- if (DEBUG) Mage::log("getMerchantOnboardUrl returning $url", null, 'register.log', true);
48
 
49
  return $url;
50
  }
51
 
52
  public function getButtonHtml()
53
  {
54
- if (DEBUG) Mage::log("getButtonHtml called", null, 'register.log', true);
55
 
56
  $resource = Mage::getSingleton('core/resource');
57
  $read = $resource->getConnection('core_read');
5
  {
6
  protected function _construct()
7
  {
8
+ if (DBGLOG) Mage::log("construct called", null, 'register.log', true);
9
 
10
  parent::_construct();
11
  $this->setTemplate('care/system/config/register.phtml');
20
 
21
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
22
  {
23
+ if (DBGLOG) Mage::log("getElementHtml called", null, 'register.log', true);
24
 
25
  return $this->_toHtml();
26
  }
27
 
28
  public function getAjaxRegisterUrl()
29
  {
30
+ if (DBGLOG) Mage::log("getAjaxRegisterUrl called", null, 'register.log', true);
31
 
32
  $url = Mage::app()->getStore()->getUrl('linccare/care/register');
33
 
34
+ if (DBGLOG) Mage::log("getAjaxRegisterUrl $url", null, 'register.log', true);
35
 
36
  return $url;
37
  }
38
 
39
  public function getMerchantOnboardUrl()
40
  {
41
+ if (DBGLOG) Mage::log("getMerchantOnboardUrl called", null, 'register.log', true);
42
 
43
  $protocol = SERVER_PROTOCOL;
44
  $path = SERVER_PATH;
45
  $url = "$protocol://care.$path/merchants";
46
 
47
+ if (DBGLOG) Mage::log("getMerchantOnboardUrl returning $url", null, 'register.log', true);
48
 
49
  return $url;
50
  }
51
 
52
  public function getButtonHtml()
53
  {
54
+ if (DBGLOG) Mage::log("getButtonHtml called", null, 'register.log', true);
55
 
56
  $resource = Mage::getSingleton('core/resource');
57
  $read = $resource->getConnection('core_read');
app/code/community/Linc/Care/Block/Url.php CHANGED
@@ -59,7 +59,7 @@ class Linc_Care_Block_Url extends Mage_Adminhtml_Block_System_Config_Form_Field
59
  $disabled = "disabled";
60
  }
61
 
62
- if (DEBUG) Mage::log("Url - $store_id; $url; $shop_id", null, 'register.log', true);
63
 
64
  $html = parent::_getElementHtml($element);
65
  $html .= "<input type=text class='input-text required-entry validate-url' id=linccaresection_linccaregroup_url maxlength=2000 value='$url' $disabled />";
59
  $disabled = "disabled";
60
  }
61
 
62
+ if (DBGLOG) Mage::log("Url - $store_id; $url; $shop_id", null, 'register.log', true);
63
 
64
  $html = parent::_getElementHtml($element);
65
  $html .= "<input type=text class='input-text required-entry validate-url' id=linccaresection_linccaregroup_url maxlength=2000 value='$url' $disabled />";
app/code/community/Linc/Care/Block/Widget.php CHANGED
@@ -9,88 +9,114 @@ class Linc_Care_Block_Widget extends Mage_Core_Block_Abstract
9
  {
10
  $html = "";
11
 
12
- $store_id = Mage::app->GetCurrentStore()->getId();
13
- $shop_id = Mage::getStoreConfig('linc_shop_id', $store_id);
 
14
 
15
- if ($shop_id != null)
 
16
  {
17
- $order = $this->getOrder();
18
- if ($order)
19
- {
20
- $items = $order->getItemsCollection();
21
 
22
- $query = "";
23
- $baseurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
24
- foreach ($items as $item)
25
- {
26
- $product = Mage::getModel('catalog/product')->load($item->getProduct()->getId());
27
- if ($product->isVisibleInSiteVisibility())
28
- {
29
- $imgurl = $baseurl.$product->getImage();
30
 
31
- if ($query != "")
32
- {
33
- $query .= "&";
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
- $query .= "q=".$item->getQtyOrdered();
37
- $query .= "&p=".$product->getId();
38
- $query .= "&pp=".$item->getPrice();
39
- $query .= "&w=".$item->getWeight();
40
- $query .= "&i=".$this->urlencode($imgurl);
41
- $query .= "&n=".$this->urlencode($item->getName());
42
- }
43
- }
44
 
45
- $s_addr = $order->getShippingAddress();
46
- if ($s_addr == null)
 
 
 
 
47
  {
48
- /* use billing address for shipping address when the purchase is a download. */
49
- $s_addr = $order->getBillingAddress();
50
- }
51
-
52
- $query .= "&a1=".$this->urlencode($s_addr->getStreet1());
53
- $query .= "&a2=".$this->urlencode($s_addr->getStreet2());
54
- $query .= "&au=".$this->urlencode($s_addr->getCountry());
55
- $query .= "&ac=".$this->urlencode($s_addr->getCity());
56
- $query .= "&as=".$this->urlencode($s_addr->getRegion());
57
- $query .= "&az=".$this->urlencode($s_addr->getPostcode());
58
- $query .= "&fn=".$this->urlencode($order->getCustomerFirstname());
59
- $query .= "&ln=".$this->urlencode($order->getCustomerLastname());
60
- $query .= "&e=".$this->urlencode($order->getCustomerEmail());
61
- $query .= "&g=".$this->urlencode($order->getGrandTotal());
62
- $query .= "&o=".$this->urlencode($order->getIncrementId());
63
- $query .= "&osi=".$this->urlencode($order->getIncrementId());
64
- $query .= "&pd=".$this->urlencode($order->getUpdatedAt('long'));
65
- $query .= "&ph=".$this->urlencode($s_addr->getTelephone());
66
- $query .= "&shop_id=".$this->urlencode($shop_id);
67
- $query .= "&source=email";
68
- $query .= "&viewer=".$this->urlencode($order->getCustomerEmail());
69
- $query .= "&v=2";
70
 
71
- $protocol = SERVER_PROTOCOL;
72
- $url = SERVER_PATH;
73
- $html = "<img src='$protocol://care.$url/user_activity?";
74
- $html .= $query."&activity=widget_impression' border='0' height='1' width='1'>";
75
- $html .= "<a href='$protocol://care.$url/home?";
76
- $html .= $query."'><img src='$protocol://care.$url/widget_image?";
77
- $html .= $query."&widget=0'></a>";
78
 
79
- //Mage::log("Widget complete - $html", null, 'order.log', true);
 
 
 
 
 
 
80
  }
81
- else
 
 
82
  {
83
- $protocol = SERVER_PROTOCOL;
84
- $url = SERVER_PATH;
85
- $query .= "shop_id=".$shop_id;
86
- $html = "<a href='$protocol://care.$url/home?";
87
- $html .= $query."'><img src='$protocol://care.$url/widget_image?";
88
- $html .= $query."&v=2&widget=0'></a>";
89
  }
90
- }
91
- else
92
- {
93
- $html = "<p></p>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
 
96
  return $html;
9
  {
10
  $html = "";
11
 
12
+ $resource = Mage::getSingleton('core/resource');
13
+ $read = $resource->getConnection('core_read');
14
+ $configDataTable = $read->getTableName('core_config_data');
15
 
16
+ $order = $this->getOrder();
17
+ if (is_null($order))
18
  {
19
+ $resource = Mage::getSingleton('core/resource');
20
+ $read = $resource->getConnection('core_read');
21
+ $configDataTable = $read->getTableName('core_config_data');
 
22
 
23
+ # get shop_id
24
+ $shop_id = '';
25
+ $select = $read->select()
26
+ ->from(array('cd'=>$configDataTable))
27
+ ->where('cd.scope=?', 'store')
28
+ ->where("cd.path=?", 'linc_shop_id');
29
+ $rows = $read->fetchAll($select);
 
30
 
31
+ if (count($rows) > 0)
32
+ {
33
+ $shop_id = $rows[0]['value'];
34
+ }
35
+
36
+ $protocol = SERVER_PROTOCOL;
37
+ $url = SERVER_PATH;
38
+ $query = "shop_id=".$shop_id;
39
+ $html = "<a href='$protocol://care.$url/home?";
40
+ $html .= $query."'><img src='$protocol://care.$url/widget_image?";
41
+ $html .= $query."&v=2&widget=0'></a>";
42
+ }
43
+ else
44
+ {
45
+ $store_id = $order->getStoreId();
46
+ # get shop_id
47
+ $shop_id = '';
48
+ $select = $read->select()
49
+ ->from(array('cd'=>$configDataTable))
50
+ ->where('cd.scope=?', 'store')
51
+ ->where("cd.scope_id=?", $store_id)
52
+ ->where("cd.path=?", 'linc_shop_id');
53
+ $rows = $read->fetchAll($select);
54
 
55
+ if (count($rows) > 0)
56
+ {
57
+ $shop_id = $rows[0]['value'];
58
+ }
59
+
60
+ $items = $order->getItemsCollection();
 
 
61
 
62
+ $query = "";
63
+ $baseurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
64
+ foreach ($items as $item)
65
+ {
66
+ $product = Mage::getModel('catalog/product')->load($item->getProduct()->getId());
67
+ if ($product->isVisibleInSiteVisibility())
68
  {
69
+ $imgurl = $baseurl.$product->getImage();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
+ if ($query != "")
72
+ {
73
+ $query .= "&";
74
+ }
 
 
 
75
 
76
+ $query .= "q=".$item->getQtyOrdered();
77
+ $query .= "&p=".$product->getId();
78
+ $query .= "&pp=".$item->getPrice();
79
+ $query .= "&w=".$item->getWeight();
80
+ $query .= "&i=".urlencode($imgurl);
81
+ $query .= "&n=".urlencode($item->getName());
82
+ }
83
  }
84
+
85
+ $s_addr = $order->getShippingAddress();
86
+ if ($s_addr == null)
87
  {
88
+ /* use billing address for shipping address when the purchase is a download. */
89
+ $s_addr = $order->getBillingAddress();
 
 
 
 
90
  }
91
+
92
+ $query .= "&a1=".urlencode($s_addr->getStreet1());
93
+ $query .= "&a2=".urlencode($s_addr->getStreet2());
94
+ $query .= "&au=".urlencode($s_addr->getCountry());
95
+ $query .= "&ac=".urlencode($s_addr->getCity());
96
+ $query .= "&as=".urlencode($s_addr->getRegion());
97
+ $query .= "&az=".urlencode($s_addr->getPostcode());
98
+ $query .= "&fn=".urlencode($order->getCustomerFirstname());
99
+ $query .= "&ln=".urlencode($order->getCustomerLastname());
100
+ $query .= "&e=".urlencode($order->getCustomerEmail());
101
+ $query .= "&g=".urlencode($order->getGrandTotal());
102
+ $query .= "&o=".urlencode($order->getIncrementId());
103
+ $query .= "&osi=".urlencode($order->getIncrementId());
104
+ $query .= "&pd=".urlencode($order->getUpdatedAt('long'));
105
+ $query .= "&ph=".urlencode($s_addr->getTelephone());
106
+ $query .= "&shop_id=".urlencode($shop_id);
107
+ $query .= "&source=email";
108
+ $query .= "&viewer=".urlencode($order->getCustomerEmail());
109
+ $query .= "&v=2";
110
+
111
+ $protocol = SERVER_PROTOCOL;
112
+ $url = SERVER_PATH;
113
+ $html = "<img src='$protocol://care.$url/user_activity?";
114
+ $html .= $query."&activity=widget_impression' border='0' height='1' width='1'>";
115
+ $html .= "<a href='$protocol://care.$url/home?";
116
+ $html .= $query."'><img src='$protocol://care.$url/widget_image?";
117
+ $html .= $query."&widget=0'></a>";
118
+
119
+ //Mage::log("Widget complete - $html", null, 'order.log', true);
120
  }
121
 
122
  return $html;
app/code/community/Linc/Care/Model/Fulfillmentobserver.php CHANGED
@@ -17,48 +17,48 @@ class Linc_Care_Model_Fulfillmentobserver
17
 
18
  public function exportFulfillment(Varien_Event_Observer $observer)
19
  {
20
- if (DEBUG) Mage::log("Fulfillmentobserver::exportFulfillment started", null, 'fullfillment.log', true);
21
 
22
  $this->initializeObjects($observer);
23
  if ($this->accessToken != null)
24
  {
25
- if (DEBUG) Mage::log("Fulfillmentobserver::exportFulfillment building the JSON", null, 'fullfillment.log', true);
26
  $post_data_json = $this->buildJson($observer);
27
 
28
- if (DEBUG) Mage::log("Fulfillmentobserver::exportFulfillment making the API call", null, 'fullfillment.log', true);
29
  $this->sendFulfillment($post_data_json);
30
 
31
- if (DEBUG) Mage::log("Fulfillmentobserver::exportFulfillment ending", null, 'fullfillment.log', true);
32
  }
33
  }
34
 
35
  public function initializeObjects($observer)
36
  {
37
- if (DEBUG) Mage::log("Fulfillmentobserver::initializeObjects getting the track", null, 'fullfillment.log', true);
38
  $this->track = $observer->getTrack();
39
 
40
- if (DEBUG) Mage::log("Fulfillmentobserver::initializeObjects getting the store", null, 'fullfillment.log', true);
41
  $this->store = $this->track->getStore();
42
 
43
- if (DEBUG) Mage::log("Fulfillmentobserver::initializeObjects getting shipment", null, 'fullfillment.log', true);
44
  $this->shipment = $this->track->getShipment();
45
 
46
- if (DEBUG) Mage::log("Fulfillmentobserver::initializeObjects getting order", null, 'fullfillment.log', true);
47
  $this->order = $this->shipment->getOrder();
48
 
49
- if (DEBUG) Mage::log("Fulfillmentobserver::initializeObjects getting carrier", null, 'fullfillment.log', true);
50
  $this->carrier = $this->order->getShippingCarrier();
51
 
52
- if (DEBUG) Mage::log("Fulfillmentobserver::initializeObjects getting the store id", null, 'fullfillment.log', true);
53
  $this->store_id = $this->store->getConfig('general/store_information/enter_store_id');
54
 
55
- if (DEBUG) Mage::log("Fulfillmentobserver::exportFulfillment getting the token", null, 'fullfillment.log', true);
56
  $this->accessToken = Mage::getStoreConfig('linc_access_key', $store_id);
57
  }
58
 
59
  public function sendFulfillment($postData)
60
  {
61
- if (DEBUG) Mage::log("Fulfillmentobserver::sendFulfillment started", null, 'fullfillment.log', true);
62
 
63
  if ($this->client == null)
64
  {
@@ -104,7 +104,7 @@ class Linc_Care_Model_Fulfillmentobserver
104
 
105
  public function connectToLincCare()
106
  {
107
- if (DEBUG) Mage::log("Fulfillmentobserver::connectToLincCare started", null, 'fullfillment.log', true);
108
 
109
  $this->client = new Zend_Http_Client();
110
  $protocol = SERVER_PROTOCOL;
@@ -125,7 +125,7 @@ class Linc_Care_Model_Fulfillmentobserver
125
 
126
  public function buildJson(Varien_Event_Observer $observer)
127
  {
128
- if (DEBUG) Mage::log("Fulfillmentobserver::buildJson started", null, 'fullfillment.log', true);
129
 
130
  $postdata = "";
131
  $CarrierCode = "";
@@ -143,9 +143,9 @@ class Linc_Care_Model_Fulfillmentobserver
143
  );
144
 
145
  $postdata = json_encode($dataorder);
146
- if (DEBUG) Mage::log($postdata, null, 'fullfillment.log', true);
147
 
148
- if (DEBUG) Mage::log("buildJson ended", null, 'fullfillment.log', true);
149
 
150
  return $postdata;
151
  }
17
 
18
  public function exportFulfillment(Varien_Event_Observer $observer)
19
  {
20
+ if (DBGLOG) Mage::log("Fulfillmentobserver::exportFulfillment started", null, 'fullfillment.log', true);
21
 
22
  $this->initializeObjects($observer);
23
  if ($this->accessToken != null)
24
  {
25
+ if (DBGLOG) Mage::log("Fulfillmentobserver::exportFulfillment building the JSON", null, 'fullfillment.log', true);
26
  $post_data_json = $this->buildJson($observer);
27
 
28
+ if (DBGLOG) Mage::log("Fulfillmentobserver::exportFulfillment making the API call", null, 'fullfillment.log', true);
29
  $this->sendFulfillment($post_data_json);
30
 
31
+ if (DBGLOG) Mage::log("Fulfillmentobserver::exportFulfillment ending", null, 'fullfillment.log', true);
32
  }
33
  }
34
 
35
  public function initializeObjects($observer)
36
  {
37
+ if (DBGLOG) Mage::log("Fulfillmentobserver::initializeObjects getting the track", null, 'fullfillment.log', true);
38
  $this->track = $observer->getTrack();
39
 
40
+ if (DBGLOG) Mage::log("Fulfillmentobserver::initializeObjects getting the store", null, 'fullfillment.log', true);
41
  $this->store = $this->track->getStore();
42
 
43
+ if (DBGLOG) Mage::log("Fulfillmentobserver::initializeObjects getting shipment", null, 'fullfillment.log', true);
44
  $this->shipment = $this->track->getShipment();
45
 
46
+ if (DBGLOG) Mage::log("Fulfillmentobserver::initializeObjects getting order", null, 'fullfillment.log', true);
47
  $this->order = $this->shipment->getOrder();
48
 
49
+ if (DBGLOG) Mage::log("Fulfillmentobserver::initializeObjects getting carrier", null, 'fullfillment.log', true);
50
  $this->carrier = $this->order->getShippingCarrier();
51
 
52
+ if (DBGLOG) Mage::log("Fulfillmentobserver::initializeObjects getting the store id", null, 'fullfillment.log', true);
53
  $this->store_id = $this->store->getConfig('general/store_information/enter_store_id');
54
 
55
+ if (DBGLOG) Mage::log("Fulfillmentobserver::exportFulfillment getting the token", null, 'fullfillment.log', true);
56
  $this->accessToken = Mage::getStoreConfig('linc_access_key', $store_id);
57
  }
58
 
59
  public function sendFulfillment($postData)
60
  {
61
+ if (DBGLOG) Mage::log("Fulfillmentobserver::sendFulfillment started", null, 'fullfillment.log', true);
62
 
63
  if ($this->client == null)
64
  {
104
 
105
  public function connectToLincCare()
106
  {
107
+ if (DBGLOG) Mage::log("Fulfillmentobserver::connectToLincCare started", null, 'fullfillment.log', true);
108
 
109
  $this->client = new Zend_Http_Client();
110
  $protocol = SERVER_PROTOCOL;
125
 
126
  public function buildJson(Varien_Event_Observer $observer)
127
  {
128
+ if (DBGLOG) Mage::log("Fulfillmentobserver::buildJson started", null, 'fullfillment.log', true);
129
 
130
  $postdata = "";
131
  $CarrierCode = "";
143
  );
144
 
145
  $postdata = json_encode($dataorder);
146
+ if (DBGLOG) Mage::log($postdata, null, 'fullfillment.log', true);
147
 
148
+ if (DBGLOG) Mage::log("buildJson ended", null, 'fullfillment.log', true);
149
 
150
  return $postdata;
151
  }
app/code/community/Linc/Care/Model/Orderobserver.php CHANGED
@@ -48,7 +48,7 @@ class Linc_Care_Model_Orderobserver
48
  $this->client->setRawData($postData, 'application/json');
49
  $response = $this->client->request();
50
 
51
- if (DEBUG) {
52
  $temp = $response->getStatus();
53
  Mage::log("Linc_Care HTTP Status $temp", null, 'order.log', true);
54
  }
@@ -56,7 +56,7 @@ class Linc_Care_Model_Orderobserver
56
  if ($response->getStatus() == 201)
57
  {
58
  $temp = $response->getBody();
59
- if (DEBUG) Mage::log("Linc_Care $temp", null, 'order.log', true);
60
  }
61
  else
62
  {
@@ -87,22 +87,22 @@ class Linc_Care_Model_Orderobserver
87
 
88
  public function buildJson(Varien_Event_Observer $observer)
89
  {
90
- if (DEBUG) Mage::log("exportOrder started", null, 'order.log', true);
91
 
92
  $order = $observer->getEvent()->getOrder();
93
- if (DEBUG) Mage::log("exportOrder Got order", null, 'order.log', true);
94
  $orderdata = $order->getData();
95
- if (DEBUG) Mage::log("exportOrder Got data", null, 'order.log', true);
96
 
97
  $b_addr = $order->getBillingAddress();
98
- if (DEBUG)
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 (DEBUG && $s_addr != null)
106
  {
107
  $temp = json_encode($s_addr->getData());
108
  Mage::log("exportOrder got shipping address $temp", null, 'order.log', true);
@@ -114,10 +114,10 @@ class Linc_Care_Model_Orderobserver
114
  }
115
 
116
  $phone = $b_addr->getTelephone();
117
- if (DEBUG) Mage::log("exportOrder got phone $phone", null, 'order.log', true);
118
 
119
  $items = $order->getItemsCollection();
120
- if (DEBUG) Mage::log("exportOrder got item collection", null, 'order.log', true);
121
 
122
  $dataitems = array();
123
  foreach ($items as $item)
@@ -133,7 +133,7 @@ class Linc_Care_Model_Orderobserver
133
  'price' => $item->getPrice(),
134
  'weight' => $item->getWeight());
135
 
136
- #if (DEBUG)
137
  {
138
  $temp = json_encode($dataitem);
139
  Mage::log("exportOrder built an item $temp", null, 'order.log', true);
@@ -143,7 +143,7 @@ class Linc_Care_Model_Orderobserver
143
  }
144
  }
145
 
146
- if (DEBUG) Mage::log("exportOrder built items", null, 'order.log', true);
147
 
148
  $user = array (
149
  'user_id' => $order->getCustomerId(),
@@ -152,7 +152,7 @@ class Linc_Care_Model_Orderobserver
152
  'email' => $order->getCustomerEmail(),
153
  'phone' => $phone);
154
 
155
- if (DEBUG)
156
  {
157
  $temp = json_encode($user);
158
  Mage::log("exportOrder built user $temp", null, 'order.log', true);
@@ -168,7 +168,7 @@ class Linc_Care_Model_Orderobserver
168
  'country' => $country->getName(),
169
  'zip' => $b_addr->getPostcode());
170
 
171
- if (DEBUG)
172
  {
173
  $temp = json_encode($addrB);
174
  Mage::log("exportOrder built billing address $temp", null, 'order.log', true);
@@ -184,7 +184,7 @@ class Linc_Care_Model_Orderobserver
184
  'country' => $country->getName(),
185
  'zip' => $s_addr->getPostcode());
186
 
187
- if (DEBUG)
188
  {
189
  $temp = json_encode($addrS);
190
  Mage::log("exportOrder built shipping address $temp", null, 'order.log', true);
@@ -201,9 +201,9 @@ class Linc_Care_Model_Orderobserver
201
  'products' => $dataitems);
202
 
203
  $postdata = json_encode($dataorder);
204
- if (DEBUG) Mage::log($postdata, null, 'order.log', true);
205
 
206
- if (DEBUG) Mage::log("exportOrder ended", null, 'order.log', true);
207
 
208
  return $postdata;
209
  }
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
  }
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
  {
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);
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)
133
  'price' => $item->getPrice(),
134
  'weight' => $item->getWeight());
135
 
136
+ #if (DBGLOG)
137
  {
138
  $temp = json_encode($dataitem);
139
  Mage::log("exportOrder built an item $temp", null, 'order.log', true);
143
  }
144
  }
145
 
146
+ if (DBGLOG) Mage::log("exportOrder built items", null, 'order.log', true);
147
 
148
  $user = array (
149
  'user_id' => $order->getCustomerId(),
152
  'email' => $order->getCustomerEmail(),
153
  'phone' => $phone);
154
 
155
+ if (DBGLOG)
156
  {
157
  $temp = json_encode($user);
158
  Mage::log("exportOrder built user $temp", null, 'order.log', true);
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);
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);
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
  }
app/code/community/Linc/Care/Model/Resource/Setup.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once "Linc/Care/common.php";
3
+
4
+ class Linc_Care_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
5
+ {
6
+ }
7
+
8
+ ?>
app/code/community/Linc/Care/common.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define('DEBUG', false);
3
- define('SERVER_PROTOCOL', 'https');
4
- define('SERVER_PATH', 'letslinc.com');
5
  ?>
1
  <?php
2
+ define('DBGLOG', true);
3
+ define('SERVER_PROTOCOL', 'http');
4
+ define('SERVER_PATH', 'localhost:8000');
5
  ?>
app/code/community/Linc/Care/controllers/CareController.php CHANGED
@@ -8,7 +8,7 @@ class Linc_Care_CareController extends Mage_Adminhtml_Controller_Action
8
 
9
  public function registerAction()
10
  {
11
- if (DEBUG) Mage::log("Care::registerAction called", null, 'register.log', true);
12
 
13
  $url = $this->getRequest()->getParam('url');
14
  $email = $this->getRequest()->getParam('email');
@@ -28,8 +28,10 @@ class Linc_Care_CareController extends Mage_Adminhtml_Controller_Action
28
  ->setPackageName((string)Mage::getConfig()->getNode('stores/admin/design/package/name'))
29
  ->setTheme((string)Mage::getConfig()->getNode('stores/admin/design/theme/default'))
30
  ;
31
- foreach (array('layout', 'template', 'skin', 'locale') as $type) {
32
- if ($value = (string)Mage::getConfig()->getNode("stores/admin/design/theme/{$type}")) {
 
 
33
  Mage::getDesign()->setTheme($type, $value);
34
  }
35
  }
@@ -41,25 +43,33 @@ class Linc_Care_CareController extends Mage_Adminhtml_Controller_Action
41
  Mage::dispatchEvent('adminhtml_controller_action_predispatch_start', array());
42
  parent::preDispatch();
43
  $_keyErrorMsg = '';
44
- if (Mage::getSingleton('admin/session')->isLoggedIn()) {
45
- if ($this->getRequest()->isPost()) {
 
 
46
  $_isValidFormKey = $this->_validateFormKey();
47
  $_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Form Key. Please refresh the page.');
48
- } elseif (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
 
 
49
  $_isValidSecretKey = $this->_validateSecretKey();
50
  $_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Secret Key. Please refresh the page.');
51
  }
52
  }
53
  */
54
- if (!$_isValidFormKey || !$_isValidSecretKey) {
 
55
  $this->setFlag('', self::FLAG_NO_DISPATCH, true);
56
  $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true);
57
- if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false)) {
 
58
  $this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array(
59
  'error' => true,
60
  'message' => $_keyErrorMsg
61
  )));
62
- } else {
 
 
63
  $this->_redirect( Mage::getSingleton('admin/session')->getUser()->getStartupPageUrl() );
64
  }
65
  return $this;
@@ -67,7 +77,8 @@ class Linc_Care_CareController extends Mage_Adminhtml_Controller_Action
67
 
68
  if ($this->getRequest()->isDispatched()
69
  && $this->getRequest()->getActionName() !== 'denied'
70
- && !$this->_isAllowed()) {
 
71
  $this->_forward('denied');
72
  $this->setFlag('', self::FLAG_NO_DISPATCH, true);
73
  return $this;
@@ -76,12 +87,14 @@ class Linc_Care_CareController extends Mage_Adminhtml_Controller_Action
76
  if (!$this->getFlag('', self::FLAG_IS_URLS_CHECKED)
77
  && !$this->getRequest()->getParam('forwarded')
78
  && !$this->_getSession()->getIsUrlNotice(true)
79
- && !Mage::getConfig()->getNode('global/can_use_base_url')) {
 
80
  //$this->_checkUrlSettings();
81
  $this->setFlag('', self::FLAG_IS_URLS_CHECKED, true);
82
  }
83
 
84
- if (is_null(Mage::getSingleton('adminhtml/session')->getLocale())) {
 
85
  Mage::getSingleton('adminhtml/session')->setLocale(Mage::app()->getLocale()->getLocaleCode());
86
  }
87
 
@@ -139,7 +152,7 @@ class Linc_Care_CareController extends Mage_Adminhtml_Controller_Action
139
  $temp = $response->getStatus();
140
  $this->getResponse()->setHeader('HTTP/1.1', $temp);
141
 
142
- if (DEBUG)
143
  {
144
  Mage::log("Care::register HTTP Status $temp", null, 'register.log', true);
145
  }
@@ -147,7 +160,7 @@ class Linc_Care_CareController extends Mage_Adminhtml_Controller_Action
147
  if ($temp < 400)
148
  {
149
  $temp = $response->getBody();
150
- if (DEBUG) Mage::log("Care::register $temp", null, 'register.log', true);
151
 
152
  $array = Mage::helper('core')->jsonDecode($temp);
153
 
@@ -210,8 +223,8 @@ class Linc_Care_CareController extends Mage_Adminhtml_Controller_Action
210
 
211
  $postdata = json_encode($dataorder);
212
 
213
- if (DEBUG) Mage::log("Care::register buildJson ended", null, 'register.log', true);
214
- if (DEBUG) Mage::log($postdata, null, 'register.log', true);
215
 
216
  return $postdata;
217
  }
8
 
9
  public function registerAction()
10
  {
11
+ if (DBGLOG) Mage::log("Care::registerAction called", null, 'register.log', true);
12
 
13
  $url = $this->getRequest()->getParam('url');
14
  $email = $this->getRequest()->getParam('email');
28
  ->setPackageName((string)Mage::getConfig()->getNode('stores/admin/design/package/name'))
29
  ->setTheme((string)Mage::getConfig()->getNode('stores/admin/design/theme/default'))
30
  ;
31
+ foreach (array('layout', 'template', 'skin', 'locale') as $type)
32
+ {
33
+ if ($value = (string)Mage::getConfig()->getNode("stores/admin/design/theme/{$type}"))
34
+ {
35
  Mage::getDesign()->setTheme($type, $value);
36
  }
37
  }
43
  Mage::dispatchEvent('adminhtml_controller_action_predispatch_start', array());
44
  parent::preDispatch();
45
  $_keyErrorMsg = '';
46
+ if (Mage::getSingleton('admin/session')->isLoggedIn())
47
+ {
48
+ if ($this->getRequest()->isPost())
49
+ {
50
  $_isValidFormKey = $this->_validateFormKey();
51
  $_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Form Key. Please refresh the page.');
52
+ }
53
+ elseif (Mage::getSingleton('adminhtml/url')->useSecretKey())
54
+ {
55
  $_isValidSecretKey = $this->_validateSecretKey();
56
  $_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Secret Key. Please refresh the page.');
57
  }
58
  }
59
  */
60
+ if (!$_isValidFormKey || !$_isValidSecretKey)
61
+ {
62
  $this->setFlag('', self::FLAG_NO_DISPATCH, true);
63
  $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true);
64
+ if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false))
65
+ {
66
  $this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array(
67
  'error' => true,
68
  'message' => $_keyErrorMsg
69
  )));
70
+ }
71
+ else
72
+ {
73
  $this->_redirect( Mage::getSingleton('admin/session')->getUser()->getStartupPageUrl() );
74
  }
75
  return $this;
77
 
78
  if ($this->getRequest()->isDispatched()
79
  && $this->getRequest()->getActionName() !== 'denied'
80
+ && !$this->_isAllowed())
81
+ {
82
  $this->_forward('denied');
83
  $this->setFlag('', self::FLAG_NO_DISPATCH, true);
84
  return $this;
87
  if (!$this->getFlag('', self::FLAG_IS_URLS_CHECKED)
88
  && !$this->getRequest()->getParam('forwarded')
89
  && !$this->_getSession()->getIsUrlNotice(true)
90
+ && !Mage::getConfig()->getNode('global/can_use_base_url'))
91
+ {
92
  //$this->_checkUrlSettings();
93
  $this->setFlag('', self::FLAG_IS_URLS_CHECKED, true);
94
  }
95
 
96
+ if (is_null(Mage::getSingleton('adminhtml/session')->getLocale()))
97
+ {
98
  Mage::getSingleton('adminhtml/session')->setLocale(Mage::app()->getLocale()->getLocaleCode());
99
  }
100
 
152
  $temp = $response->getStatus();
153
  $this->getResponse()->setHeader('HTTP/1.1', $temp);
154
 
155
+ if (DBGLOG)
156
  {
157
  Mage::log("Care::register HTTP Status $temp", null, 'register.log', true);
158
  }
160
  if ($temp < 400)
161
  {
162
  $temp = $response->getBody();
163
+ if (DBGLOG) Mage::log("Care::register $temp", null, 'register.log', true);
164
 
165
  $array = Mage::helper('core')->jsonDecode($temp);
166
 
223
 
224
  $postdata = json_encode($dataorder);
225
 
226
+ if (DBGLOG) Mage::log("Care::register buildJson ended", null, 'register.log', true);
227
+ if (DBGLOG) Mage::log($postdata, null, 'register.log', true);
228
 
229
  return $postdata;
230
  }
app/code/community/Linc/Care/controllers/CareController.php~ DELETED
@@ -1,213 +0,0 @@
1
- <?php
2
- require_once "Linc/Care/common.php";
3
-
4
- class Linc_Care_CareController extends Mage_Adminhtml_Controller_Action
5
- {
6
- public $client = null;
7
- public $queue = null;
8
-
9
- public function registerAction()
10
- {
11
- if (DEBUG) Mage::log("Care::registerAction called", null, 'register.log', true);
12
-
13
- $url = $this->getRequest()->getParam('url');
14
- $email = $this->getRequest()->getParam('email');
15
- $password = $this->getRequest()->getParam('password');
16
- $confirm = $this->getRequest()->getParam('confirm');
17
- $ecommerce = $this->getRequest()->getParam('ecommerce');
18
-
19
- $post_data_json = $this->buildJson($url, $email, $password, $confirm, $ecommerce);
20
- $this->sendRegister($post_data_json);
21
- }
22
-
23
- public function preDispatch()
24
- {
25
- // override admin store design settings via stores section
26
- Mage::getDesign()
27
- ->setArea($this->_currentArea)
28
- ->setPackageName((string)Mage::getConfig()->getNode('stores/admin/design/package/name'))
29
- ->setTheme((string)Mage::getConfig()->getNode('stores/admin/design/theme/default'))
30
- ;
31
- foreach (array('layout', 'template', 'skin', 'locale') as $type) {
32
- if ($value = (string)Mage::getConfig()->getNode("stores/admin/design/theme/{$type}")) {
33
- Mage::getDesign()->setTheme($type, $value);
34
- }
35
- }
36
-
37
- $this->getLayout()->setArea($this->_currentArea);
38
- $_isValidFormKey = true;
39
- $_isValidSecretKey = true;
40
- /*
41
- Mage::dispatchEvent('adminhtml_controller_action_predispatch_start', array());
42
- parent::preDispatch();
43
- $_keyErrorMsg = '';
44
- if (Mage::getSingleton('admin/session')->isLoggedIn()) {
45
- if ($this->getRequest()->isPost()) {
46
- $_isValidFormKey = $this->_validateFormKey();
47
- $_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Form Key. Please refresh the page.');
48
- } elseif (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
49
- $_isValidSecretKey = $this->_validateSecretKey();
50
- $_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Secret Key. Please refresh the page.');
51
- }
52
- }
53
- */
54
- if (!$_isValidFormKey || !$_isValidSecretKey) {
55
- $this->setFlag('', self::FLAG_NO_DISPATCH, true);
56
- $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true);
57
- if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false)) {
58
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array(
59
- 'error' => true,
60
- 'message' => $_keyErrorMsg
61
- )));
62
- } else {
63
- $this->_redirect( Mage::getSingleton('admin/session')->getUser()->getStartupPageUrl() );
64
- }
65
- return $this;
66
- }
67
-
68
- if ($this->getRequest()->isDispatched()
69
- && $this->getRequest()->getActionName() !== 'denied'
70
- && !$this->_isAllowed()) {
71
- $this->_forward('denied');
72
- $this->setFlag('', self::FLAG_NO_DISPATCH, true);
73
- return $this;
74
- }
75
-
76
- if (!$this->getFlag('', self::FLAG_IS_URLS_CHECKED)
77
- && !$this->getRequest()->getParam('forwarded')
78
- && !$this->_getSession()->getIsUrlNotice(true)
79
- && !Mage::getConfig()->getNode('global/can_use_base_url')) {
80
- //$this->_checkUrlSettings();
81
- $this->setFlag('', self::FLAG_IS_URLS_CHECKED, true);
82
- }
83
-
84
- if (is_null(Mage::getSingleton('adminhtml/session')->getLocale())) {
85
- Mage::getSingleton('adminhtml/session')->setLocale(Mage::app()->getLocale()->getLocaleCode());
86
- }
87
-
88
- return $this;
89
- }
90
-
91
-
92
- public function sendRegister($postData)
93
- {
94
- if ($this->client == null)
95
- {
96
- $this->connectToLincCare();
97
- if ($this->client != null && $this->queue != null)
98
- {
99
- $sendQueue = $this->queue;
100
- unset($this->queue);
101
-
102
- foreach ($sendQueue as $data)
103
- {
104
- sendRegister($data);
105
- }
106
- }
107
- else
108
- {
109
- if ($this->queue == null)
110
- {
111
- $this->queue = array();
112
- }
113
-
114
- array_push($this->queue, $postData);
115
- }
116
- }
117
-
118
- if ($this->client != null)
119
- {
120
- # get store_id
121
- $resource = Mage::getSingleton('core/resource');
122
- $read = $resource->getConnection('core_read');
123
- $configDataTable = $read->getTableName('core_config_data');
124
-
125
- $store_id = '0';
126
- $select = $read->select()
127
- ->from(array('cd'=>$configDataTable))
128
- ->where("cd.path=?", 'linc_current_store');
129
- $rows = $read->fetchAll($select);
130
-
131
- if (count($rows) > 0)
132
- {
133
- $store_id = $rows[0]['value'];
134
- }
135
-
136
- $this->client->setRawData($postData, 'application/json');
137
- $response = $this->client->request();
138
-
139
- $temp = $response->getStatus();
140
- $this->getResponse()->setHeader('HTTP/1.1', $temp);
141
-
142
- if (DEBUG)
143
- {
144
- Mage::log("Care::register HTTP Status $temp", null, 'register.log', true);
145
- }
146
-
147
- if ($temp < 400)
148
- {
149
- $temp = $response->getBody();
150
- #if (DEBUG)
151
- Mage::log("Care::register $temp", null, 'register.log', true);
152
-
153
- $array = Mage::helper('core')->jsonDecode($temp);
154
-
155
- # write values into core_config_data
156
- Mage::getConfig()->saveConfig('linc_url', $array['url'], 'store', $store_id);
157
- Mage::getConfig()->saveConfig('linc_email', $array['email'], 'store', $store_id);
158
- Mage::getConfig()->saveConfig('linc_password', $array['password'], 'store', $store_id);
159
- Mage::getConfig()->saveConfig('linc_confirm', $array['confirm'], 'store', $store_id);
160
- Mage::getConfig()->saveConfig('linc_shop_id', $array['store_id'], 'store', $store_id);
161
- Mage::getConfig()->saveConfig('linc_access_key', $array['access_key'], 'store', $store_id);
162
-
163
- $this->getResponse()->setHeader('Content-type', 'application/json', true);
164
- $this->getResponse()->setBody($temp);
165
- }
166
- else
167
- {
168
- $temp = $response->getBody();
169
- preg_match('/<pre class="exception_value">(.*?)<\/pre>/', $temp, $m);
170
-
171
- $this->getResponse()->setBody($m[1]);
172
- }
173
- }
174
- }
175
-
176
- public function connectToLincCare()
177
- {
178
- $this->client = new Zend_Http_Client();
179
- $protocol = SERVER_PROTOCOL;
180
- $url = SERVER_PATH;
181
- $this->client->setUri("$protocol://pub-api.$url/v1/register");
182
-
183
- $this->client->setConfig(array(
184
- 'maxredirects' => 0,
185
- 'timeout' => 30,
186
- 'keepalive' => true,
187
- 'adapter' => 'Zend_Http_Client_Adapter_Socket'));
188
-
189
- $this->client->setMethod(Zend_Http_Client::POST);
190
- $this->client->setHeaders(array(
191
- 'Content-Type' => 'application/json'));
192
- }
193
-
194
- public function buildJson($url, $email, $password, $confirm, $ecommerce)
195
- {
196
- $dataorder = array(
197
- 'email' => $email,
198
- 'password' => $password,
199
- 'url' => $url,
200
- 'confirm' => $confirm,
201
- 'ecommerce' => $ecommerce
202
- );
203
-
204
- $postdata = json_encode($dataorder);
205
-
206
- if (DEBUG) Mage::log("Care::register buildJson ended", null, 'register.log', true);
207
- if (DEBUG) Mage::log($postdata, null, 'register.log', true);
208
-
209
- return $postdata;
210
- }
211
- }
212
-
213
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Linc/Care/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Linc_Care>
13
- <version>1.1.1</version>
14
  </Linc_Care>
15
  </modules>
16
  <admin>
@@ -60,6 +60,14 @@
60
  <class>Linc_Care_Helper</class>
61
  </care>
62
  </helpers>
 
 
 
 
 
 
 
 
63
  </global>
64
  <adminhtml>
65
  <acl>
10
  <config>
11
  <modules>
12
  <Linc_Care>
13
+ <version>1.1.3</version>
14
  </Linc_Care>
15
  </modules>
16
  <admin>
60
  <class>Linc_Care_Helper</class>
61
  </care>
62
  </helpers>
63
+ <resources>
64
+ <linc_setup>
65
+ <setup>
66
+ <module>Linc_Care</module>
67
+ <class>Linc_Care_Model_Resource_Setup</class>
68
+ </setup>
69
+ </linc_setup>
70
+ </resources>
71
  </global>
72
  <adminhtml>
73
  <acl>
app/code/community/Linc/Care/etc/config.xml~ DELETED
@@ -1,83 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Module configuration
5
- *
6
- * @author Rick Murtagh, Linc Global, Inc.
7
- *
8
- */
9
- -->
10
- <config>
11
- <modules>
12
- <Linc_Care>
13
- <version>1.1.1</version>
14
- </Linc_Care>
15
- </modules>
16
- <admin>
17
- <routers>
18
- <care>
19
- <use>admin</use>
20
- <args>
21
- <module>Linc_Care</module>
22
- <frontName>linccare</frontName>
23
- </args>
24
- </care>
25
- </routers>
26
- </admin>
27
- <global>
28
- <models>
29
- <care>
30
- <class>Linc_Care_Model</class>
31
- </care>
32
- </models>
33
- <blocks>
34
- <care>
35
- <class>Linc_Care_Block</class>
36
- </care>
37
- </blocks>
38
- <events>
39
- <sales_order_place_after>
40
- <observers>
41
- <linc_care>
42
- <class>care/orderobserver</class>
43
- <method>exportOrder</method>
44
- <type>singleton</type>
45
- </linc_care>
46
- </observers>
47
- </sales_order_place_after>
48
- <sales_order_shipment_track_save_after>
49
- <observers>
50
- <linc_care>
51
- <class>care/fulfillmentobserver</class>
52
- <method>exportFulfillment</method>
53
- <type>singleton</type>
54
- </linc_care>
55
- </observers>
56
- </sales_order_shipment_track_save_after>
57
- </events>
58
- <helpers>
59
- <care>
60
- <class>Linc_Care_Helper</class>
61
- </care>
62
- </helpers>
63
- </global>
64
- <acl>
65
- <resources>
66
- <admin>
67
- <children>
68
- <system>
69
- <children>
70
- <config>
71
- <children>
72
- <linccaresection translate="title" module="linc_care">
73
- <title>Store Linc Care Module Section</title>
74
- </linccaresection>
75
- </children>
76
- </config>
77
- </children>
78
- </system>
79
- </children>
80
- </admin>
81
- </resources>
82
- </acl>
83
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Linc/Care/etc/system.xml~ DELETED
@@ -1,89 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <config>
3
- <tabs>
4
- <linccaretab translate="label" module="linc_care">
5
- <label>Linc Care</label>
6
- <sort_order>100</sort_order>
7
- </linccaretab>
8
- </tabs>
9
- <sections>
10
- <linccaresection translate="label" module="linc_care">
11
- <label>General</label>
12
- <tab>linccaretab</tab>
13
- <frontend_type>text</frontend_type>
14
- <sort_order>1000</sort_order>
15
- <show_in_default>1</show_in_default>
16
- <show_in_website>1</show_in_website>
17
- <show_in_store>1</show_in_store>
18
- <groups>
19
- <linccaregroup translate="label">
20
- <label>General</label>
21
- <frontend_type>text</frontend_type>
22
- <sort_order>3</sort_order>
23
- <show_in_default>1</show_in_default>
24
- <show_in_website>1</show_in_website>
25
- <show_in_store>1</show_in_store>
26
- <expanded>1</expanded>
27
- <fields>
28
- <message translate="label">
29
- <sort_order>200</sort_order>
30
- <frontend_type>label</frontend_type>
31
- <frontend_model>care/note</frontend_model>
32
- <show_in_default>1</show_in_default>
33
- <show_in_website>1</show_in_website>
34
- <show_in_store>0</show_in_store>
35
- </message>
36
- <url translate="label">
37
- <sort_order>201</sort_order>
38
- <label for="Url" class="required">Enter your store URL</label>
39
- <frontend_type>label</frontend_type>
40
- <frontend_model>care/url</frontend_model>
41
- <validate>required-entry validate-url</validate>
42
- <show_in_store>1</show_in_store>
43
- </url>
44
- <email translate="label">
45
- <sort_order>202</sort_order>
46
- <label for="Email" class="required">Enter your administrator email address</label>
47
- <frontend_type>label</frontend_type>
48
- <frontend_model>care/email</frontend_model>
49
- <validate>required-entry validate-email</validate>
50
- <show_in_store>1</show_in_store>
51
- </email>
52
- <password translate="label">
53
- <sort_order>203</sort_order>
54
- <label for="Password" class="required">Enter a password</label>
55
- <frontend_type>label</frontend_type>
56
- <frontend_model>care/pwd</frontend_model>
57
- <validate>required-entry validate-password</validate>
58
- <show_in_store>1</show_in_store>
59
- </password>
60
- <confirm translate="label">
61
- <sort_order>204</sort_order>
62
- <label for="Confirm Password" class="required">Enter a password</label>
63
- <frontend_type>label</frontend_type>
64
- <frontend_model>care/confirm</frontend_model>
65
- <show_in_store>1</show_in_store>
66
- <validate>required-entry validate-cpassword</validate>
67
- </confirm>
68
- <linktolinccare translate="label">
69
- <sort_order>205</sort_order>
70
- <label>Fill out the fields above and click to register</label>
71
- <frontend_type>button</frontend_type>
72
- <frontend_model>care/adminhtml_system_config_form_register</frontend_model>
73
- <show_in_store>1</show_in_store>
74
- </linktolinccare>
75
- <linktoinfo translate="label">
76
- <sort_order>206</sort_order>
77
- <label>Learn more...</label>
78
- <frontend_type>button</frontend_type>
79
- <frontend_model>care/faqbutton</frontend_model>
80
- <show_in_default>1</show_in_default>
81
- <show_in_website>1</show_in_website>
82
- <show_in_store>1</show_in_store>
83
- </linktoinfo>
84
- </fields>
85
- </linccaregroup>
86
- </groups>
87
- </linccaresection>
88
- </sections>
89
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Linc/Care/readme CHANGED
@@ -11,10 +11,10 @@ For those of you installing manually:
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='linccare/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='linccare/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
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
app/code/community/Linc/Care/sql/linc_setup/mysql4-install-1.1.2.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once "Linc/Care/common.php";
3
+
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(
13
+ 'maxredirects' => 0,
14
+ 'timeout' => 30,
15
+ 'keepalive' => true,
16
+ 'adapter' => 'Zend_Http_Client_Adapter_Socket'));
17
+
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
+ # get store_id
26
+ $store_id = '1';
27
+ $select = $read->select()
28
+ ->from(array('cd'=>$configDataTable))
29
+ ->where("cd.path=?", 'linc_current_store');
30
+ $rows = $read->fetchAll($select);
31
+
32
+ if (count($rows) > 0)
33
+ {
34
+ $store_id = $rows[0]['value'];
35
+ }
36
+
37
+ # get shop_id
38
+ $shop_id = '';
39
+ $select = $read->select()
40
+ ->from(array('cd'=>$configDataTable))
41
+ ->where('cd.scope=?', 'store')
42
+ ->where("cd.scope_id=?", $store_id)
43
+ ->where("cd.path=?", 'linc_shop_id');
44
+ $rows = $read->fetchAll($select);
45
+
46
+ if (count($rows) > 0)
47
+ {
48
+ $shop_id = $rows[0]['value'];
49
+ }
50
+
51
+ $dataorder = array(
52
+ 'ecommerce' => 'magento',
53
+ 'product' => 'Linc Care Extension',
54
+ 'version' => (string) Mage::getConfig()->getNode()->modules->Linc_Care->version,
55
+ 'public_id' => shop_id,
56
+ 'store_name' => Mage::app()->getStore()->getName(),
57
+ 'general_name' => Mage::getStoreConfig('trans_email/ident_general/name'),
58
+ 'general_email' => Mage::getStoreConfig('trans_email/ident_general/email'),
59
+ 'sales_name' => Mage::getStoreConfig('trans_email/ident_sales/name'),
60
+ 'sales_email' => Mage::getStoreConfig('trans_email/ident_sales/email'),
61
+ 'support_name' => Mage::getStoreConfig('trans_email/ident_support/name'),
62
+ 'support_email' => Mage::getStoreConfig('trans_email/ident_support/email'),
63
+ 'url' => Mage::app()->getStore()->getHomeUrl(),
64
+ 'phone' => age::getStoreConfig('general/store_information/phone'));
65
+
66
+ $postdata = json_encode($dataorder);
67
+ $client->setRawData($postData, 'application/json');
68
+ $response = $this->client->request();
69
+
70
+ $installer->endSetup();
71
+ ?>
app/design/adminhtml/default/default/template/care/system/config/register.phtml CHANGED
@@ -6,12 +6,10 @@
6
  //<![CDATA[
7
  function register()
8
  {
9
- // alert('Register called');
10
  var configForm = $('config_edit_form');
11
  var validator = new Validation(configForm);
12
  if (validator.validate())
13
  {
14
- // alert('Validate succeeded');
15
  var url = document.getElementById('linccaresection_linccaregroup_url').value;
16
  var email = document.getElementById('linccaresection_linccaregroup_email').value;
17
  var pw = document.getElementById('linccaresection_linccaregroup_password').value;
@@ -29,14 +27,12 @@
29
  },
30
  onSuccess: function(transport)
31
  {
32
- //alert('Success - ' + transport.responseText);
33
  var linc_url = '<?php echo $this->getMerchantOnboardUrl() ?>' +
34
  "?ecommerce=" + transport.responseJSON.ecommerce +
35
  "&shop_id=" + transport.responseJSON.store_id +
36
  "&url=" + transport.responseJSON.url +
37
  "&email=" + transport.responseJSON.email;
38
 
39
- //alert('OnSuccess - ' + linc_url);
40
  popWin(linc_url, '_blank');
41
  location.reload();
42
  }.bind(this),
@@ -44,16 +40,8 @@
44
  {
45
  alert(transport.responseText);
46
  }.bind(this),
47
- // onComplete: function(transport)
48
- // {
49
- // alert('Complete - ' + transport.responseText);
50
- // }.bind(this),
51
  });
52
  }
53
- // else
54
- // {
55
- // alert('Validate failed.');
56
- // }
57
  }
58
  //]]>
59
  </script>
6
  //<![CDATA[
7
  function register()
8
  {
 
9
  var configForm = $('config_edit_form');
10
  var validator = new Validation(configForm);
11
  if (validator.validate())
12
  {
 
13
  var url = document.getElementById('linccaresection_linccaregroup_url').value;
14
  var email = document.getElementById('linccaresection_linccaregroup_email').value;
15
  var pw = document.getElementById('linccaresection_linccaregroup_password').value;
27
  },
28
  onSuccess: function(transport)
29
  {
 
30
  var linc_url = '<?php echo $this->getMerchantOnboardUrl() ?>' +
31
  "?ecommerce=" + transport.responseJSON.ecommerce +
32
  "&shop_id=" + transport.responseJSON.store_id +
33
  "&url=" + transport.responseJSON.url +
34
  "&email=" + transport.responseJSON.email;
35
 
 
36
  popWin(linc_url, '_blank');
37
  location.reload();
38
  }.bind(this),
40
  {
41
  alert(transport.responseText);
42
  }.bind(this),
 
 
 
 
43
  });
44
  }
 
 
 
 
45
  }
46
  //]]>
47
  </script>
app/etc/modules/Linc_Care.xml CHANGED
@@ -9,8 +9,8 @@
9
  *
10
  * @category Linc
11
  * @package Linc_Care
12
- * @copyright Copyright (c) 2014 Linc Global, Inc. (http://www.letslinc.com)
13
- * @license http://www.letslinc.com/legal/LincCareLicenseAgreement/ Linc Global Commecial Licence
14
  */
15
  -->
16
  <config>
9
  *
10
  * @category Linc
11
  * @package Linc_Care
12
+ * @copyright Copyright (c) 2014-2015 Linc Global, Inc. (http://www.letslinc.com)
13
+ * @license http://www.letslinc.com/legal/linccarelicenseagreement Linc Global Commecial Licence
14
  */
15
  -->
16
  <config>
package.xml CHANGED
@@ -1,9 +1,9 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Linc_Care</name>
4
- <version>1.1.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>
@@ -38,26 +38,24 @@ Here is one possible process for installing our extension.&#xD;
38
  &#xD;
39
  For those of you installing manually:&#xD;
40
  1. Go to System / Magento Connect / Magento Connect Manager&#xD;
41
- 2. If you're installing via the Magento Connect website, follow the normal procedure then skip to step 5&#xD;
42
- 3. If you're installing manually, download the package from http://care.letslinc.com/downloads/Linc_Care-1.1.2.tgz&#xD;
43
- 4. Click the Browse button and select the file you just downloaded, the click the Upload button.&#xD;
44
- 5. Go to System/Configuration/Linc Care/General&#xD;
45
- 6. Enter the store's url and admin email along with a password, then click register.&#xD;
46
- 7. When the Linc Care Merchant portal is launched, fill in the requested information.&#xD;
47
- 8. Go to System/Transactional Email&#xD;
48
- 9. If you have a have custom emails already, edit it and insert {{block type='linccare/widget' order=$order}} where you want the Linc Care widget to appear. Then save the template and skip to step 11&#xD;
49
- 10. If not Click the Add New Template button.&#xD;
50
- 11. On the next page select New Order from the Template dropdown and click the Load Template button&#xD;
51
- 12. Name the new template and insert {{block type='linccare/widget' order=$order}} where you want the Linc Care widget to appear. Then save the template.&#xD;
52
- 13. Repeat for any other order-based emails you want connected to Linc Care. We suggest New Order Guest&#xD;
53
- 14. Go to System / Sales / Sales Email / Order and select the new templates for New Order Confirmation Email&#xD;
54
- 15. Save the configuration&#xD;
55
  &#xD;
56
- If you have any comments or questions, please email us at linc-care-issues-magento@letslinc.com</notes>
57
  <authors><author><name>Linc Care</name><user>letslincapp</user><email>apps@letslinc.com</email></author></authors>
58
- <date>2014-11-18</date>
59
- <time>01:44:38</time>
60
- <contents><target name="mageetc"><dir name="modules"><file name="Linc_Care.xml" hash="f9738b6f4a087a40329f646a95afd4e7"/></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="cf5b1496e1f4d4fa111a3019e499fc16"/></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="3a0fd1cc64646c14eb5183a05523879e"/><file name="Widget.php" hash="022d5247786710a94d159773f485421f"/></dir><dir name="Helper"><file name="Data.php" hash="34aec0a0ed4d5a1652b46fb7fe54707d"/></dir><dir name="Model"><file name="Fulfillmentobserver.php" hash="eeca57985d47973dd0b1e3853960e72a"/><file name="Orderobserver.php" hash="a652ef5211ef38fdc2a413a543ef312d"/></dir><file name="common.php" hash="31f91dd2a7df5e436de0732a45d90d0b"/><dir name="controllers"><file name="CareController.php" hash="f776db586f41a51d640ed18cb00aec95"/><file name="CareController.php~" hash="90c332b395c8a585fb0434b84e2efce1"/></dir><dir name="etc"><file name="config.xml" hash="c8a37cba285ae751bbc6f78b7cee54eb"/><file name="config.xml~" hash="87d37abe79dc48827b800d03767f53f8"/><file name="system.xml" hash="95036d9df5911e0c0d2e6db996a4bbff"/><file name="system.xml~" hash="aa589277ea49b5dfefadbe6ff8121ae8"/></dir><file name="readme" hash="98490fe600e3d2b890a25746f17d5960"/></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="21bb40b68538eae06facc2c14e8183cc"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
61
  <compatible/>
62
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
63
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Linc_Care</name>
4
+ <version>1.1.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>
38
  &#xD;
39
  For those of you installing manually:&#xD;
40
  1. Go to System / Magento Connect / Magento Connect Manager&#xD;
41
+ 2. Follow the normal procedure for installing an extension&#xD;
42
+ 3. Go to System / Configuration / Linc Care / General&#xD;
43
+ 4. Enter the store's url and admin email along with a password, then click register.&#xD;
44
+ 5. When the Linc Care Merchant portal is launched, fill in the requested information.&#xD;
45
+ 6. Go to System / Transactional Email&#xD;
46
+ 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;
47
+ 8. If not Click the Add New Template button.&#xD;
48
+ 9. On the next page select New Order from the Template dropdown and click the Load Template button&#xD;
49
+ 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;
50
+ 11. Repeat for any other order-based emails you want connected to Linc Care. We suggest the New Order Guest template as well.&#xD;
51
+ 12. Go to System / Sales / Sales Email / Order and select the new templates for New Order Confirmation Email&#xD;
52
+ 13. Save the configuration&#xD;
 
 
53
  &#xD;
54
+ If you have any comments or questions, please email us at support-magento@letslinc.com</notes>
55
  <authors><author><name>Linc Care</name><user>letslincapp</user><email>apps@letslinc.com</email></author></authors>
56
+ <date>2015-01-27</date>
57
+ <time>21:58:14</time>
58
+ <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="d661f3c74984cd49999f20ae0ce93745"/></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="5ece46a209769fc75e64b3d64737c698"/></dir><dir name="Helper"><file name="Data.php" hash="34aec0a0ed4d5a1652b46fb7fe54707d"/></dir><dir name="Model"><file name="Fulfillmentobserver.php" hash="9873507cc5ddb9370f4ce5033cd43345"/><file name="Orderobserver.php" hash="7a80b9c07e1bd32e65e373e0a31db429"/><dir name="Resource"><file name="Setup.php" hash="7169ea333f6a42a0edc86effa4a11195"/></dir></dir><file name="common.php" hash="e8aff39650836495a8c3664b2276b497"/><dir name="controllers"><file name="CareController.php" hash="5c65bf047fcddc87ad7f3a2ebff0e924"/></dir><dir name="etc"><file name="config.xml" hash="d958e772d968f745d6263926d518d05e"/><file name="system.xml" hash="95036d9df5911e0c0d2e6db996a4bbff"/></dir><file name="readme" hash="01f2eed106a3cf9d67bb200665b22c48"/><dir name="sql"><dir name="linc_setup"><file name="mysql4-install-1.1.2.php" hash="d193b9c9648e4e5a56673d9cb1532589"/></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>
59
  <compatible/>
60
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
61
  </package>