Version Notes
Better Support for grouped products
Download this release
Release Info
Developer | Simon Cooper |
Extension | Swift_Swiftplugin |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.16 to 1.2.0
app/code/community/Swift/Swiftplugin/Model/XmlProduct.php
CHANGED
@@ -31,7 +31,23 @@ class Swift_Swiftplugin_Model_XmlProduct {
|
|
31 |
$tempXml[] = xml::title(htmlspecialchars($product->getName(), ENT_QUOTES));
|
32 |
$tempXml[] = xml::description(htmlspecialchars($product->getDescription(), ENT_QUOTES));
|
33 |
$tempXml[] = xml::short_description(htmlspecialchars($product->getShortDescription(), ENT_QUOTES));
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
$method = 'g:image_link';
|
36 |
$tempXml[] = xml::$method($product->getImage() == 'no_selection' ? '' : Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage()));
|
37 |
$method = 'g:small_image_link';
|
31 |
$tempXml[] = xml::title(htmlspecialchars($product->getName(), ENT_QUOTES));
|
32 |
$tempXml[] = xml::description(htmlspecialchars($product->getDescription(), ENT_QUOTES));
|
33 |
$tempXml[] = xml::short_description(htmlspecialchars($product->getShortDescription(), ENT_QUOTES));
|
34 |
+
|
35 |
+
$parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product->getId());
|
36 |
+
|
37 |
+
if (!empty($parentIds)) {
|
38 |
+
|
39 |
+
foreach($parentIds as $parentId) {
|
40 |
+
$groupProduct = Mage::getModel('catalog/product')->load($parentId);
|
41 |
+
$groupPath = $groupProduct->getProductUrl();
|
42 |
+
$tempXml[] = xml::link($groupPath);
|
43 |
+
break;
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
47 |
+
else {
|
48 |
+
$tempXml[] = xml::link($product->getProductUrl());
|
49 |
+
}
|
50 |
+
|
51 |
$method = 'g:image_link';
|
52 |
$tempXml[] = xml::$method($product->getImage() == 'no_selection' ? '' : Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage()));
|
53 |
$method = 'g:small_image_link';
|
app/code/community/Swift/Swiftplugin/etc/config.xml
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
<modules>
|
6 |
<!-- This must exactly match the namespace and module's folder names, with directory separators replaced by underscores -->
|
7 |
<Swift_Swiftplugin>
|
8 |
-
<version>1.
|
9 |
</Swift_Swiftplugin>
|
10 |
</modules>
|
11 |
<!-- Configure our module's behavior in the frontend scope -->
|
5 |
<modules>
|
6 |
<!-- This must exactly match the namespace and module's folder names, with directory separators replaced by underscores -->
|
7 |
<Swift_Swiftplugin>
|
8 |
+
<version>1.2.0</version>
|
9 |
</Swift_Swiftplugin>
|
10 |
</modules>
|
11 |
<!-- Configure our module's behavior in the frontend scope -->
|
lib/SwiftAPI/doc/SwiftAPI-Specification.html
CHANGED
@@ -35,7 +35,7 @@
|
|
35 |
<h1>SwiftAPI Specification</h1>
|
36 |
|
37 |
<h2>Version</h2>
|
38 |
-
<p>
|
39 |
|
40 |
<h2>Overview</h2>
|
41 |
<p>This document details the operations, transfer method, fields, and encryption scheme used to implement the SwiftAPI.</p>
|
@@ -79,12 +79,20 @@
|
|
79 |
</tr>
|
80 |
<tr>
|
81 |
<td>sendmail</td>
|
82 |
-
<td>The Swift system has generated an email to be sent by a clients site.</td>
|
83 |
</tr>
|
84 |
<tr>
|
85 |
<td>unsubscribe</td>
|
86 |
<td>A user unsubscribes from the Swift system.</td>
|
87 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
</tbody>
|
89 |
</table>
|
90 |
|
@@ -214,6 +222,34 @@
|
|
214 |
<td></td>
|
215 |
<td>Message content for a swift email.</td>
|
216 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
</tbody>
|
218 |
</table>
|
219 |
|
@@ -244,6 +280,39 @@
|
|
244 |
</tr>
|
245 |
</tbody>
|
246 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
</body>
|
249 |
|
35 |
<h1>SwiftAPI Specification</h1>
|
36 |
|
37 |
<h2>Version</h2>
|
38 |
+
<p>3</p>
|
39 |
|
40 |
<h2>Overview</h2>
|
41 |
<p>This document details the operations, transfer method, fields, and encryption scheme used to implement the SwiftAPI.</p>
|
79 |
</tr>
|
80 |
<tr>
|
81 |
<td>sendmail</td>
|
82 |
+
<td>The Swift system has generated an email to be sent by a clients site. <strong>Not</strong> for sending to the swift system, this is what is sent to the clients website.</td>
|
83 |
</tr>
|
84 |
<tr>
|
85 |
<td>unsubscribe</td>
|
86 |
<td>A user unsubscribes from the Swift system.</td>
|
87 |
</tr>
|
88 |
+
<tr>
|
89 |
+
<td>ping</td>
|
90 |
+
<td>To confirm to the Swift system the plugin is sending data.</td>
|
91 |
+
</tr>
|
92 |
+
<tr>
|
93 |
+
<td>emailpackage</td>
|
94 |
+
<td>Packages a group of emails to send to the clients website. <strong>Not</strong> for sending to the swift system, this is what is sent to the clients website.</td>
|
95 |
+
</tr>
|
96 |
</tbody>
|
97 |
</table>
|
98 |
|
222 |
<td></td>
|
223 |
<td>Message content for a swift email.</td>
|
224 |
</tr>
|
225 |
+
<tr>
|
226 |
+
<td>key</td>
|
227 |
+
<td>String</td>
|
228 |
+
<td>ping</td>
|
229 |
+
<td></td>
|
230 |
+
<td>The Swift system key recieved upon registration.</td>
|
231 |
+
</tr>
|
232 |
+
<tr>
|
233 |
+
<td>monitor</td>
|
234 |
+
<td>Boolean</td>
|
235 |
+
<td>sendmail</td>
|
236 |
+
<td></td>
|
237 |
+
<td>A flag to indicate an email is being monitored.</td>
|
238 |
+
</tr>
|
239 |
+
<tr>
|
240 |
+
<td>emailId</td>
|
241 |
+
<td>String</td>
|
242 |
+
<td>sendmail, viewmail</td>
|
243 |
+
<td></td>
|
244 |
+
<td>A unique identifier from Swift system for logging.</td>
|
245 |
+
</tr>
|
246 |
+
<tr>
|
247 |
+
<td>emailPackage</td>
|
248 |
+
<td>Array</td>
|
249 |
+
<td>emailpackage</td>
|
250 |
+
<td></td>
|
251 |
+
<td>An array of JSON objects containing the fields sendmail required fields</td>
|
252 |
+
</tr>
|
253 |
</tbody>
|
254 |
</table>
|
255 |
|
280 |
</tr>
|
281 |
</tbody>
|
282 |
</table>
|
283 |
+
|
284 |
+
<h2>Transfer Methods</h2>
|
285 |
+
<p>You can send the data string across different transfer methods such as SOAP. Here is an example request via JS:</p>
|
286 |
+
<pre><script language="javascript" type="text/javascript">
|
287 |
+
window.onload = function()
|
288 |
+
{
|
289 |
+
// notice the version, domain and data attributes in the request
|
290 |
+
var query = "version=3&domain=test_magento.clients.netready.biz&data=ypyiyeQE8Ve3FGNySm9YQ2t%2BGFOnwzPrs3Eh%2Bo9bAu9BgnNVqEPSU%2FGt1CwwvV6WdezRSm%2FKp2OK7nt95A1oYLkIt7LPdA0mX%2F2pucHHoiriBtdL%2F4lAk%2BdE4T0i7VcXb4OKZWMczv7n2%2FMygvBD03w%2F1kVNFHWAlQGhDYP5fDg16%2FhKGHB6jUdRTfUavWR7GG8jIv2obzLZs%2FXVoO%2BSFyB6Q%2FGNJ1hNZBgkqb6Zq7%2ByyjpcVc20s%2FB1%2BmUPOqHPTklu6GINtwsxq4tFANU7OHL10nS8fcYVUuDAOfav98o%3D";
|
291 |
+
var http;
|
292 |
+
|
293 |
+
// IE7+, Firefox, Chrome, Opera, Safari.
|
294 |
+
if(window.XMLHttpRequest)
|
295 |
+
http=new XMLHttpRequest();
|
296 |
+
|
297 |
+
// IE6, IE5.
|
298 |
+
else
|
299 |
+
http=new ActiveXObject("Microsoft.XMLHTTP");
|
300 |
+
|
301 |
+
http.open("POST","//api.swiftcrm.net", true);
|
302 |
+
|
303 |
+
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
304 |
+
http.setRequestHeader("Content-length", query.length);
|
305 |
+
http.setRequestHeader("Connection", "close");
|
306 |
+
|
307 |
+
http.onreadystatechange= function()
|
308 |
+
{
|
309 |
+
if (http.readyState==4 && http.status==200)
|
310 |
+
console.log("success");
|
311 |
+
}
|
312 |
+
|
313 |
+
http.send(query);
|
314 |
+
}
|
315 |
+
</script></pre>
|
316 |
|
317 |
</body>
|
318 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Swift_Swiftplugin</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/LGPL-3.0">LGPL</license>
|
7 |
<channel>community</channel>
|
@@ -18,11 +18,11 @@ The extension uses background JavaScript calls to collect and store the customer
|
|
18 |
<p>
|
19 |
The extension is easy to set up and uses Magento’s built in features to collect information and send emails to the customers. Visit swiftcrm.net for prices and free trails.
|
20 |
</p></description>
|
21 |
-
<notes>
|
22 |
<authors><author><name>Simon Cooper</name><user>Netready</user><email>simon@netready.biz</email></author></authors>
|
23 |
-
<date>2015-12-
|
24 |
-
<time>
|
25 |
-
<contents><target name="magelib"><dir name="libXML"><file name="xml.php" hash="fc4d7c79c7b7ea2ac75f28c008cde8eb"/></dir><dir name="SwiftAPI"><file name="SwiftAPI.php" hash="1a2b4e86947847e5e524a1c53054f79e"/><file name="SwiftAPI_Exception.php" hash="879b899a7961f4de1212b7296ccafb16"/><file name="SwiftAPI_Product.php" hash="063922cccb485d81c6022de5c4e8e044"/><file name="SwiftAPI_Request.php" hash="da10370a1c8d9c1a8b5d4b1d3840d3b6"/><file name="SwiftAPI_Request_Cart.php" hash="f8955c78200ddb0512adb5214fd64bb2"/><file name="SwiftAPI_Request_EmailPackage.php" hash="221dd4bd936f022a9e07ad79d33c89a2"/><file name="SwiftAPI_Request_Home.php" hash="9268da121dd10db50d5c2675afd1c65e"/><file name="SwiftAPI_Request_Order.php" hash="cd8ce90614468bd4347df3c541482a4b"/><file name="SwiftAPI_Request_OrderPackage.php" hash="91724705e976182c0bb1d7d7d6fc786f"/><file name="SwiftAPI_Request_PastOrder.php" hash="be620e2e35d6634e6a616431f5312527"/><file name="SwiftAPI_Request_Ping.php" hash="e5e13b71682f8230711d5d2f28f9a534"/><file name="SwiftAPI_Request_Product.php" hash="e5fab27bb2dd45946ed8c143a18fe3c4"/><file name="SwiftAPI_Request_SendMail.php" hash="ba04382a3df6b3e179aed5fe3e809de7"/><file name="SwiftAPI_Request_Subscription.php" hash="5545738b941d8ca4dca69b6059a0cce4"/><file name="SwiftAPI_Request_Unsubscribe.php" hash="78aa37cc0ecb98d501674350a4a409c9"/><file name="SwiftAPI_Request_ViewMail.php" hash="773f0cc695838654b9056269622c217e"/><dir name="doc"><file name="SwiftAPI-Specification.html" hash="
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php><extension><name>mcrypt</name><min/><max/></extension></required></dependencies>
|
28 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Swift_Swiftplugin</name>
|
4 |
+
<version>1.2.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/LGPL-3.0">LGPL</license>
|
7 |
<channel>community</channel>
|
18 |
<p>
|
19 |
The extension is easy to set up and uses Magento’s built in features to collect information and send emails to the customers. Visit swiftcrm.net for prices and free trails.
|
20 |
</p></description>
|
21 |
+
<notes>Better Support for grouped products</notes>
|
22 |
<authors><author><name>Simon Cooper</name><user>Netready</user><email>simon@netready.biz</email></author></authors>
|
23 |
+
<date>2015-12-14</date>
|
24 |
+
<time>12:12:01</time>
|
25 |
+
<contents><target name="magelib"><dir name="libXML"><file name="xml.php" hash="fc4d7c79c7b7ea2ac75f28c008cde8eb"/></dir><dir name="SwiftAPI"><file name="SwiftAPI.php" hash="1a2b4e86947847e5e524a1c53054f79e"/><file name="SwiftAPI_Exception.php" hash="879b899a7961f4de1212b7296ccafb16"/><file name="SwiftAPI_Product.php" hash="063922cccb485d81c6022de5c4e8e044"/><file name="SwiftAPI_Request.php" hash="da10370a1c8d9c1a8b5d4b1d3840d3b6"/><file name="SwiftAPI_Request_Cart.php" hash="f8955c78200ddb0512adb5214fd64bb2"/><file name="SwiftAPI_Request_EmailPackage.php" hash="221dd4bd936f022a9e07ad79d33c89a2"/><file name="SwiftAPI_Request_Home.php" hash="9268da121dd10db50d5c2675afd1c65e"/><file name="SwiftAPI_Request_Order.php" hash="cd8ce90614468bd4347df3c541482a4b"/><file name="SwiftAPI_Request_OrderPackage.php" hash="91724705e976182c0bb1d7d7d6fc786f"/><file name="SwiftAPI_Request_PastOrder.php" hash="be620e2e35d6634e6a616431f5312527"/><file name="SwiftAPI_Request_Ping.php" hash="e5e13b71682f8230711d5d2f28f9a534"/><file name="SwiftAPI_Request_Product.php" hash="e5fab27bb2dd45946ed8c143a18fe3c4"/><file name="SwiftAPI_Request_SendMail.php" hash="ba04382a3df6b3e179aed5fe3e809de7"/><file name="SwiftAPI_Request_Subscription.php" hash="5545738b941d8ca4dca69b6059a0cce4"/><file name="SwiftAPI_Request_Unsubscribe.php" hash="78aa37cc0ecb98d501674350a4a409c9"/><file name="SwiftAPI_Request_ViewMail.php" hash="773f0cc695838654b9056269622c217e"/><dir name="doc"><file name="SwiftAPI-Specification.html" hash="3be495e89f1555d138a9314052e2c627"/></dir><file name="index.php" hash="82886bb98883bd5868ea04c7d8c88ba5"/><file name="php.ini" hash="ef29c923925a1d1bbc8879c22297daa4"/></dir></target><target name="magecommunity"><dir name="Swift"><dir name="Swiftplugin"><dir name="Block"><dir name="Adminhtml"><dir name="Swift"><dir name="Edit"><file name="Form.php" hash="bd80ab8170f7f2286f13ac579e5249d9"/><dir name="Tab"><file name="Form.php" hash="3d15c45cb2205acabc20376f41a9bd5b"/><file name="Instruct.php" hash="9f34075cc9cdfa92b7876c33fda514de"/></dir><file name="Tabs.php" hash="993769f682fad7d28df79ff3acea97cc"/></dir><file name="Edit.php" hash="d93f75dbaaa7266d91e828b3208fbf2d"/></dir></dir><file name="Swiftblock.php" hash="ef4796eaf44aa8e4a9b144e5a9365166"/></dir><dir name="Helper"><file name="Data.php" hash="cad7e7ffcde09cdd3c089b42644e9d66"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Swift"><file name="Collection.php" hash="82de0fe56cd875d3e78c8fc690424ee1"/></dir><file name="Swift.php" hash="252d5f2ecb1119804b415758d2db6800"/></dir><file name="Observer.php" hash="139db0541de06e7bed17ad9d40fcd89b"/><file name="Swift.php" hash="1f9e49d4db7f8987cfd8858061fedc6a"/><file name="XmlProduct.php" hash="faff32df8a990752c10eb1e6e2a1de00"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="0d17d7a4d18d3a77fd1af945d016da74"/></dir><file name="IndexController.php" hash="e3b7ebb44a55187c9085d9f1c4e7d060"/><file name="MailController.php" hash="af10fe5d485b1742ba5095510f2deea4"/><file name="XmlController.php" hash="97b777935db5174501034493dd561099"/></dir><dir name="etc"><file name="config.xml" hash="3b90e1de89b1c2e294c8e4e5d2c117a6"/></dir><dir name="sql"><dir name="swift_setup"><file name="install-1.1.13.php" hash="2447b5645fc36738373678473cec88dc"/><file name="install-1.1.2.php" hash="00832a00c34cb4c997a96330cb28cbfb"/><file name="upgrade-1.1.2-1.1.12.php" hash="cbe3c3fa07facb7b720d7dd518acbeca"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="swift.xml" hash="d80a5229e30cf4b76f5a5150ac1c27c3"/></dir><dir name="template"><dir name="swift"><file name="swiftplugin.phtml" hash="d4d25148e09529e457b6436d7655627b"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Swift_all.xml" hash="0ae5a788c805a9fc79b402fe7a02e54d"/></dir></target></contents>
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php><extension><name>mcrypt</name><min/><max/></extension></required></dependencies>
|
28 |
</package>
|