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>
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
-
System / Configuration / General / Store Information - 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. -
System / Transactional Email - 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.
- Click on Preview Template to confirm the appearance then save the template.
- Repeat for any other order-based emails you want connected to Linc Care.
-
System / Sales / Sales Email / Order - Select the new templates for appropriate email
- 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 +18 -14
- app/code/community/Linc/Care/Block/Faqbutton.php +1 -1
- app/code/community/Linc/Care/Block/Recommendations.php +0 -91
- app/code/community/Linc/Care/Block/Recommendations.php~ +0 -91
- app/code/community/Linc/Care/Block/Widget.php +86 -76
- app/code/community/Linc/Care/Block/Widget.php~ +0 -88
- app/code/community/Linc/Care/Model/Fulfillmentobserver.php +4 -4
- app/code/community/Linc/Care/Model/Orderobserver.php +11 -7
- app/code/community/Linc/Care/etc/config.xml +12 -1
- app/code/community/Linc/Care/etc/system.xml~ +0 -40
- app/code/community/Linc/Care/readme +3 -4
- package.xml +25 -26
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 |
-
|
10 |
-
$
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
17 |
}
|
|
|
|
|
18 |
|
19 |
Mage::log("Linc_Care button url $url", null, 'order.log', true);
|
20 |
|
21 |
-
$
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
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/
|
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 |
-
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
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 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
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 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
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'
|
117 |
-
'keepalive'
|
118 |
-
|
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 |
-
'
|
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'
|
169 |
'city' => $b_addr->getCity(),
|
170 |
'state' => $b_addr->getRegion(),
|
171 |
-
'
|
172 |
-
'
|
|
|
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'
|
183 |
'city' => $s_addr->getCity(),
|
184 |
'state' => $s_addr->getRegion(),
|
185 |
-
'
|
186 |
-
'
|
|
|
187 |
|
188 |
if ($this->debug)
|
189 |
{
|
@@ -193,7 +197,7 @@ class Linc_Care_Model_Orderobserver
|
|
193 |
|
194 |
$dataorder = array(
|
195 |
'user' => $user,
|
196 |
-
'
|
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.
|
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.
|
16 |
-
11.
|
17 |
-
12.
|
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.
|
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 |

|
36 |
&nbsp;
|
37 |
<p>
|
38 |
-
|
39 |
</description>
|
40 |
-
<notes
|
41 |

|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
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-
|
64 |
-
<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="
|
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 |

|
36 |
&nbsp;
|
37 |
<p>
|
38 |
+
The Linc Care Professional Services Team is available to help you customize your experience at: <a href="mailto:sales@linccare.com">sales@linccare.com</a></p>
|
39 |
</description>
|
40 |
+
<notes><h1>Welcome to the Linc Care extension for Magento.</h1>
|
41 |

|
42 |
+
<h2>News</h2>
|
43 |
+
<p>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;gt;/p&amp;gt;
|
44 |
+
<p /><b>Install the extension as you would any other</b></p>
|
45 |
+
<h2>Per Store Extension</h2>
|
46 |
+
<br /><p>The Linc Care extension has a &quot;per store&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</p>
|
47 |
+
<h2>Configuration</h2>
|
48 |
+
<ol>
|
49 |
+
<li /><b>System / Configuration / General / Store Information</b>
|
50 |
+
<li />Set the Configuration Scope to the store you want to configure.
|
51 |
+
Fill in the store's ID and Access Key. If you don't have these already, click the <b>Go to Linc Care</b> and register the store.
|
52 |
+
<li /><b>System / Transactional Email</b>
|
53 |
+
<li />For any email that related to an order (i.e. New Order, New Order for Guest), edit it and insert <b>{{block type='care/widget' order=$order}}</b> where you want the Linc Care widget to appear. 
|
54 |
+
<li />Click on Preview Template to confirm the appearance then save the template.
|
55 |
+
<li />Repeat for any other order-based emails you want connected to Linc Care.
|
56 |
+
<li /><b>System / Sales / Sales Email / Order</b>
|
57 |
+
<li />Select the new templates for appropriate email
|
58 |
+
<li />Save the configuration
|
59 |
+
</ol>
|
60 |
+
<p>If you have any comments or questions, please email us at support@linccare.com</p></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>
|