Linc_Care - Version 1.0.4

Version Notes

Welcome to the Linc Care extension for Magento.

News


The latest release enhances the widget to display a dynamic status of the order. We've also added a Recommendations widget that can be added where ever you have an order object.>/p>

Install the extension as you would any other

Per Store Extension



The Linc Care extension has a "per store" store configuration. Each store has its own Store ID and Access Code. This means that, on the configuration page, you must select a store as your Current Configuration Scope


Configuration




  1. System / Configuration / General / Store Information
  2. Set the Configuration Scope to the store you want to configure.
    Fill in the store's ID and Access Key. If you don't have these already, click the Go to Linc Care and register the store.

  3. System / Transactional Email
  4. For any email that related to an order (i.e. New Order, New Order for Guest), edit it and insert {{block type='care/widget' order=$order}} where you want the Linc Care widget to appear.
  5. Click on Preview Template to confirm the appearance then save the template.
  6. Repeat for any other order-based emails you want connected to Linc Care.

  7. System / Sales / Sales Email / Order
  8. Select the new templates for appropriate email
  9. Save the configuration

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

Download this release

Release Info

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


Code changes from version 1.0.3 to 1.0.4

app/code/community/Linc/Care/Block/Button.php CHANGED
@@ -6,24 +6,28 @@ class Linc_Care_Block_Button extends Mage_Adminhtml_Block_System_Config_Form_Fie
6
  {
7
  $this->setElement($element);
8
 
9
- $sid = Mage::getStoreConfig('general/store_information/enter_store_id', Mage::app()->getStore());
10
- $url = "";
11
-
12
- if ($sid == NULL or $sid == "") {
13
- $url = "https://care.letslinc.com/merchants/register";
14
- }
15
- else {
16
- $url = "https://care.letslinc.com/merchants/";
 
 
17
  }
 
 
18
 
19
  Mage::log("Linc_Care button url $url", null, 'order.log', true);
20
 
21
- $html = $this->getLayout()->createBlock('adminhtml/widget_button')
22
- ->setType('button')
23
- ->setClass('scalable')
24
- ->setLabel('Go to Linc Care')
25
- ->setOnClick("setLocation('$url')")
26
- ->toHtml();
27
 
28
  return $html;
29
  }
6
  {
7
  $this->setElement($element);
8
 
9
+ /* This is necessary because the config data hasn't been loaded when this is run */
10
+ $resource = Mage::getSingleton('core/resource');
11
+ $read = $resource->getConnection('core_read');
12
+ $select = "SELECT value FROM `core_config_data` WHERE path = 'general/store_information/enter_store_id' LIMIT 1";
13
+ $sid = $read->fetchOne($select);
14
+
15
+ $url = "https://care.letslinc.com/merchants";
16
+ if ($sid == NULL or $sid == "")
17
+ {
18
+ $url .= "/register";
19
  }
20
+ $url .= "?magento_shop=" . Mage::helper('core')->escapeHtml(Mage::getBaseUrl('web'));
21
+ $url .= "&magento_email=" . Mage::helper('core')->escapeHtml(Mage::getStoreConfig('trans_email/ident_general/email'));
22
 
23
  Mage::log("Linc_Care button url $url", null, 'order.log', true);
24
 
25
+ $button = $this->getLayout()->createBlock('adminhtml/widget_button');
26
+ $button->setType('button');
27
+ $button->setClass('scalable');
28
+ $button->setLabel('Go to Linc Care');
29
+ $button->setOnClick("setLocation('$url')");
30
+ $html = $button->toHtml();
31
 
32
  return $html;
33
  }
