Linc_Care - Version 1.0.3

Version Notes

Welcome to the Linc Care extension for Magento.

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.

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. If you're installing via the Magento Connect website, follow the normal procedure then skip to step 5
3. If you're installing manually, download the package from http://care.letslinc.com/Downloads/Proximant_Linccare-1.0.3.tgz
4. Click the Browse button and select the file you just downloaded, the click the Upload button.
5. Go to System/Transactional Email
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
7. If not Click the Add New Template button.
8. On the next page select New Order from the Template dropdown and click the Load Template button, then name the new template.
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.
10. Insert {{block type='care/recommendations' order=$order}} where you want the recommended products. Then save the template.
11. Repeat for any other order-based emails you want connected to Linc Care. We suggest New Order Guest
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@linccare.com

Download this release

Release Info

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


Code changes from version 1.0.2 to 1.0.3

app/code/community/Linc/Care/Block/Recommendations.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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~ ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -56,14 +56,15 @@ class Linc_Care_Block_Widget extends Mage_Core_Block_Abstract
56
  $query .= "&fn=".$order->getCustomerFirstname();
57
  $query .= "&ln=".$order->getCustomerLastname();
58
  $query .= "&e=".$order->getCustomerEmail();
59
- $query .= "&d=1";
60
  $query .= "&g=".$order->getGrandTotal();
61
  $query .= "&o=".$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
 
68
  $html = "<img src='https://care.letslinc.com/user_activity?";
69
  $html .= $query."&activity=widget_impression' border='0' height='1' width='1'>";
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'>";
app/code/community/Linc/Care/Block/Widget.php~ ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Linc_Care</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.letslinc.com/Legal/LincCareLicenseAgreement/">Linc Global Commercial License</license>
7
  <channel>community</channel>
@@ -39,28 +39,30 @@ Subscribe to our email list to receive product updates: &lt;a href="http://www.l
39
  </description>
40
  <notes>Welcome to the Linc Care extension for Magento.&#xD;
41
  &#xD;
 
 
42
  Here is one possible process for installing our extension.&#xD;
43
  &#xD;
44
  For those of you installing manually:&#xD;
45
  1. Go to System / Magento Connect / Magento Connect Manager&#xD;
46
  2. If you're installing via the Magento Connect website, follow the normal procedure then skip to step 5&#xD;
47
- 3. If you're installing manually, download the package from http://care.letslinc.com/Downloads/Proximant_Linccare-1.0.0.tgz&#xD;
48
  4. Click the Browse button and select the file you just downloaded, the click the Upload button.&#xD;
49
  5. Go to System/Transactional Email&#xD;
50
  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;
51
  7. If not Click the Add New Template button.&#xD;
52
- 8. On the next page select New Order from the Template dropdown and click the Load Template button&#xD;
53
- 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.&#xD;
54
- 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.&#xD;
55
  11. Repeat for any other order-based emails you want connected to Linc Care. We suggest New Order Guest&#xD;
56
  12. Go to System / Sales / Sales Email / Order and select the new templates for New Order Confirmation Email&#xD;
57
- 12 Save the configuration&#xD;
58
  &#xD;
59
  If you have any comments or questions, please email us at support@linccare.com</notes>
60
  <authors><author><name>Linc Care Development</name><user>letslincapp</user><email>apps@letslinc.com</email></author></authors>
61
- <date>2014-09-10</date>
62
- <time>04:40:12</time>
63
- <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="Widget.php" hash="f61241bcbdeba1af709ba82af3499edc"/></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>
64
  <compatible/>
65
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
66
  </package>
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>
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>