Version Notes
First release.
Download this release
Release Info
Developer | OpsWay |
Extension | opswaypipeliner |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.4
app/code/community/OpsWay/Pipeliner/Model/Observer.php
CHANGED
@@ -4,7 +4,14 @@ class OpsWay_Pipeliner_Model_Observer
|
|
4 |
{
|
5 |
const PIPELINER_ROLLOUT_STAGE = 'PY-7FFFFFFF-363E1EB8-B973-46AF-BBFD-DD3CDF3C4BBC';
|
6 |
const COMPANY_SALES_UNIT = '0';
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
/**
|
9 |
*
|
10 |
* @throws Exception
|
@@ -14,14 +21,14 @@ class OpsWay_Pipeliner_Model_Observer
|
|
14 |
public function saveCatalogProductBefore(Varien_Event_Observer $observer)
|
15 |
{
|
16 |
try {
|
17 |
-
$_product = $observer->
|
18 |
|
19 |
$cats = $_product->getCategoryIds();
|
20 |
$categoryArray = array();
|
21 |
$_cat = Mage::getModel('catalog/category')->load($cats[count($cats) - 1]);
|
22 |
$pipeliner = Mage::helper('pipeliner')->getConnection();
|
23 |
|
24 |
-
$products = $pipeliner->products->get(PipelinerSales_Query_Filter::equals('
|
25 |
$accountIterator = $pipeliner->products->getEntireRangeIterator($products);
|
26 |
foreach ($accountIterator as $account) {
|
27 |
$sku = $account->getId();
|
@@ -31,13 +38,13 @@ class OpsWay_Pipeliner_Model_Observer
|
|
31 |
} else {
|
32 |
$products = $pipeliner->products->getById($sku);
|
33 |
}
|
34 |
-
$observer->getProduct()->setData('pipeliner_api_id', $products->getId());
|
35 |
$products->setDescription($_product->getDescription());
|
36 |
$products->setName($_product->getName());
|
37 |
$products->setSku($_product->getSku());
|
38 |
$products->setProductCategoryId($_cat->getData('pipeliner_api_id'));
|
39 |
$products->setUnitSymbol('ps');
|
40 |
$pipeliner->products->save($products);
|
|
|
41 |
} catch (PipelinerSales_Http_PipelinerHttpException $e) {
|
42 |
Mage::log($e->getErrorMessage(), null, 'pipeliner.log');
|
43 |
}
|
@@ -53,16 +60,14 @@ class OpsWay_Pipeliner_Model_Observer
|
|
53 |
public function saveCatalogCategoryBefore(Varien_Event_Observer $observer)
|
54 |
{
|
55 |
try {
|
56 |
-
$_category = $observer->
|
57 |
-
$
|
58 |
-
$categoryString = $_cat->getName();
|
59 |
-
|
60 |
$pipeliner = Mage::helper('pipeliner')->getConnection();
|
61 |
|
62 |
$filter = new PipelinerSales_Query_Filter();
|
63 |
-
$filter->equals('
|
64 |
-
if ($
|
65 |
-
$filter->equals('PARENT_ID', $
|
66 |
}
|
67 |
|
68 |
$categories = $pipeliner->productCategories->get($filter);
|
@@ -77,12 +82,12 @@ class OpsWay_Pipeliner_Model_Observer
|
|
77 |
$categories = $pipeliner->productCategories->getById($categoryId);
|
78 |
}
|
79 |
|
80 |
-
$observer->getCategory()->setData('pipeliner_api_id', $categories->getId());
|
81 |
|
82 |
$categories->setName($categoryString);
|
83 |
-
if ($
|
84 |
-
$categories->setParentId($
|
85 |
$pipeliner->productCategories->save($categories);
|
|
|
86 |
} catch (PipelinerSales_Http_PipelinerHttpException $e) {
|
87 |
Mage::log($e->getErrorMessage(), null, 'pipeliner.log');
|
88 |
}
|
@@ -95,13 +100,14 @@ class OpsWay_Pipeliner_Model_Observer
|
|
95 |
* @param Varien_Event_Observer $observer
|
96 |
* @return $this
|
97 |
*/
|
98 |
-
public function
|
99 |
{
|
100 |
try {
|
101 |
-
$_customer = $observer->
|
102 |
-
|
|
|
103 |
$pipeliner = Mage::helper('pipeliner')->getConnection();
|
104 |
-
$contacts = $pipeliner->contacts->get(PipelinerSales_Query_Filter::equals('
|
105 |
$accountIterator = $pipeliner->contacts->getEntireRangeIterator($contacts);
|
106 |
foreach ($accountIterator as $account) {
|
107 |
$id = $account->getId();
|
@@ -112,7 +118,8 @@ class OpsWay_Pipeliner_Model_Observer
|
|
112 |
$contacts = $pipeliner->contacts->getById($id);
|
113 |
}
|
114 |
|
115 |
-
|
|
|
116 |
$contacts->setFirstName($_customer->getFirstname());
|
117 |
$contacts->setSurname($_customer->getLastname());
|
118 |
$contacts->setGender($_customer->getGender());
|
@@ -120,6 +127,7 @@ class OpsWay_Pipeliner_Model_Observer
|
|
120 |
$contacts->setOwnerId($this->getOwnerId($pipeliner));
|
121 |
$contacts->setSalesUnitId(self::COMPANY_SALES_UNIT);
|
122 |
$pipeliner->contacts->save($contacts);
|
|
|
123 |
} catch (PipelinerSales_Http_PipelinerHttpException $e) {
|
124 |
Mage::log($e->getErrorMessage(), null, 'pipeliner.log');
|
125 |
}
|
@@ -135,8 +143,7 @@ class OpsWay_Pipeliner_Model_Observer
|
|
135 |
*/
|
136 |
public function saveOrderAfterCommit(Varien_Event_Observer $observer)
|
137 |
{
|
138 |
-
|
139 |
-
$_order = $observer->getOrder();
|
140 |
|
141 |
try {
|
142 |
$pipeliner = Mage::helper('pipeliner')->getConnection();
|
@@ -316,4 +323,13 @@ class OpsWay_Pipeliner_Model_Observer
|
|
316 |
return $account->getId();
|
317 |
}
|
318 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
}
|
4 |
{
|
5 |
const PIPELINER_ROLLOUT_STAGE = 'PY-7FFFFFFF-363E1EB8-B973-46AF-BBFD-DD3CDF3C4BBC';
|
6 |
const COMPANY_SALES_UNIT = '0';
|
7 |
+
|
8 |
+
private $methods = array(
|
9 |
+
'Mage_Catalog_Model_Category' => 'saveCatalogCategoryBefore',
|
10 |
+
'Mage_Catalog_Model_Product' => 'saveCatalogProductBefore',
|
11 |
+
'Mage_Customer_Model_Customer' => 'saveCustomerBeforeCommit',
|
12 |
+
'Mage_Sales_Model_Order' => 'saveOrderAfterCommit'
|
13 |
+
);
|
14 |
+
|
15 |
/**
|
16 |
*
|
17 |
* @throws Exception
|
21 |
public function saveCatalogProductBefore(Varien_Event_Observer $observer)
|
22 |
{
|
23 |
try {
|
24 |
+
$_product = $observer->getEvent()->getObject();
|
25 |
|
26 |
$cats = $_product->getCategoryIds();
|
27 |
$categoryArray = array();
|
28 |
$_cat = Mage::getModel('catalog/category')->load($cats[count($cats) - 1]);
|
29 |
$pipeliner = Mage::helper('pipeliner')->getConnection();
|
30 |
|
31 |
+
$products = $pipeliner->products->get(PipelinerSales_Query_Filter::equals('ID', $_product->getData('pipeliner_api_id')));
|
32 |
$accountIterator = $pipeliner->products->getEntireRangeIterator($products);
|
33 |
foreach ($accountIterator as $account) {
|
34 |
$sku = $account->getId();
|
38 |
} else {
|
39 |
$products = $pipeliner->products->getById($sku);
|
40 |
}
|
|
|
41 |
$products->setDescription($_product->getDescription());
|
42 |
$products->setName($_product->getName());
|
43 |
$products->setSku($_product->getSku());
|
44 |
$products->setProductCategoryId($_cat->getData('pipeliner_api_id'));
|
45 |
$products->setUnitSymbol('ps');
|
46 |
$pipeliner->products->save($products);
|
47 |
+
$observer->getProduct()->setData('pipeliner_api_id', $products->getId());
|
48 |
} catch (PipelinerSales_Http_PipelinerHttpException $e) {
|
49 |
Mage::log($e->getErrorMessage(), null, 'pipeliner.log');
|
50 |
}
|
60 |
public function saveCatalogCategoryBefore(Varien_Event_Observer $observer)
|
61 |
{
|
62 |
try {
|
63 |
+
$_category = $observer->getEvent()->getObject();
|
64 |
+
$categoryString = $_category->getName();
|
|
|
|
|
65 |
$pipeliner = Mage::helper('pipeliner')->getConnection();
|
66 |
|
67 |
$filter = new PipelinerSales_Query_Filter();
|
68 |
+
$filter->equals('ID', $_category->getData('pipeliner_api_id'));
|
69 |
+
if ($_category->getParentCategory()->getId() != 1) {
|
70 |
+
$filter->equals('PARENT_ID', $_category->getParentCategory()->getData('pipeliner_api_id'));
|
71 |
}
|
72 |
|
73 |
$categories = $pipeliner->productCategories->get($filter);
|
82 |
$categories = $pipeliner->productCategories->getById($categoryId);
|
83 |
}
|
84 |
|
|
|
85 |
|
86 |
$categories->setName($categoryString);
|
87 |
+
if ($_category->getParentCategory()->getId() != 2)
|
88 |
+
$categories->setParentId($_category->getParentCategory()->getData('pipeliner_api_id'));
|
89 |
$pipeliner->productCategories->save($categories);
|
90 |
+
$observer->getEvent()->getObject()->setData('pipeliner_api_id', $categories->getId());
|
91 |
} catch (PipelinerSales_Http_PipelinerHttpException $e) {
|
92 |
Mage::log($e->getErrorMessage(), null, 'pipeliner.log');
|
93 |
}
|
100 |
* @param Varien_Event_Observer $observer
|
101 |
* @return $this
|
102 |
*/
|
103 |
+
public function saveCustomerBeforeCommit(Varien_Event_Observer $observer)
|
104 |
{
|
105 |
try {
|
106 |
+
$_customer = $observer->getEvent()->getObject();
|
107 |
+
|
108 |
+
|
109 |
$pipeliner = Mage::helper('pipeliner')->getConnection();
|
110 |
+
$contacts = $pipeliner->contacts->get(PipelinerSales_Query_Filter::equals('ID', $_customer->getData('pipeliner_api_id')));
|
111 |
$accountIterator = $pipeliner->contacts->getEntireRangeIterator($contacts);
|
112 |
foreach ($accountIterator as $account) {
|
113 |
$id = $account->getId();
|
118 |
$contacts = $pipeliner->contacts->getById($id);
|
119 |
}
|
120 |
|
121 |
+
|
122 |
+
$contacts->setEmail1($_customer->getEmail());
|
123 |
$contacts->setFirstName($_customer->getFirstname());
|
124 |
$contacts->setSurname($_customer->getLastname());
|
125 |
$contacts->setGender($_customer->getGender());
|
127 |
$contacts->setOwnerId($this->getOwnerId($pipeliner));
|
128 |
$contacts->setSalesUnitId(self::COMPANY_SALES_UNIT);
|
129 |
$pipeliner->contacts->save($contacts);
|
130 |
+
$observer->getEvent()->getObject()->setData('pipeliner_api_id', $contacts->getId());
|
131 |
} catch (PipelinerSales_Http_PipelinerHttpException $e) {
|
132 |
Mage::log($e->getErrorMessage(), null, 'pipeliner.log');
|
133 |
}
|
143 |
*/
|
144 |
public function saveOrderAfterCommit(Varien_Event_Observer $observer)
|
145 |
{
|
146 |
+
$_order = $observer->getEvent()->getObject();
|
|
|
147 |
|
148 |
try {
|
149 |
$pipeliner = Mage::helper('pipeliner')->getConnection();
|
323 |
return $account->getId();
|
324 |
}
|
325 |
}
|
326 |
+
|
327 |
+
public function modelSaveAfter(Varien_Event_Observer $observer)
|
328 |
+
{
|
329 |
+
if(isset($this->methods[get_class($observer->getEvent()->getObject())]))
|
330 |
+
{
|
331 |
+
$method = $this->methods[get_class($observer->getEvent()->getObject())];
|
332 |
+
$this->$method($observer);
|
333 |
+
}
|
334 |
+
}
|
335 |
}
|
app/code/community/OpsWay/Pipeliner/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<OpsWay_Pipeliner>
|
5 |
-
<version>1.0.
|
6 |
<depends>
|
7 |
<!-- no dependencies -->
|
8 |
</depends>
|
@@ -72,40 +72,36 @@
|
|
72 |
<use>core_read</use>
|
73 |
</connection>
|
74 |
</add_product_attribute_read>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
</resources>
|
76 |
<events>
|
77 |
-
<
|
78 |
-
<observers>
|
79 |
-
<pipeliner_events>
|
80 |
-
<class>OpsWay_Pipeliner_Model_Observer</class>
|
81 |
-
<method>saveCatalogCategoryBefore</method>
|
82 |
-
</pipeliner_events>
|
83 |
-
</observers>
|
84 |
-
</catalog_category_save_before>
|
85 |
-
<catalog_product_save_before>>
|
86 |
-
<observers>
|
87 |
-
<pipeliner_events>
|
88 |
-
<class>OpsWay_Pipeliner_Model_Observer</class>
|
89 |
-
<method>saveCatalogProductBefore</method>
|
90 |
-
</pipeliner_events>
|
91 |
-
</observers>
|
92 |
-
</catalog_product_save_before>>
|
93 |
-
<customer_save_commit_after>
|
94 |
-
<observers>
|
95 |
-
<pipeliner_events>
|
96 |
-
<class>OpsWay_Pipeliner_Model_Observer</class>
|
97 |
-
<method>saveCustomerAfterCommit</method>
|
98 |
-
</pipeliner_events>
|
99 |
-
</observers>
|
100 |
-
</customer_save_commit_after>
|
101 |
-
<sales_order_save_after>
|
102 |
<observers>
|
103 |
<pipeliner_events>
|
|
|
104 |
<class>OpsWay_Pipeliner_Model_Observer</class>
|
105 |
-
<method>
|
106 |
</pipeliner_events>
|
107 |
</observers>
|
108 |
-
</
|
109 |
</events>
|
110 |
</global>
|
111 |
<crontab>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<OpsWay_Pipeliner>
|
5 |
+
<version>1.0.4</version>
|
6 |
<depends>
|
7 |
<!-- no dependencies -->
|
8 |
</depends>
|
72 |
<use>core_read</use>
|
73 |
</connection>
|
74 |
</add_product_attribute_read>
|
75 |
+
<add_customer_attribute>
|
76 |
+
<setup>
|
77 |
+
<module>OpsWay_Pipeliner</module>
|
78 |
+
<class>Mage_Customer_Model_Entity_Setup</class>
|
79 |
+
</setup>
|
80 |
+
<connection>
|
81 |
+
<use>core_setup</use>
|
82 |
+
</connection>
|
83 |
+
</add_customer_attribute>
|
84 |
+
<add_customer_attribute_write>
|
85 |
+
<connection>
|
86 |
+
<use>core_write</use>
|
87 |
+
</connection>
|
88 |
+
</add_customer_attribute_write>
|
89 |
+
<add_customer_attribute_read>
|
90 |
+
<connection>
|
91 |
+
<use>core_read</use>
|
92 |
+
</connection>
|
93 |
+
</add_customer_attribute_read>
|
94 |
</resources>
|
95 |
<events>
|
96 |
+
<model_save_before>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
<observers>
|
98 |
<pipeliner_events>
|
99 |
+
<type>singleton</type>
|
100 |
<class>OpsWay_Pipeliner_Model_Observer</class>
|
101 |
+
<method>modelSaveAfter</method>
|
102 |
</pipeliner_events>
|
103 |
</observers>
|
104 |
+
</model_save_before>
|
105 |
</events>
|
106 |
</global>
|
107 |
<crontab>
|
app/code/community/OpsWay/Pipeliner/etc/config.xml~
DELETED
@@ -1,136 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<OpsWay_Pipeliner>
|
5 |
-
<version>1.0.0</version>
|
6 |
-
<depends>
|
7 |
-
<!-- no dependencies -->
|
8 |
-
</depends>
|
9 |
-
</OpsWay_Pipeliner>
|
10 |
-
</modules>
|
11 |
-
|
12 |
-
<global>
|
13 |
-
<models>
|
14 |
-
<pipeliner>
|
15 |
-
<class>OpsWay_Pipeliner_Model</class>
|
16 |
-
</pipeliner>
|
17 |
-
</models>
|
18 |
-
|
19 |
-
<helpers>
|
20 |
-
<pipeliner>
|
21 |
-
<class>OpsWay_Pipeliner_Helper</class>
|
22 |
-
</pipeliner>
|
23 |
-
</helpers>
|
24 |
-
|
25 |
-
<blocks>
|
26 |
-
<pipeliner>
|
27 |
-
<class>OpsWay_Pipeliner_Block</class>
|
28 |
-
</pipeliner>
|
29 |
-
<adminhtml>
|
30 |
-
<rewrite>
|
31 |
-
<system_config_form_fieldset>OpsWay_Pipeliner_Block_Adminhtml_Info</system_config_form_fieldset>
|
32 |
-
</rewrite>
|
33 |
-
</adminhtml>
|
34 |
-
</blocks>
|
35 |
-
|
36 |
-
<resources>
|
37 |
-
<add_category_attribute>
|
38 |
-
<setup>
|
39 |
-
<module>OpsWay_Pipeliner</module>
|
40 |
-
<class>Mage_Catalog_Model_Resource_Setup</class>
|
41 |
-
</setup>
|
42 |
-
<connection>
|
43 |
-
<use>core_setup</use>
|
44 |
-
</connection>
|
45 |
-
</add_category_attribute>
|
46 |
-
<add_category_attribute_write>
|
47 |
-
<connection>
|
48 |
-
<use>core_write</use>
|
49 |
-
</connection>
|
50 |
-
</add_category_attribute_write>
|
51 |
-
<add_category_attribute_read>
|
52 |
-
<connection>
|
53 |
-
<use>core_read</use>
|
54 |
-
</connection>
|
55 |
-
</add_category_attribute_read>
|
56 |
-
<add_product_attribute>
|
57 |
-
<setup>
|
58 |
-
<module>OpsWay_Pipeliner</module>
|
59 |
-
<class>Mage_Catalog_Model_Resource_Setup</class>
|
60 |
-
</setup>
|
61 |
-
<connection>
|
62 |
-
<use>core_setup</use>
|
63 |
-
</connection>
|
64 |
-
</add_product_attribute>
|
65 |
-
<add_product_attribute_write>
|
66 |
-
<connection>
|
67 |
-
<use>core_write</use>
|
68 |
-
</connection>
|
69 |
-
</add_product_attribute_write>
|
70 |
-
<add_product_attribute_read>
|
71 |
-
<connection>
|
72 |
-
<use>core_read</use>
|
73 |
-
</connection>
|
74 |
-
</add_product_attribute_read>
|
75 |
-
</resources>
|
76 |
-
<events>
|
77 |
-
<catalog_category_save_before>
|
78 |
-
<observers>
|
79 |
-
<pipeliner_events>
|
80 |
-
<class>OpsWay_Pipeliner_Model_Observer</class>
|
81 |
-
<method>saveCatalogCategoryBefore</method>
|
82 |
-
</pipeliner_events>
|
83 |
-
</observers>
|
84 |
-
</catalog_category_save_before>
|
85 |
-
<catalog_product_save_before>>
|
86 |
-
<observers>
|
87 |
-
<pipeliner_events>
|
88 |
-
<class>OpsWay_Pipeliner_Model_Observer</class>
|
89 |
-
<method>saveCatalogProductBefore</method>
|
90 |
-
</pipeliner_events>
|
91 |
-
</observers>
|
92 |
-
</catalog_product_save_before>>
|
93 |
-
<customer_save_commit_after>
|
94 |
-
<observers>
|
95 |
-
<pipeliner_events>
|
96 |
-
<class>OpsWay_Pipeliner_Model_Observer</class>
|
97 |
-
<method>saveCustomerAfterCommit</method>
|
98 |
-
</pipeliner_events>
|
99 |
-
</observers>
|
100 |
-
</customer_save_commit_after>
|
101 |
-
<sales_order_save_after>
|
102 |
-
<observers>
|
103 |
-
<pipeliner_events>
|
104 |
-
<class>OpsWay_Pipeliner_Model_Observer</class>
|
105 |
-
<method>saveOrderAfterCommit</method>
|
106 |
-
</pipeliner_events>
|
107 |
-
</observers>
|
108 |
-
</sales_order_save_after>
|
109 |
-
</events>
|
110 |
-
</global>
|
111 |
-
<crontab>
|
112 |
-
<jobs>
|
113 |
-
<pipeliner>
|
114 |
-
<schedule><cron_expr>*/10 * * * *</cron_expr></schedule>
|
115 |
-
<run><model>pipeliner/observer::syncCategories</model></run>
|
116 |
-
</pipeliner>
|
117 |
-
</jobs>
|
118 |
-
<jobs>
|
119 |
-
<pipeliner>
|
120 |
-
<schedule><cron_expr>*/10 * * * *</cron_expr></schedule>
|
121 |
-
<run><model>pipeliner/observer::syncProducts</model></run>
|
122 |
-
</pipeliner>
|
123 |
-
</jobs>
|
124 |
-
</crontab>
|
125 |
-
<frontend>
|
126 |
-
<routers>
|
127 |
-
<pipeliner>
|
128 |
-
<use>standard</use>
|
129 |
-
<args>
|
130 |
-
<module>OpsWay_Pipeliner</module>
|
131 |
-
<frontName>pipeliner</frontName>
|
132 |
-
</args>
|
133 |
-
</pipeliner>
|
134 |
-
</routers>
|
135 |
-
</frontend>
|
136 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/OpsWay/Pipeliner/sql/add_customer_attribute/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
/* @var $installer Mage_Customer_Model_Entity_Setup */
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->addAttribute("customer", "pipeliner_api_id", array(
|
8 |
+
"type" => "text",
|
9 |
+
"backend" => "",
|
10 |
+
"label" => "Pipeliner ID",
|
11 |
+
"input" => "text",
|
12 |
+
"source" => "eav/entity_attribute_source_text",
|
13 |
+
"visible" => true,
|
14 |
+
"required" => false,
|
15 |
+
"default" => "",
|
16 |
+
"frontend" => "",
|
17 |
+
"unique" => false,
|
18 |
+
"note" => ""
|
19 |
+
|
20 |
+
));
|
21 |
+
|
22 |
+
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "pipeliner_api_id");
|
23 |
+
|
24 |
+
$used_in_forms=array();
|
25 |
+
|
26 |
+
$used_in_forms[]="adminhtml_customer";
|
27 |
+
$attribute->setData("used_in_forms", $used_in_forms)
|
28 |
+
->setData("is_used_for_customer_segment", true)
|
29 |
+
->setData("is_system", 0)
|
30 |
+
->setData("is_user_defined", 1)
|
31 |
+
->setData("is_visible", 1)
|
32 |
+
->setData("sort_order", 100)
|
33 |
+
;
|
34 |
+
$attribute->save();
|
35 |
+
|
36 |
+
|
37 |
+
$installer->endSetup();
|
package.xml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<package><name>opswaypipeliner</name><version>1.0.
|
3 |
<br /><br />
|
4 |
Visualize your sales pipeline and gain actionable insights. Open your Pipeliner CRM and get an instantly readable graphical overview of all your opportunities in the context of your sales process. A visually rich, uncluttered model of your actual sales pipeline acts as your interface. It’s real-time sales data, organized so you can always remain focused on revenue targets.<br /><br />
|
5 |
Highlights:<br />
|
@@ -48,4 +48,4 @@ Highlights:<br />
|
|
48 |
Sales teams see value and adopt enthusiastically<br />
|
49 |
Training in hours with low learning curve<br />
|
50 |
Low monthly fee and no hidden costs<br />
|
51 |
-
30-day trial with no strings attached, no credit card required<br /></description><notes>First release.</notes><authors><author><name>OpsWay</name><user>opsway</user><email>support@opsway.com</email></author></authors><date>2015-
|
1 |
<?xml version="1.0"?>
|
2 |
+
<package><name>opswaypipeliner</name><version>1.0.4</version><stability>stable</stability><license>GPL</license><channel>community</channel><extends></extends><summary>Extension allow synchronizing data bidirectional between Magento stores and PipelinerCRM system. </summary><description>Why Pipeliner CRM? Because Seeing Is Believing
|
3 |
<br /><br />
|
4 |
Visualize your sales pipeline and gain actionable insights. Open your Pipeliner CRM and get an instantly readable graphical overview of all your opportunities in the context of your sales process. A visually rich, uncluttered model of your actual sales pipeline acts as your interface. It’s real-time sales data, organized so you can always remain focused on revenue targets.<br /><br />
|
5 |
Highlights:<br />
|
48 |
Sales teams see value and adopt enthusiastically<br />
|
49 |
Training in hours with low learning curve<br />
|
50 |
Low monthly fee and no hidden costs<br />
|
51 |
+
30-day trial with no strings attached, no credit card required<br /></description><notes>First release.</notes><authors><author><name>OpsWay</name><user>opsway</user><email>support@opsway.com</email></author></authors><date>2015-06-09</date><time>14:22:59</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="OpsWay"><dir name="Pipeliner"><dir name="Model"><file name="Observer.php" hash="fb8aaccd9b516de9b8a18c41e30ec755"/></dir><dir name="Block"><dir name="Adminhtml"><file name="Info.php" hash="28c5df48aa8bb0d810cecf0b2b354a38"/></dir></dir><dir name="sql"><dir name="add_customer_attribute"><file name="mysql4-install-0.1.0.php" hash="f285e7c298ad1da65626b0ab66dd180d"/></dir><dir name="add_category_attribute"><file name="mysql4-install-0.1.0.php" hash="3e10b5d23b9be7a8376b81e06de9f4e3"/></dir><dir name="add_product_attribute"><file name="mysql4-install-0.1.0.php" hash="ce57114b907ec036fb77966adc94dbdb"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="40c46162a55bd94e0eb89887454c074f"/><file name="config.xml" hash="58b53097e394f240ea735c29da7fbd87"/><file name="system.xml" hash="82a4d7cfa5e11e1e044938d92dc0beaf"/></dir><dir name="Helper"><file name="Data.php" hash="c823691777c829a34a854300746c9a65"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Opsway_Pipeliner.xml" hash="43f8f455cec48bcbbba4f3bf57bd817b"/></dir></dir></dir><dir name="lib"><dir name="PipelinerSales"><file name="Defaults.php" hash="795a176bb235f06d3448f6b9c6c3770c"/><file name="Entity.php" hash="5522df47ab3789ac5c482153955c0846"/><file name="EntityCollection.php" hash="aa2ed3ae72b6070d80b79aca53b3a4ea"/><file name="EntityCollectionIterator.php" hash="0d9b207d7d3ec116b921d0d1caea4a0a"/><file name="InfoMethodsInterface.php" hash="f818ac50b3db96181e5de6f1fb38b5ef"/><file name="PipelinerClient.php" hash="15aec4048b43abef79bc549a850c8c21"/><file name="PipelinerClientException.php" hash="c7e0a501301d601ffc65be53fd77ba87"/><dir name="Http"><file name="CreatedResponse.php" hash="5b756f254ca570eec533b6582e9e7714"/><file name="CurlHttpClient.php" hash="bc9c2d00e16c62d37b2a9e07bab32abd"/><file name="HttpInterface.php" hash="6da80eac3ec77abd4ba380906118e755"/><file name="PipelinerHttpException.php" hash="2267d7448b8215f15db84a8ec630a17f"/><file name="Response.php" hash="945a5eb498e10c7db56792bba4def283"/></dir><dir name="Model"><file name="Version.php" hash="e7568bfd273ce4a3ee72b52d26257ed5"/></dir><dir name="Repository"><file name="RepositoryFactoryInterface.php" hash="ac965687e601d9c69124d96c299517b5"/><file name="RepositoryInterface.php" hash="65aa4dab5594b59972cd9577ae3455cb"/><dir name="Rest"><file name="RestCreatedResponse.php" hash="ddd5f97b0d4e32d192aa3f9d4e31c3d2"/><file name="RestInfoMethods.php" hash="714f1f5f0a89fec7784aac2bdaef6ef8"/><file name="RestRepository.php" hash="c21909d5078d910cb6344daae7d87187"/><file name="RestRepositoryFactory.php" hash="2862f4b0c21b21eebe8b571427372017"/></dir></dir><dir name="Query"><file name="Criteria.php" hash="2d2f2defca5480895c79352fb31dc0a3"/><file name="Filter.php" hash="b240a1be7244431fb5939a777c55c27d"/><file name="Sort.php" hash="c1ab4109a461427cd016866472989bc4"/></dir></dir></dir></target></contents></package>
|