app/code/community/Linc/Care/Block/Faqbutton.php CHANGED
@@ -6,7 +6,7 @@ class Linc_Care_Block_FAQButton extends Mage_Adminhtml_Block_System_Config_Form_
6
  {
7
  $this->setElement($element);
8
 
9
- $url = "http://www.letslinc.com/products/";
10
 
11
  $html = $this->getLayout()->createBlock('adminhtml/widget_button')
12
  ->setType('button')
6
  {
7
  $this->setElement($element);
8
 
9
+ $url = "http://www.letslinc.com/business/";
10
 
11
  $html = $this->getLayout()->createBlock('adminhtml/widget_button')
12
  ->setType('button')
app/code/community/Linc/Care/Block/Recommendations.php DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
-
3
- class Linc_Care_Block_Recommendations extends Mage_Core_Block_Abstract
4
- {
5
- public $storeId = null;
6
-
7
- protected function _toHtml()
8
- {
9
- $html = "";
10
- if ($this->storeId == null)
11
- {
12
- $this->storeId = Mage::getStoreConfig('general/store_information/enter_store_id');
13
- }
14
-
15
- if ($this->storeId != null)
16
- {
17
- $html = "<table border=0 cellspacing=0 cellpadding=20><tr>";
18
- $order = $this->getOrder();
19
- $items = $order->getItemsCollection();
20
-
21
- $query = "";
22
- $baseurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
23
- foreach ($items as $item)
24
- {
25
- $product = Mage::getModel('catalog/product')->load($item->getProduct()->getId());
26
- if ($product->isVisibleInSiteVisibility())
27
- {
28
- $imgurl = $baseurl.$product->getImage();
29
-
30
- if ($query != "")
31
- {
32
- $query .= "&";
33
- }
34
-
35
- $query .= "q=".$item->getQtyOrdered();
36
- $query .= "&p=".$product->getId();
37
- $query .= "&pp=".$item->getPrice();
38
- $query .= "&w=".$item->getWeight();
39
- $query .= "&i=".$imgurl;
40
- $query .= "&n=".$item->getName();
41
- }
42
- }
43
-
44
- $s_addr = $order->getShippingAddress();
45
- if ($s_addr == null)
46
- {
47
- /* use billing address for shipping address when the purchase is a download. */
48
- $s_addr = $order->getBillingAddress();
49
- }
50
-
51
- $query .= "&a1=".$s_addr->getStreet1();
52
- $query .= "&a2=".$s_addr->getStreet2();
53
- $query .= "&au=".$s_addr->getCountry();
54
- $query .= "&ac=".$s_addr->getCity();
55
- $query .= "&as=".$s_addr->getRegion();
56
- $query .= "&az=".$s_addr->getPostcode();
57
- $query .= "&fn=".$order->getCustomerFirstname();
58
- $query .= "&ln=".$order->getCustomerLastname();
59
- $query .= "&e=".$order->getCustomerEmail();
60
- $query .= "&e=".$order->getCustomerEmail();
61
- $query .= "&g=".$order->getGrandTotal();
62
- $query .= "&o=".$order->getIncrementId();
63
- $query .= "&osi=".$order->getIncrementId();
64
- $query .= "&pd=".$order->getUpdatedAt('long');
65
- $query .= "&ph=".$s_addr->getTelephone();
66
- $query .= "&shop_id=".$this->storeId;
67
- $query .= "&source=email";
68
- $query .= "&v=2";
69
-
70
-
71
- for ($i = 1; $i < 4; $i++)
72
- {
73
- $html .= "<td><a id='prod-rec".$i."' href='https://care.letslinc.com/product_rec?";
74
- $html .= $query."&pos=1&field=link'><img src='https://care.letslinc.com/product_rec?";
75
- $html .= $query."&pos=".$i."' width='150'></a></td>";
76
- }
77
-
78
- $html .= "</tr></table>";
79
-
80
- //Mage::log("Widget complete - $html", null, 'order.log', true);
81
- }
82
- else
83
- {
84
- $html = "<p></p>";
85
- }
86
-
87
- return $html;
88
- }
89
- }
90
-
91
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Linc/Care/Block/Recommendations.php~ DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
-
3
- class Linc_Care_Block_Recommendation extends Mage_Core_Block_Abstract
4
- {
5
- public $storeId = null;
6
-
7
- protected function _toHtml()
8
- {
9
- $html = "";
10
- if ($this->storeId == null)
11
- {
12
- $this->storeId = Mage::getStoreConfig('general/store_information/enter_store_id');
13
- }
14
-
15
- if ($this->storeId != null)
16
- {
17
- $html = "<table border=0 cellspacing=0 cellpadding=20><tr>";
18
- $order = $this->getOrder();
19
- $items = $order->getItemsCollection();
20
-
21
- $query = "";
22
- $baseurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
23
- foreach ($items as $item)
24
- {
25
- $product = Mage::getModel('catalog/product')->load($item->getProduct()->getId());
26
- if ($product->isVisibleInSiteVisibility())
27
- {
28
- $imgurl = $baseurl.$product->getImage();
29
-
30
- if ($query != "")
31
- {
32
- $query .= "&";
33
- }
34
-
35
- $query .= "q=".$item->getQtyOrdered();
36
- $query .= "&p=".$product->getId();
37
- $query .= "&pp=".$item->getPrice();
38
- $query .= "&w=".$item->getWeight();
39
- $query .= "&i=".$imgurl;
40
- $query .= "&n=".$item->getName();
41
- }
42
- }
43
-
44
- $s_addr = $order->getShippingAddress();
45
- if ($s_addr == null)
46
- {
47
- /* use billing address for shipping address when the purchase is a download. */
48
- $s_addr = $order->getBillingAddress();
49
- }
50
-
51
- $query .= "&a1=".$s_addr->getStreet1();
52
- $query .= "&a2=".$s_addr->getStreet2();
53
- $query .= "&au=".$s_addr->getCountry();
54
- $query .= "&ac=".$s_addr->getCity();
55
- $query .= "&as=".$s_addr->getRegion();
56
- $query .= "&az=".$s_addr->getPostcode();
57
- $query .= "&fn=".$order->getCustomerFirstname();
58
- $query .= "&ln=".$order->getCustomerLastname();
59
- $query .= "&e=".$order->getCustomerEmail();
60
- $query .= "&e=".$order->getCustomerEmail();
61
- $query .= "&g=".$order->getGrandTotal();
62
- $query .= "&o=".$order->getIncrementId();
63
- $query .= "&osi=".$order->getIncrementId();
64
- $query .= "&pd=".$order->getUpdatedAt('long');
65
- $query .= "&ph=".$s_addr->getTelephone();
66
- $query .= "&shop_id=".$this->storeId;
67
- $query .= "&source=email";
68
- $query .= "&v=2";
69
-
70
-
71
- for ($i = 1; $i < 4; $i++)
72
- {
73
- $html .= "<td><a id='prod-rec".$i."' href='https://care.letslinc.com/product_rec?";
74
- $html .= $query."&pos=1&field=link'><img src='https://care.letslinc.com/product_rec?";
75
- $html .= $query."&pos=".$i."' width='150'></a></td>";
76
- }
77
-
78
- $html .= "</tr></table>";
79
-
80
- //Mage::log("Widget complete - $html", null, 'order.log', true);
81
- }
82
- else
83
- {
84
- $html = "<p></p>";
85
- }
86
-
87
- return $html;
88
- }
89
- }
90
-
91
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Linc/Care/Block/Widget.php CHANGED
@@ -2,85 +2,95 @@
2
 
3
  class Linc_Care_Block_Widget extends Mage_Core_Block_Abstract
4
  {
5
- public $storeId = null;
6
 
7
- protected function _toHtml()
8
- {
9
- $html = "";
10
- if ($this->storeId == null)
11
- {
12
- $this->storeId = Mage::getStoreConfig('general/store_information/enter_store_id');
13
- }
14
-
15
- if ($this->storeId != null)
16
- {
17
- $order = $this->getOrder();
18
- $items = $order->getItemsCollection();
19
-
20
- $query = "";
21
- $baseurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
22
- foreach ($items as $item)
23
- {
24
- $product = Mage::getModel('catalog/product')->load($item->getProduct()->getId());
25
- if ($product->isVisibleInSiteVisibility())
26
- {
27
- $imgurl = $baseurl.$product->getImage();
28
-
29
- if ($query != "")
30
- {
31
- $query .= "&";
32
- }
33
 
34
- $query .= "q=".$item->getQtyOrdered();
35
- $query .= "&p=".$product->getId();
36
- $query .= "&pp=".$item->getPrice();
37
- $query .= "&w=".$item->getWeight();
38
- $query .= "&i=".$imgurl;
39
- $query .= "&n=".$item->getName();
40
- }
41
- }
42
-
43
- $s_addr = $order->getShippingAddress();
44
- if ($s_addr == null)
45
- {
46
- /* use billing address for shipping address when the purchase is a download. */
47
- $s_addr = $order->getBillingAddress();
48
- }
49
 
50
- $query .= "&a1=".$s_addr->getStreet1();
51
- $query .= "&a2=".$s_addr->getStreet2();
52
- $query .= "&au=".$s_addr->getCountry();
53
- $query .= "&ac=".$s_addr->getCity();
54
- $query .= "&as=".$s_addr->getRegion();
55
- $query .= "&az=".$s_addr->getPostcode();
56
- $query .= "&fn=".$order->getCustomerFirstname();
57
- $query .= "&ln=".$order->getCustomerLastname();
58
- $query .= "&e=".$order->getCustomerEmail();
59
- $query .= "&g=".$order->getGrandTotal();
60
- $query .= "&o=".$order->getIncrementId();
61
- $query .= "&osi=".$order->getIncrementId();
62
- $query .= "&pd=".$order->getUpdatedAt('long');
63
- $query .= "&ph=".$s_addr->getTelephone();
64
- $query .= "&shop_id=".$this->storeId;
65
- $query .= "&source=email";
66
- $query .= "&viewer=".$order->getCustomerEmail();
67
- $query .= "&v=2";
68
-
69
- $html = "<img src='https://care.letslinc.com/user_activity?";
70
- $html .= $query."&activity=widget_impression' border='0' height='1' width='1'>";
71
- $html .= "<a href='https://care.letslinc.com/home?";
72
- $html .= $query."'><img src='https://care.letslinc.com/widget_image?";
73
- $html .= $query."&widget=0'></a>";
74
-
75
- //Mage::log("Widget complete - $html", null, 'order.log', true);
76
- }
77
- else
78
- {
79
- $html = "<p></p>";
80
- }
81
-
82
- return $html;
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  }
85
 
86
  ?>
2
 
3
  class Linc_Care_Block_Widget extends Mage_Core_Block_Abstract
4
  {
5
+ public $storeId = null;
6
 
7
+ protected function _toHtml()
8
+ {
9
+ $html = "";
10
+ if ($this->storeId == null)
11
+ {
12
+ $this->storeId = Mage::getStoreConfig('general/store_information/enter_store_id');
13
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
+ if ($this->storeId != 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=".$imgurl;
41
+ $query .= "&n=".$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=".$s_addr->getStreet1();
53
+ $query .= "&a2=".$s_addr->getStreet2();
54
+ $query .= "&au=".$s_addr->getCountry();
55
+ $query .= "&ac=".$s_addr->getCity();
56
+ $query .= "&as=".$s_addr->getRegion();
57
+ $query .= "&az=".$s_addr->getPostcode();
58
+ $query .= "&fn=".$order->getCustomerFirstname();
59
+ $query .= "&ln=".$order->getCustomerLastname();
60
+ $query .= "&e=".$order->getCustomerEmail();
61
+ $query .= "&d=1";
62
+ $query .= "&g=".$order->getGrandTotal();
63
+ $query .= "&o=".$order->getIncrementId();
64
+ $query .= "&osi=".$order->getIncrementId();
65
+ $query .= "&pd=".$order->getUpdatedAt('long');
66
+ $query .= "&ph=".$s_addr->getTelephone();
67
+ $query .= "&shop_id=".$this->storeId;
68
+ $query .= "&source=email";
69
+ $query .= "&viewer=".$order->getCustomerEmail();
70
+
71
+ $html = "<img src='https://care.letslinc.com/user_activity?";
72
+ $html .= $query."&activity=widget_impression' border='0' height='1' width='1'>";
73
+ $html .= "<a href='https://care.letslinc.com/home?";
74
+ $html .= $query."'><img src='https://care.letslinc.com/widget_image?";
75
+ $html .= $query."&widget=0'></a>";
76
+
77
+ //Mage::log("Widget complete - $html", null, 'order.log', true);
78
+ }
79
+ else
80
+ {
81
+ $query .= "shop_id=".$this->storeId;
82
+ $html = "<a href='https://care.letslinc.com/home?";
83
+ $html .= $query."'><img src='https://care.letslinc.com/widget_image?";
84
+ $html .= $query."&widget=0'></a>";
85
+ }
86
+ }
87
+ else
88
+ {
89
+ $html = "<p></p>";
90
+ }
91
+
92
+ return $html;
93
+ }
94
  }
95
 
96
  ?>
app/code/community/Linc/Care/Block/Widget.php~ DELETED
@@ -1,88 +0,0 @@
1
- <?php
2
-
3
- class Linc_Care_Block_Widget extends Mage_Core_Block_Abstract
4
- {
5
- public $storeId = null;
6
-
7
- protected function _toHtml()
8
- {
9
- $html = "";
10
- if ($this->storeId == null)
11
- {
12
- $this->storeId = Mage::getStoreConfig('general/store_information/enter_store_id');
13
- }
14
-
15
- if ($this->storeId != null)
16
- {
17
- $order = $this->getOrder();
18
- $items = $order->getItemsCollection();
19
-
20
- for($i = 1; $i <= 3; $i++)
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=".$imgurl;
41
- $query .= "&n=".$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=".$s_addr->getStreet1();
53
- $query .= "&a2=".$s_addr->getStreet2();
54
- $query .= "&au=".$s_addr->getCountry();
55
- $query .= "&ac=".$s_addr->getCity();
56
- $query .= "&as=".$s_addr->getRegion();
57
- $query .= "&az=".$s_addr->getPostcode();
58
- $query .= "&fn=".$order->getCustomerFirstname();
59
- $query .= "&ln=".$order->getCustomerLastname();
60
- $query .= "&e=".$order->getCustomerEmail();
61
- $query .= "&g=".$order->getGrandTotal();
62
- $query .= "&o=";
63
- $query .= "&osi=".$order->getIncrementId();
64
- $query .= "&pd=".$order->getUpdatedAt('long');
65
- $query .= "&ph=".$s_addr->getTelephone();
66
- $query .= "&shop_id=".$this->storeId;
67
- $query .= "&source=email";
68
- $query .= "&viewer=".$order->getCustomerEmail();
69
- $query .= "&v=2";
70
-
71
- $html = "<img src='https://care.letslinc.com/user_activity?";
72
- $html .= $query."&activity=widget_impression' border='0' height='1' width='1'>";
73
- $html .= "<a href='https://care.letslinc.com/home?";
74
- $html .= $query."'><img src='https://care.letslinc.com/widget_image?";
75
- $html .= $query."&widget=0'></a>";
76
-
77
- //Mage::log("Widget complete - $html", null, 'order.log', true);
78
- }
79
- else
80
- {
81
- $html = "<p></p>";
82
- }
83
-
84
- return $html;
85
- }
86
- }
87
-
88
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Linc/Care/Model/Fulfillmentobserver.php CHANGED
@@ -113,9 +113,9 @@ class Linc_Care_Model_Fulfillmentobserver
113
 
114
  $this->client->setConfig(array(
115
  'maxredirects' => 0,
116
- 'timeout' => 30,
117
- 'keepalive' => true,
118
- 'adapter' => 'Zend_Http_Client_Adapter_Socket'));
119
 
120
  $this->client->setMethod(Zend_Http_Client::POST);
121
  $this->client->setHeaders(array(
@@ -136,7 +136,7 @@ class Linc_Care_Model_Fulfillmentobserver
136
  }
137
 
138
  $dataorder = array(
139
- 'order_id' => $this->order->getIncrementId(),
140
  'carrier' => $CarrierCode,
141
  'tracking_number' => $this->track->getNumber(),
142
  'fulfill_date' => $this->shipment->getCreatedAt()
113
 
114
  $this->client->setConfig(array(
115
  'maxredirects' => 0,
116
+ 'timeout' => 30,
117
+ 'keepalive' => true,
118
+ 'adapter' => 'Zend_Http_Client_Adapter_Socket'));
119
 
120
  $this->client->setMethod(Zend_Http_Client::POST);
121
  $this->client->setHeaders(array(
136
  }
137
 
138
  $dataorder = array(
139
+ 'order_code_external' => $this->order->getIncrementId(),
140
  'carrier' => $CarrierCode,
141
  'tracking_number' => $this->track->getNumber(),
142
  'fulfill_date' => $this->shipment->getCreatedAt()
app/code/community/Linc/Care/Model/Orderobserver.php CHANGED
@@ -163,13 +163,15 @@ class Linc_Care_Model_Orderobserver
163
  Mage::log("exportOrder built user $temp", null, 'order.log', true);
164
  }
165
 
 
166
  $addrB = array(
167
  'address' => $b_addr->getStreet1(),
168
- 'address2' => $b_addr->getStreet2(),
169
  'city' => $b_addr->getCity(),
170
  'state' => $b_addr->getRegion(),
171
- 'country' => $b_addr->getCountry(),
172
- 'zip' => $b_addr->getPostcode());
 
173
 
174
  if ($this->debug)
175
  {
@@ -177,13 +179,15 @@ class Linc_Care_Model_Orderobserver
177
  Mage::log("exportOrder built billing address $temp", null, 'order.log', true);
178
  }
179
 
 
180
  $addrS = array(
181
  'address' => $s_addr->getStreet1(),
182
- 'address2' => $s_addr->getStreet2(),
183
  'city' => $s_addr->getCity(),
184
  'state' => $s_addr->getRegion(),
185
- 'country' => $s_addr->getCountry(),
186
- 'zip' => $s_addr->getPostcode());
 
187
 
188
  if ($this->debug)
189
  {
@@ -193,7 +197,7 @@ class Linc_Care_Model_Orderobserver
193
 
194
  $dataorder = array(
195
  'user' => $user,
196
- 'order_id' => $order->getIncrementId(),
197
  'billing_address' => $addrB,
198
  'shipping_address' => $addrS,
199
  'purchase_date' => $order->getUpdatedAt(),
163
  Mage::log("exportOrder built user $temp", null, 'order.log', true);
164
  }
165
 
166
+ $country = Mage::getModel('directory/country')->loadByCode($b_addr->getCountry());
167
  $addrB = array(
168
  'address' => $b_addr->getStreet1(),
169
+ 'address2' => $b_addr->getStreet2(),
170
  'city' => $b_addr->getCity(),
171
  'state' => $b_addr->getRegion(),
172
+ 'country_code' => $b_addr->getCountry(),
173
+ 'country' => $country->getName(),
174
+ 'zip' => $b_addr->getPostcode());
175
 
176
  if ($this->debug)
177
  {
179
  Mage::log("exportOrder built billing address $temp", null, 'order.log', true);
180
  }
181
 
182
+ $country = Mage::getModel('directory/country')->loadByCode($s_addr->getCountry());
183
  $addrS = array(
184
  'address' => $s_addr->getStreet1(),
185
+ 'address2' => $s_addr->getStreet2(),
186
  'city' => $s_addr->getCity(),
187
  'state' => $s_addr->getRegion(),
188
+ 'country_code' => $s_addr->getCountry(),
189
+ 'country' => $country->getName(),
190
+ 'zip' => $s_addr->getPostcode());
191
 
192
  if ($this->debug)
193
  {
197
 
198
  $dataorder = array(
199
  'user' => $user,
200
+ 'order_code_external' => $order->getIncrementId(),
201
  'billing_address' => $addrB,
202
  'shipping_address' => $addrS,
203
  'purchase_date' => $order->getUpdatedAt(),
app/code/community/Linc/Care/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Linc_Care>
13
- <version>1.0.0</version>
14
  </Linc_Care>
15
  </modules>
16
  <global>
@@ -45,4 +45,15 @@
45
  </sales_order_shipment_track_save_after>
46
  </events>
47
  </global>
 
 
 
 
 
 
 
 
 
 
 
48
  </config>
10
  <config>
11
  <modules>
12
  <Linc_Care>
13
+ <version>1.1.0</version>
14
  </Linc_Care>
15
  </modules>
16
  <global>
45
  </sales_order_shipment_track_save_after>
46
  </events>
47
  </global>
48
+ <admin>
49
+ <routers>
50
+ <care>
51
+ <use>standard</use>
52
+ <args>
53
+ <module>Linc_Care</module>
54
+ <frontName>linccare</frontName>
55
+ </args>
56
+ </care>
57
+ </routers>
58
+ </admin>
59
  </config>
app/code/community/Linc/Care/etc/system.xml~ DELETED
@@ -1,40 +0,0 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <sections>
4
- <general>
5
- <groups>
6
- <store_information>
7
- <fields>
8
- <enter_store_id translate="label">
9
- <sort_order>200</sort_order>
10
- <label>Enter your Linc Care Store ID</label>
11
- <frontend_type>Text</frontend_type>
12
- <show_in_store>1</show_in_store>
13
- </enter_store_id>
14
- <enter_access_key translate="label">
15
- <sort_order>201</sort_order>
16
- <label>Enter your Linc Care Access Key</label>
17
- <frontend_type>Text</frontend_type>
18
- <show_in_store>1</show_in_store>
19
- </enter_access_key>
20
- <linktolinccare translate="label">
21
- <sort_order>202</sort_order>
22
- <label>Go to Linc Care</label>
23
- <frontend_type>button</frontend_type>
24
- <frontend_model>linccare/button</frontend_model>
25
- <show_in_store>1</show_in_store>
26
- <comment><![CDATA[If you don't have a Linc Care Store ID or Access Key, click to sign up as a Linc Care client.]]></comment>
27
- </linktolinccare>
28
- <linktohelp translate="label">
29
- <sort_order>203</sort_order>
30
- <label>Learn more...</label>
31
- <frontend_type>button</frontend_type>
32
- <frontend_model>linccare/faqbutton</frontend_model>
33
- <show_in_store>1</show_in_store>
34
- </linktohelp>
35
- </fields>
36
- </store_information>
37
- </groups>
38
- </general>
39
- </sections>
40
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Linc/Care/readme CHANGED
@@ -12,9 +12,8 @@ For those of you installing manually:
12
  7. If not Click the Add New Template button.
13
  8. On the next page select New Order from the Template dropdown and click the Load Template button
14
  9. 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.
15
- 10. Open the email template you just created and insert {{block type='linccare/widget' order=$order}} where you want the Linc Care widget to appear. Then save the template.
16
- 11. Repeat for any other order-based emails you want connected to Linc Care. We suggest New Order Guest
17
- 12. Go to System / Sales / Sales Email / Order and select the new templates for New Order Confirmation Email
18
- 12 Save the configuration
19
 
20
  If you have any comments or questions, please email us at support@linccare.com
12
  7. If not Click the Add New Template button.
13
  8. On the next page select New Order from the Template dropdown and click the Load Template button
14
  9. 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.
15
+ 10. Repeat for any other order-based emails you want connected to Linc Care. We suggest New Order Guest
16
+ 11. Go to System / Sales / Sales Email / Order and select the new templates for New Order Confirmation Email
17
+ 12. Save the configuration
 
18
 
19
  If you have any comments or questions, please email us at support@linccare.com
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Linc_Care</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.letslinc.com/Legal/LincCareLicenseAgreement/">Linc Global Commercial License</license>
7
  <channel>community</channel>
@@ -35,34 +35,33 @@ Linc Care is built by a team of seasoned technologists who brought to life large
35
  &#xD;
36
  &amp;nbsp;&#xD;
37
  &lt;p&gt;&#xD;
38
- Subscribe to our email list to receive product updates: &lt;a href="http://www.letslinc.com/more/"&gt;newsletter&lt;/a&gt;&lt;/p&gt;&#xD;
39
  </description>
40
- <notes>Welcome to the Linc Care extension for Magento.&#xD;
41
  &#xD;
42
- The latest release enhances the widget to display a dynamic status of the order. We've also added a Recommendations widget that can be added where ever you have an order object.&#xD;
43
- &#xD;
44
- Here is one possible process for installing our extension.&#xD;
45
- &#xD;
46
- For those of you installing manually:&#xD;
47
- 1. Go to System / Magento Connect / Magento Connect Manager&#xD;
48
- 2. If you're installing via the Magento Connect website, follow the normal procedure then skip to step 5&#xD;
49
- 3. If you're installing manually, download the package from http://care.letslinc.com/Downloads/Proximant_Linccare-1.0.3.tgz&#xD;
50
- 4. Click the Browse button and select the file you just downloaded, the click the Upload button.&#xD;
51
- 5. Go to System/Transactional Email&#xD;
52
- 6. 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;
53
- 7. If not Click the Add New Template button.&#xD;
54
- 8. On the next page select New Order from the Template dropdown and click the Load Template button, then name the new template. &#xD;
55
- 9. Open the email template you just created and insert {{block type='linccare/widget' order=$order}} where you want the Linc Care widget to appear. &#xD;
56
- 10. Insert {{block type='care/recommendations' order=$order}} where you want the recommended products. Then save the template.&#xD;
57
- 11. Repeat for any other order-based emails you want connected to Linc Care. We suggest New Order Guest&#xD;
58
- 12. Go to System / Sales / Sales Email / Order and select the new templates for New Order Confirmation Email&#xD;
59
- 13 Save the configuration&#xD;
60
- &#xD;
61
- If you have any comments or questions, please email us at support@linccare.com</notes>
62
  <authors><author><name>Linc Care Development</name><user>letslincapp</user><email>apps@letslinc.com</email></author></authors>
63
- <date>2014-09-16</date>
64
- <time>00:53:27</time>
65
- <contents><target name="mageetc"><dir name="modules"><file name="Linc_Care.xml" hash="db51f40a404065353fec8086394b8d56"/></dir></target><target name="magecommunity"><dir name="Linc"><dir name="Care"><dir name="Block"><file name="Button.php" hash="939be97c5f42658a75d1f91f7d5354f9"/><file name="Faqbutton.php" hash="4fc7c695024246b09a459c8ed86f3d68"/><file name="Recommendations.php" hash="311574efd1ab1f8c0ef741944fc5e260"/><file name="Recommendations.php~" hash="a6dd0578817a8fdf97d52441da191539"/><file name="Widget.php" hash="2f533494dfd4d2516f201940b6d410b2"/><file name="Widget.php~" hash="26cd23b81c8cd049b8c9a0b5f70a51dc"/></dir><dir name="Model"><file name="Fulfillmentobserver.php" hash="566ab6b6477bbe187db9a07459a37f8d"/><file name="Orderobserver.php" hash="7159bc2262c55d746230ac1a28402ade"/></dir><dir name="etc"><file name="config.xml" hash="050a2b0e37a993b42ee2ba1827c0493a"/><file name="system.xml" hash="351200318f9fb37020f0f3bb49887171"/><file name="system.xml~" hash="9ffb32b16e5c9c148b2a154e85b50632"/></dir><file name="readme" hash="4975174a851cc25bcb1fcdf8c3dc7f1c"/></dir></dir></target></contents>
66
  <compatible/>
67
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
68
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Linc_Care</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.letslinc.com/Legal/LincCareLicenseAgreement/">Linc Global Commercial License</license>
7
  <channel>community</channel>
35
  &#xD;
36
  &amp;nbsp;&#xD;
37
  &lt;p&gt;&#xD;
38
+ 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;&#xD;
39
  </description>
40
+ <notes>&lt;h1&gt;Welcome to the Linc Care extension for Magento.&lt;/h1&gt;&#xD;
41
  &#xD;
42
+ &lt;h2&gt;News&lt;/h2&gt;&#xD;
43
+ &lt;p&gt;The latest release enhances the widget to display a dynamic status of the order. We've also added a Recommendations widget that can be added where ever you have an order object.&amp;amp;gt;/p&amp;amp;gt;&#xD;
44
+ &lt;p /&gt;&lt;b&gt;Install the extension as you would any other&lt;/b&gt;&lt;/p&gt;&#xD;
45
+ &lt;h2&gt;Per Store Extension&lt;/h2&gt;&#xD;
46
+ &lt;br /&gt;&lt;p&gt;The Linc Care extension has a &amp;quot;per store&amp;quot; store configuration. Each store has its own Store ID and Access Code. This means that, on the configuration page, you must select a store as your Current Configuration Scope&lt;/p&gt;&#xD;
47
+ &lt;h2&gt;Configuration&lt;/h2&gt;&#xD;
48
+ &lt;ol&gt;&#xD;
49
+ &lt;li /&gt;&lt;b&gt;System / Configuration / General / Store Information&lt;/b&gt;&#xD;
50
+ &lt;li /&gt;Set the Configuration Scope to the store you want to configure.&#xD;
51
+ Fill in the store's ID and Access Key. If you don't have these already, click the &lt;b&gt;Go to Linc Care&lt;/b&gt; and register the store.&#xD;
52
+ &lt;li /&gt;&lt;b&gt;System / Transactional Email&lt;/b&gt;&#xD;
53
+ &lt;li /&gt;For any email that related to an order (i.e. New Order, New Order for Guest), edit it and insert &lt;b&gt;{{block type='care/widget' order=$order}}&lt;/b&gt; where you want the Linc Care widget to appear. &#xD;
54
+ &lt;li /&gt;Click on Preview Template to confirm the appearance then save the template.&#xD;
55
+ &lt;li /&gt;Repeat for any other order-based emails you want connected to Linc Care.&#xD;
56
+ &lt;li /&gt;&lt;b&gt;System / Sales / Sales Email / Order&lt;/b&gt;&#xD;
57
+ &lt;li /&gt;Select the new templates for appropriate email&#xD;
58
+ &lt;li /&gt;Save the configuration&#xD;
59
+ &lt;/ol&gt;&#xD;
60
+ &lt;p&gt;If you have any comments or questions, please email us at support@linccare.com&lt;/p&gt;</notes>
 
61
  <authors><author><name>Linc Care Development</name><user>letslincapp</user><email>apps@letslinc.com</email></author></authors>
62
+ <date>2014-09-30</date>
63
+ <time>02:28:22</time>
64
+ <contents><target name="mageetc"><dir name="modules"><file name="Linc_Care.xml" hash="db51f40a404065353fec8086394b8d56"/></dir></target><target name="magecommunity"><dir name="Linc"><dir name="Care"><dir name="Block"><file name="Button.php" hash="f6b577bdf0a83d98cabeb5956b0418e2"/><file name="Faqbutton.php" hash="862a87a5d06ae5c34f1ff629f341f01c"/><file name="Widget.php" hash="122d05e6653df7031be736c595b832c3"/></dir><dir name="Model"><file name="Fulfillmentobserver.php" hash="66e2bd8d8fd46370eb7ff7d1d0c89847"/><file name="Orderobserver.php" hash="8be3cb3097bdc9becbb6af5c53a6bf09"/></dir><dir name="etc"><file name="config.xml" hash="7ff613718b4fe9d68181d8505b46a449"/><file name="system.xml" hash="351200318f9fb37020f0f3bb49887171"/></dir><file name="readme" hash="b870624d95964a9953466ad8c89bef62"/></dir></dir></target></contents>
65
  <compatible/>
66
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
67
  </package>