Version Notes
The extension integrates your store with Quartic platform.
Download this release
Release Info
Developer | QuarticON |
Extension | Quarticon_Quartic |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
app/code/community/Quarticon/Quartic/Model/Observer/Adminhtml.php
CHANGED
@@ -5,6 +5,7 @@ class Quarticon_Quartic_Model_Observer_Adminhtml
|
|
5 |
|
6 |
/**
|
7 |
* Verify api keys entered by user
|
|
|
8 |
*
|
9 |
* @param Varien_Event_Observer $observer
|
10 |
* @throws Mage_Core_Exception
|
@@ -59,14 +60,16 @@ class Quarticon_Quartic_Model_Observer_Adminhtml
|
|
59 |
$config->saveConfig('quartic/config/status', (int) $status, 'default', 0);
|
60 |
$cache->cleanType('config');
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
/**
|
63 |
* Registration
|
64 |
-
* Catalogs
|
65 |
*/
|
66 |
if ($status) {
|
67 |
-
/**
|
68 |
-
* Registration
|
69 |
-
*/
|
70 |
$registered = Mage::getStoreConfig("quartic/config/registered/c_{$status_array['customer']}", $observer->getStore());
|
71 |
if (empty($registered)) {
|
72 |
try {
|
@@ -82,9 +85,11 @@ class Quarticon_Quartic_Model_Observer_Adminhtml
|
|
82 |
$helper->log("Quartic activation failed: " . $e->getMessage());
|
83 |
}
|
84 |
}
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
88 |
$catalog_id = isset($status_array['catalog_id']) ? (int) $status_array['catalog_id'] : 0;
|
89 |
if ($catalog_id > 0) {
|
90 |
/**
|
@@ -116,4 +121,50 @@ class Quarticon_Quartic_Model_Observer_Adminhtml
|
|
116 |
}
|
117 |
}
|
118 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
5 |
|
6 |
/**
|
7 |
* Verify api keys entered by user
|
8 |
+
* Run after configuration is saved
|
9 |
*
|
10 |
* @param Varien_Event_Observer $observer
|
11 |
* @throws Mage_Core_Exception
|
60 |
$config->saveConfig('quartic/config/status', (int) $status, 'default', 0);
|
61 |
$cache->cleanType('config');
|
62 |
|
63 |
+
if ($status) {
|
64 |
+
$cleared = $this->markRegistered($observer, $status_array['customer']);
|
65 |
+
} else {
|
66 |
+
$cleared = false;
|
67 |
+
}
|
68 |
+
|
69 |
/**
|
70 |
* Registration
|
|
|
71 |
*/
|
72 |
if ($status) {
|
|
|
|
|
|
|
73 |
$registered = Mage::getStoreConfig("quartic/config/registered/c_{$status_array['customer']}", $observer->getStore());
|
74 |
if (empty($registered)) {
|
75 |
try {
|
85 |
$helper->log("Quartic activation failed: " . $e->getMessage());
|
86 |
}
|
87 |
}
|
88 |
+
}
|
89 |
+
/**
|
90 |
+
* Catalogs
|
91 |
+
*/
|
92 |
+
if ($status && !$cleared) {
|
93 |
$catalog_id = isset($status_array['catalog_id']) ? (int) $status_array['catalog_id'] : 0;
|
94 |
if ($catalog_id > 0) {
|
95 |
/**
|
121 |
}
|
122 |
}
|
123 |
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
*
|
127 |
+
* @param Varien_Event_Observer $observer
|
128 |
+
* @param string $qcustomer QON account login
|
129 |
+
* @return boolean True if data was cleared
|
130 |
+
*/
|
131 |
+
public function markRegistered(Varien_Event_Observer $observer, $qcustomer)
|
132 |
+
{
|
133 |
+
$registered = Mage::getStoreConfig("quartic/config/registered/current", $observer->getStore());
|
134 |
+
$cache = Mage::app()->getCacheInstance();
|
135 |
+
/* @var $api Mage_Core_Model_Config */
|
136 |
+
$config = Mage::getModel('core/config');
|
137 |
+
/**
|
138 |
+
* First login - save id
|
139 |
+
*/
|
140 |
+
if (empty($registered)) {
|
141 |
+
$config->saveConfig('quartic/config/registered/current', $qcustomer);
|
142 |
+
return false;
|
143 |
+
}
|
144 |
+
/*
|
145 |
+
* Changed accounts - clean previous data
|
146 |
+
*/
|
147 |
+
if ($registered !== $qcustomer) {
|
148 |
+
/**
|
149 |
+
* Remove frames
|
150 |
+
*/
|
151 |
+
$frames = Mage::getModel('quartic/placement');
|
152 |
+
$collection = $frames->getCollection();
|
153 |
+
foreach ($collection as $item) {
|
154 |
+
$item->delete();
|
155 |
+
}
|
156 |
+
|
157 |
+
$config->deleteConfig('quartic/config/modified_placements');
|
158 |
+
$config->deleteConfig('quartic/config/catalog_id');
|
159 |
+
$config->deleteConfig('quartic/frames_homepage');
|
160 |
+
$config->deleteConfig('quartic/frames_category');
|
161 |
+
$config->deleteConfig('quartic/frames_product');
|
162 |
+
$config->deleteConfig('quartic/frames_cart');
|
163 |
+
|
164 |
+
$config->saveConfig('quartic/config/registered/current', $qcustomer);
|
165 |
+
|
166 |
+
$cache->cleanType('config');
|
167 |
+
return true;
|
168 |
+
}
|
169 |
+
}
|
170 |
}
|
app/code/community/Quarticon/Quartic/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Quarticon_Quartic>
|
5 |
-
<version>1.0.
|
6 |
</Quarticon_Quartic>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Quarticon_Quartic>
|
5 |
+
<version>1.0.1</version>
|
6 |
</Quarticon_Quartic>
|
7 |
</modules>
|
8 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Quarticon_Quartic</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Recommend - personalized product recommendations, by QuarticON.com</description>
|
11 |
<notes>The extension integrates your store with Quartic platform.</notes>
|
12 |
<authors><author><name>QuarticON</name><user>quarticon</user><email>contact@quarticon.com</email></author></authors>
|
13 |
-
<date>2015-09-
|
14 |
-
<time>08:
|
15 |
-
<contents><target name="magecommunity"><dir name="Quarticon"><dir name="Quartic"><dir name="Block"><dir name="Adminhtml"><dir name="Api"><file name="Dump.php" hash="6d90575698aeb92c20b7ba8db38fd8d4"/></dir><dir name="History"><file name="Grid.php" hash="a32fe8ab7e02f309ca99b42f18af803b"/></dir><file name="History.php" hash="6d552d7d7a7f404b4ed5a816977b2dc8"/><dir name="Maps"><file name="Grid.php" hash="8fb73376bba86e8b871ae17f18769048"/><dir name="Renderer"><file name="Input.php" hash="a209bbe5b71291c1b3f5f5994fbf5e2f"/><file name="Select.php" hash="0318c06d7f4b62c11800b4ffe4aa62bc"/></dir></dir><file name="Maps.php" hash="9744bd8300dac3e98d089ecf70faa6a2"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Button.php" hash="454ff258a431421b90ebe97e4e94e79f"/><file name="Placement.php" hash="5d2971165f5976e3a5aaeae7ea966272"/><file name="Register.php" hash="3098ec89d046749ec94aae5fe7b74b49"/><file name="Text.php" hash="65614b678c479b7f02d6ce4f54197946"/></dir><file name="Fieldset.php" hash="29fc8b5212bd5d2c825b55beb9e08dd0"/></dir></dir></dir><dir name="Urls"><file name="Grid.php" hash="e104ebebd5ce12f49b1003068f6c40a7"/></dir><file name="Urls.php" hash="6e4bb1a3dbb25174cd9f7226a7eb3e2a"/></dir><file name="Box.php" hash="67ddbd72ae1c06dfa307bd8d6c00ae4f"/><dir name="Frame"><file name="Cart.php" hash="438a729fe07cc629693f06abe431dff3"/><file name="Category.php" hash="068d3d1062c005482bdbed623d6cf136"/><file name="Home.php" hash="475eae5b390abc205ec9a65a0d8c13ad"/><file name="Product.php" hash="e0854d2407b9048758e47e1dd7d70d94"/></dir><dir name="Getter"><file name="Order.php" hash="0c13b0eb560fb95e1e73d5fd9689f8b4"/><file name="Product.php" hash="b267c9dbecea690be8aa3d028ce38d75"/></dir><file name="Products.php" hash="282af5d3242c8f13d90dfc19067fc2f7"/><file name="Script.php" hash="4e1173d214e331e68db7f8b3313d4ad6"/></dir><dir name="Helper"><file name="Data.php" hash="5ddf57e608f89502a1c396f40cdbae66"/></dir><dir name="Model"><dir name="Adapter"><file name="Writer.php" hash="66e2f2649ac3ec3f8e8878a3e595ce3c"/></dir><file name="Attribute.php" hash="0e2918e9bb12bae57b63b67b7b048f49"/><file name="Catalog.php" hash="ecac4373f1ad0eeae9dda1baf63f4d04"/><dir name="Client"><file name="AbstractCurl.php" hash="1d8ff89d63b9cacfd836326e1b035f71"/><file name="Api.php" hash="19f29aa6baa6a3f46257bd669eb2fce5"/><dir name="Resource"><file name="Curl.php" hash="07924c032361218ebf4390a61442c30f"/></dir></dir><file name="Config.php" hash="50f6bc4e995e15620342ef25e2de7044"/><file name="Frame.php" hash="d8ab732975d1c13729442a207c4d267c"/><file name="History.php" hash="451b494fdd77277b235d2a0d52fcc99c"/><dir name="Insert"><file name="Cart.php" hash="c668360217730c627875560add9ad033"/><file name="Category.php" hash="313ec107fd93bbf07ad40cf754c97197"/><file name="Home.php" hash="ad89be2ba8cdd83827d9d261c056620e"/><file name="Product.php" hash="8d4609828965cc210b83094c157af22d"/></dir><file name="Insert.php" hash="403632649d243b95708f4b3c29f52e23"/><file name="Maps.php" hash="772431aac9f57decc072c91f580ec3f3"/><dir name="Mysql4"><dir name="History"><file name="Collection.php" hash="16c997ad5b0206b64392d64d9986fb40"/></dir><file name="History.php" hash="10ff5200887a7c12cb9b0312acc3a4c5"/><dir name="Maps"><file name="Collection.php" hash="e5a6067327d75240ccf42fc5397332bf"/></dir><file name="Maps.php" hash="bd3dc9f67a482c2f475c1d651abd274a"/><dir name="Placement"><file name="Collection.php" hash="95ac7e3641bb395b3c518b56b85a4985"/></dir><file name="Placement.php" hash="cfaf72514c2cebc604bb14bd79966989"/></dir><dir name="Observer"><file name="Adminhtml.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Quarticon_Quartic</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Recommend - personalized product recommendations, by QuarticON.com</description>
|
11 |
<notes>The extension integrates your store with Quartic platform.</notes>
|
12 |
<authors><author><name>QuarticON</name><user>quarticon</user><email>contact@quarticon.com</email></author></authors>
|
13 |
+
<date>2015-09-21</date>
|
14 |
+
<time>08:15:25</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Quarticon"><dir name="Quartic"><dir name="Block"><dir name="Adminhtml"><dir name="Api"><file name="Dump.php" hash="6d90575698aeb92c20b7ba8db38fd8d4"/></dir><dir name="History"><file name="Grid.php" hash="a32fe8ab7e02f309ca99b42f18af803b"/></dir><file name="History.php" hash="6d552d7d7a7f404b4ed5a816977b2dc8"/><dir name="Maps"><file name="Grid.php" hash="8fb73376bba86e8b871ae17f18769048"/><dir name="Renderer"><file name="Input.php" hash="a209bbe5b71291c1b3f5f5994fbf5e2f"/><file name="Select.php" hash="0318c06d7f4b62c11800b4ffe4aa62bc"/></dir></dir><file name="Maps.php" hash="9744bd8300dac3e98d089ecf70faa6a2"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Button.php" hash="454ff258a431421b90ebe97e4e94e79f"/><file name="Placement.php" hash="5d2971165f5976e3a5aaeae7ea966272"/><file name="Register.php" hash="3098ec89d046749ec94aae5fe7b74b49"/><file name="Text.php" hash="65614b678c479b7f02d6ce4f54197946"/></dir><file name="Fieldset.php" hash="29fc8b5212bd5d2c825b55beb9e08dd0"/></dir></dir></dir><dir name="Urls"><file name="Grid.php" hash="e104ebebd5ce12f49b1003068f6c40a7"/></dir><file name="Urls.php" hash="6e4bb1a3dbb25174cd9f7226a7eb3e2a"/></dir><file name="Box.php" hash="67ddbd72ae1c06dfa307bd8d6c00ae4f"/><dir name="Frame"><file name="Cart.php" hash="438a729fe07cc629693f06abe431dff3"/><file name="Category.php" hash="068d3d1062c005482bdbed623d6cf136"/><file name="Home.php" hash="475eae5b390abc205ec9a65a0d8c13ad"/><file name="Product.php" hash="e0854d2407b9048758e47e1dd7d70d94"/></dir><dir name="Getter"><file name="Order.php" hash="0c13b0eb560fb95e1e73d5fd9689f8b4"/><file name="Product.php" hash="b267c9dbecea690be8aa3d028ce38d75"/></dir><file name="Products.php" hash="282af5d3242c8f13d90dfc19067fc2f7"/><file name="Script.php" hash="4e1173d214e331e68db7f8b3313d4ad6"/></dir><dir name="Helper"><file name="Data.php" hash="5ddf57e608f89502a1c396f40cdbae66"/></dir><dir name="Model"><dir name="Adapter"><file name="Writer.php" hash="66e2f2649ac3ec3f8e8878a3e595ce3c"/></dir><file name="Attribute.php" hash="0e2918e9bb12bae57b63b67b7b048f49"/><file name="Catalog.php" hash="ecac4373f1ad0eeae9dda1baf63f4d04"/><dir name="Client"><file name="AbstractCurl.php" hash="1d8ff89d63b9cacfd836326e1b035f71"/><file name="Api.php" hash="19f29aa6baa6a3f46257bd669eb2fce5"/><dir name="Resource"><file name="Curl.php" hash="07924c032361218ebf4390a61442c30f"/></dir></dir><file name="Config.php" hash="50f6bc4e995e15620342ef25e2de7044"/><file name="Frame.php" hash="d8ab732975d1c13729442a207c4d267c"/><file name="History.php" hash="451b494fdd77277b235d2a0d52fcc99c"/><dir name="Insert"><file name="Cart.php" hash="c668360217730c627875560add9ad033"/><file name="Category.php" hash="313ec107fd93bbf07ad40cf754c97197"/><file name="Home.php" hash="ad89be2ba8cdd83827d9d261c056620e"/><file name="Product.php" hash="8d4609828965cc210b83094c157af22d"/></dir><file name="Insert.php" hash="403632649d243b95708f4b3c29f52e23"/><file name="Maps.php" hash="772431aac9f57decc072c91f580ec3f3"/><dir name="Mysql4"><dir name="History"><file name="Collection.php" hash="16c997ad5b0206b64392d64d9986fb40"/></dir><file name="History.php" hash="10ff5200887a7c12cb9b0312acc3a4c5"/><dir name="Maps"><file name="Collection.php" hash="e5a6067327d75240ccf42fc5397332bf"/></dir><file name="Maps.php" hash="bd3dc9f67a482c2f475c1d651abd274a"/><dir name="Placement"><file name="Collection.php" hash="95ac7e3641bb395b3c518b56b85a4985"/></dir><file name="Placement.php" hash="cfaf72514c2cebc604bb14bd79966989"/></dir><dir name="Observer"><file name="Adminhtml.php" hash="3af9ea44c9488f4c9853f54dab50c1f8"/><file name="Frontend.php" hash="ddc612ca71f1c6ddf8dd4231bd89dd2b"/></dir><file name="Order.php" hash="20318ce4b74959a8ef3f2b0f78fd223c"/><dir name="Placement"><file name="Cart.php" hash="4e26361f3d4cbd4fb34c2ba5a664c396"/><file name="Category.php" hash="dde7ef74c96447febee9e585d02ad5d6"/><file name="Home.php" hash="3615fa2153356d6f1b56140867591d26"/><file name="Product.php" hash="e8139c76f4daa8c15ea395e217c0f452"/></dir><file name="Placement.php" hash="c2fbfe8d0dcaedac50198263ef55ab88"/><file name="Product.php" hash="36464710ad25c2b968bc6947b18e883b"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ApiController.php" hash="a3fc449bbb2a6743671332000aa1c020"/><file name="IndexController.php" hash="aea543c7dc10403eac6b169034a3cee5"/><file name="MapsController.php" hash="6c8c889436b508edbe0b8bb5c2f13dfd"/></dir><file name="FeedController.php" hash="2af4425406853577c90189907fae5d3e"/><file name="FrameController.php" hash="124801d72b1190909cc3ae82a820e56c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5c26be5cd721f4556f7a7796c0fcafab"/><file name="config.xml" hash="32b37cc02c62e2a92a60725f487e0234"/><file name="system.xml" hash="67781f3123373968d14aa06f1bb7601d"/></dir><dir name="sql"><dir name="quartic_setup"><file name="mysql4-install-0.1.0.php" hash="9401ab0f64bb44fa0d83e217abc23918"/><file name="mysql4-install-0.1.4.php" hash="3275d471551e31d5ea6ee90d087f6f67"/><file name="mysql4-upgrade-0.1.0-0.1.4.php" hash="678a8b9c6ca4002cbac9b2d13dfd91ed"/><file name="mysql4-upgrade-0.1.7-0.2.0.php" hash="489a892eee6a5bc06e857f20eca2b0c7"/><file name="mysql4-upgrade-0.2.1-0.2.2.php" hash="875dcf3407f4d435d475c00b41252d32"/><file name="mysql4-upgrade-0.2.2-0.2.3.php" hash="ec71434fface0ed6389903a233d95bc8"/><file name="mysql4-upgrade-0.2.3-0.2.4.php" hash="1d89846536ca9de1be313b9db108dcb3"/><file name="mysql4-upgrade-0.2.5-0.2.6.php" hash="52db270d56fabc76c0a2aef1b85b54ac"/><file name="mysql4-upgrade-0.3.1-0.3.2.php" hash="62b390f4161ecf1309b2334bc72c9455"/><file name="mysql4-upgrade-0.3.2-0.3.3.php" hash="68ec9a49e0e6a27ee97d522010c84370"/><file name="mysql4-upgrade-0.3.3-0.3.4.php" hash="3abaa34c22ece6b6a6ae08bf1a5331f3"/><file name="mysql4-upgrade-0.3.4-0.3.5.php" hash="280b2662b37e6c6de936a388fcc7f71a"/><file name="mysql4-upgrade-0.3.5-0.3.6.php" hash="ec9bf15f7d14a85edbf1fcb6126810ef"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="quartic.xml" hash="8c068279123fb5def099e468b87ee79c"/></dir><dir name="template"><dir name="quartic"><dir name="api"><file name="dump.phtml" hash="0fa64e9c2de0698a998679e0d2b2f1eb"/></dir><file name="history.phtml" hash="fe445bb739fcad8ae688944c0188fd41"/><file name="maps.phtml" hash="8f0814d506b1ddc5248f7487e2942d17"/><dir name="system"><dir name="config"><file name="button_register.phtml" hash="f19fdea76b46c5699f1387cf462d467b"/></dir></dir><file name="urls.phtml" hash="9e851635f6c1737e5db9081baa222174"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="quartic.xml" hash="96a0f31aa65b5ea9e6f92aecb246de72"/></dir><dir name="template"><dir name="quartic"><dir name="frame"><file name="cart.phtml" hash="f7867e13e0bebd593adaab509e7bff71"/><file name="category.phtml" hash="f7867e13e0bebd593adaab509e7bff71"/><file name="home.phtml" hash="f7867e13e0bebd593adaab509e7bff71"/><file name="product.phtml" hash="43b7ffa983e9ad9324b623fce82bef6c"/></dir><dir name="getter"><file name="order.phtml" hash="2f235846a58896384fcb9c39162e5334"/><file name="product.phtml" hash="b493b7a319b7530a82962c3395706e68"/></dir><dir name="products"><file name="slt_cart.phtml" hash="b534e86c913c3e5c7a59956980055e9a"/><file name="slt_category.phtml" hash="b534e86c913c3e5c7a59956980055e9a"/><file name="slt_home.phtml" hash="b534e86c913c3e5c7a59956980055e9a"/><file name="slt_product.phtml" hash="b534e86c913c3e5c7a59956980055e9a"/></dir><file name="products.phtml" hash="2402fe0ce2153e9520a74457b5e96495"/><file name="script.phtml" hash="24e65e356b77802deef3827421cff7b8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Quarticon_Quartic.xml" hash="7b123838bd21dca630ee2c92d3ef3194"/></dir></target><target name="magelocale"><dir name="pl_PL"><file name="Quarticon_Quartic.csv" hash="fc6a23ad155bee5cc11070e9c531de59"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><file name="quarticon-icon.png" hash="75db9de222be47ea963f5432ef8b3ef3"/></dir><file name="quartic.css" hash="9fef6b352df11c73f1ea3e33041e5fa9"/></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|