Version Notes
v1.2.0
This version now has the common elements from the cross-sell, up-sell and related products extensions.
These elements are not active unless those packages are installed. So if you only have Advertise Colors, this extra code will not be used.
v1.2.1 - this version fixes the adtivation of stores upon installation.
v1.2.2 - fixes a bug in 1.2.1
v1.2.3 - makes the product id available to suggested product calls.
v1.2.4 - minor bug fix
Download this release
Release Info
Developer | Michael Oxley |
Extension | AdvertiseCommunity |
Version | 1.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.2.4
app/code/community/Advertise/Dataexport/Helper/Data.php
CHANGED
@@ -20,9 +20,15 @@ class Advertise_Dataexport_Helper_Data extends Mage_Core_Helper_Abstract
|
|
20 |
} else {
|
21 |
$basket = '';
|
22 |
}
|
23 |
-
|
24 |
-
$
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
$jsoutput = "
|
27 |
var adv_store_base_url = '".Mage::getBaseUrl()."';
|
28 |
var adv_reload = true;
|
@@ -30,9 +36,8 @@ class Advertise_Dataexport_Helper_Data extends Mage_Core_Helper_Abstract
|
|
30 |
adv_crosssell_reload = true;
|
31 |
var adv_productid = '".$prodid."';
|
32 |
var adv_bsk = '".$basket."';
|
33 |
-
var
|
34 |
";
|
35 |
-
// var cartcount = '".Mage::helper('checkout/cart')->getCart()->getItemsCount()."';
|
36 |
|
37 |
return $jsoutput;
|
38 |
}
|
@@ -73,7 +78,11 @@ class Advertise_Dataexport_Helper_Data extends Mage_Core_Helper_Abstract
|
|
73 |
|
74 |
// getAllItems OR getAllVisibleItems()
|
75 |
foreach ($session->getQuote()->getAllVisibleItems() as $item) {
|
76 |
-
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
|
79 |
if( ! empty($products)) {
|
@@ -125,6 +134,7 @@ class Advertise_Dataexport_Helper_Data extends Mage_Core_Helper_Abstract
|
|
125 |
);
|
126 |
}
|
127 |
|
|
|
128 |
function getReferrerPageProductID() {
|
129 |
$referrerPath = $_SERVER ['HTTP_REFERER'];
|
130 |
if (!strncmp($referrerPath, Mage::getBaseUrl(), strlen(Mage::getBaseUrl()))) {
|
20 |
} else {
|
21 |
$basket = '';
|
22 |
}
|
23 |
+
$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
24 |
+
if($orderId) {
|
25 |
+
//Mage::log("Got order ID: ".$orderId);
|
26 |
+
}
|
27 |
+
else {
|
28 |
+
//Mage::log("No order ID.");
|
29 |
+
$orderId = '';
|
30 |
+
}
|
31 |
+
|
32 |
$jsoutput = "
|
33 |
var adv_store_base_url = '".Mage::getBaseUrl()."';
|
34 |
var adv_reload = true;
|
36 |
adv_crosssell_reload = true;
|
37 |
var adv_productid = '".$prodid."';
|
38 |
var adv_bsk = '".$basket."';
|
39 |
+
var adv_oid = '".$orderId."';
|
40 |
";
|
|
|
41 |
|
42 |
return $jsoutput;
|
43 |
}
|
78 |
|
79 |
// getAllItems OR getAllVisibleItems()
|
80 |
foreach ($session->getQuote()->getAllVisibleItems() as $item) {
|
81 |
+
// Add multiple copies of same ID if quantity > 1
|
82 |
+
$qty = $item->getQty();
|
83 |
+
for ($i = 0; $i < $qty; $i++) {
|
84 |
+
$products[] = $item->getProductId();
|
85 |
+
}
|
86 |
}
|
87 |
|
88 |
if( ! empty($products)) {
|
134 |
);
|
135 |
}
|
136 |
|
137 |
+
// Not currently used
|
138 |
function getReferrerPageProductID() {
|
139 |
$referrerPath = $_SERVER ['HTTP_REFERER'];
|
140 |
if (!strncmp($referrerPath, Mage::getBaseUrl(), strlen(Mage::getBaseUrl()))) {
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>AdvertiseCommunity</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
@@ -26,11 +26,13 @@ v1.2.1 - this version fixes the adtivation of stores upon installation.
|
|
26 |

|
27 |
v1.2.2 - fixes a bug in 1.2.1
|
28 |

|
29 |
-
v1.2.3 - makes the product id available to suggested product calls
|
|
|
|
|
30 |
<authors><author><name>Michael Oxley</name><user>advertise</user><email>mike@adverti.se</email></author></authors>
|
31 |
-
<date>2012-
|
32 |
-
<time>
|
33 |
-
<contents><target name="mage"><dir name="lib"><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="Advertisetemplate.php" hash="93d8c1f2ace06bd46e68857b9b98ec52"/><file name="Advertiselicense.php" hash="26d50ff2d280db94e4d0eb7187376880"/></dir></dir></dir></dir></dir><dir name="app"><dir name="etc"><dir name="modules"><file name="Advertise_Account.xml" hash="2bd58af0a4999bc2fe80a1d6e8a07d57"/><file name="Advertise_Dataexport.xml" hash="85b7c6199506488967c6951b513da65e"/></dir></dir><dir name="code"><dir name="community"><dir name="Advertise"><dir name="Account"><dir name="Helper"><file name="Data.php" hash="9b22d8f7156cd9f694774d7e29e2b5a8"/></dir><dir name="Model"><file name="Account.php" hash="605e33ef9c956852cd9f0357cb10776c"/><dir name="Config"><dir name="Source"><file name="Onoff.php" hash="684e42d40da3b47053bf345f201df140"/></dir></dir><file name="Config.php" hash="ee470d4c5a46a0221456b31b85c7473c"/><file name="MyAccountModel.php" hash="d7abbf976d96028ece0331db2ba40559"/><file name="Settings.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="controllers"><file name="IndexController.php" hash="50eea849547a732c20462da19029e432"/><file name="LicenseController.php" hash="b83f323609fecefa4ff6dbab911468ce"/><file name="WebserviceController.php" hash="675d33aa04d1c01c34fdea086d73ce85"/></dir><dir name="etc"><file name="config.xml" hash="c23c07b9a4bb2e5239248dc76e9e8612"/><file name="system.xml" hash="9f8480290a07f87bb568e4b0db33a330"/></dir><dir name="sql"><dir name="advertise_setup"><file name="mysql4-install-4.0.0.php" hash="b4535b5068d6b72999c94e91d487bc62"/><file name="mysql4-install-5.0.0.php" hash="b4535b5068d6b72999c94e91d487bc62"/></dir><dir name="setup"><file name="mysql4-install-0.1.0.php" hash="452925d5182994846dbe3b9518db84d8"/></dir></dir></dir><dir name="Dataexport"><dir name="Block"><dir name="Adminhtml"><file name="Dataexportbackend.php" hash="89c075c9a224a327e1e0816ab9efeddf"/></dir><file name="Index.php" hash="e504da66a574a5df674b5d8385ce4108"/></dir><dir name="Helper"><file name="Data.php" hash="
|
34 |
<compatible/>
|
35 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
36 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>AdvertiseCommunity</name>
|
4 |
+
<version>1.2.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
26 |

|
27 |
v1.2.2 - fixes a bug in 1.2.1
|
28 |

|
29 |
+
v1.2.3 - makes the product id available to suggested product calls.
|
30 |
+

|
31 |
+
v1.2.4 - minor bug fix</notes>
|
32 |
<authors><author><name>Michael Oxley</name><user>advertise</user><email>mike@adverti.se</email></author></authors>
|
33 |
+
<date>2012-12-07</date>
|
34 |
+
<time>12:07:04</time>
|
35 |
+
<contents><target name="mage"><dir name="lib"><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="Advertisetemplate.php" hash="93d8c1f2ace06bd46e68857b9b98ec52"/><file name="Advertiselicense.php" hash="26d50ff2d280db94e4d0eb7187376880"/></dir></dir></dir></dir></dir><dir name="app"><dir name="etc"><dir name="modules"><file name="Advertise_Account.xml" hash="2bd58af0a4999bc2fe80a1d6e8a07d57"/><file name="Advertise_Dataexport.xml" hash="85b7c6199506488967c6951b513da65e"/></dir></dir><dir name="code"><dir name="community"><dir name="Advertise"><dir name="Account"><dir name="Helper"><file name="Data.php" hash="9b22d8f7156cd9f694774d7e29e2b5a8"/></dir><dir name="Model"><file name="Account.php" hash="605e33ef9c956852cd9f0357cb10776c"/><dir name="Config"><dir name="Source"><file name="Onoff.php" hash="684e42d40da3b47053bf345f201df140"/></dir></dir><file name="Config.php" hash="ee470d4c5a46a0221456b31b85c7473c"/><file name="MyAccountModel.php" hash="d7abbf976d96028ece0331db2ba40559"/><file name="Settings.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="controllers"><file name="IndexController.php" hash="50eea849547a732c20462da19029e432"/><file name="LicenseController.php" hash="b83f323609fecefa4ff6dbab911468ce"/><file name="WebserviceController.php" hash="675d33aa04d1c01c34fdea086d73ce85"/></dir><dir name="etc"><file name="config.xml" hash="c23c07b9a4bb2e5239248dc76e9e8612"/><file name="system.xml" hash="9f8480290a07f87bb568e4b0db33a330"/></dir><dir name="sql"><dir name="advertise_setup"><file name="mysql4-install-4.0.0.php" hash="b4535b5068d6b72999c94e91d487bc62"/><file name="mysql4-install-5.0.0.php" hash="b4535b5068d6b72999c94e91d487bc62"/></dir><dir name="setup"><file name="mysql4-install-0.1.0.php" hash="452925d5182994846dbe3b9518db84d8"/></dir></dir></dir><dir name="Dataexport"><dir name="Block"><dir name="Adminhtml"><file name="Dataexportbackend.php" hash="89c075c9a224a327e1e0816ab9efeddf"/></dir><file name="Index.php" hash="e504da66a574a5df674b5d8385ce4108"/></dir><dir name="Helper"><file name="Data.php" hash="85ce07bf86d4cc3115236f674648989f"/></dir><dir name="Model"><file name="Config.php" hash="abb4f8739e9fa07dbe041a0129211eb7"/><dir name="Exporter"><file name="Cart.php" hash="6164c971932885d2cafc86275a4c0649"/><file name="Customer.php" hash="e8ffc864fb2ec2757d3517d3e179c12a"/><file name="Interface.php" hash="1b311d997c503d5e6ec567f703491306"/><file name="Order.php" hash="48aef9cea01c358b81e4d8469e237169"/></dir><file name="Exporter.php" hash="3fe694e544ee2a2f4d51f07f22b57596"/><file name="Modelname.php" hash="c5d3ff7a7c9443ec43c84a8d8c07cfc1"/><dir name="Mysql4"><dir name="Modelname"><file name="Collection.php" hash="7829fb805cf36d108d97e22175419c97"/></dir><file name="Modelname.php" hash="4ffa0d7fa31b0e6544d66e41d0239410"/></dir><file name="Orderstatus.php" hash="d3f17637413ea2417a3080435215ac26"/><file name="Scheduler.php" hash="be3d416160a7b4973907ef58a42306e3"/><file name="Xmlwriter.php" hash="a86b81bcb8964935410738643de32e8f"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="DataexportbackendController.php" hash="914467bd702962ee5a082a6d1d756469"/></dir><file name="IndexController.php" hash="8be7143d4a93cd96fa37c7ae7cb735e2"/><file name="TestController.php" hash="74d89fd194029ae654a3cec3b39c9778"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e3ccc4047ca0ece4295e156e986f3019"/><file name="config.xml" hash="e3776aee6bb28d50e4baf14e5b38dc64"/><file name="system.xml" hash="61e86cd66dca0851ae203867b36e0a33"/></dir><dir name="sql"><dir name="dataexport_setup"><file name="mysql4-install-0.1.0.php" hash="b01d2c1aefe3ec69dc1799d3b682cc3b"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="dataexport.xml" hash="2da004f9cbaeee331a62b9592692e2c1"/></dir><dir name="template"><dir name="dataexport"><file name="dataexportbackend.phtml" hash="6c21dd0709ac1a09bb77f4a4ae3ff867"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="dataexport.xml" hash="5b8bdfdb430b0d0e9be0c4deb2a355a0"/></dir><dir name="template"><dir name="dataexport"><file name="index.phtml" hash="4b88ef0e0ac3d19787f9fc7b4da2e91b"/></dir></dir></dir></dir></dir></dir></dir><dir name="var"><dir name="advertisedata"><file name="empty.file" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="generate_1353339590.xml" hash="d7b79189c377d84276684d7b1136816b"/></dir></dir></target></contents>
|
36 |
<compatible/>
|
37 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
38 |
</package>
|
var/advertisedata/generate_1353339590.xml
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<Advertise><Orders/><Customers><Customer><entity_id>1</entity_id><entity_type_id>1</entity_type_id><attribute_set_id>0</attribute_set_id><website_id>1</website_id><email>john.doe@example.com</email><group_id>1</group_id><increment_id>000000001</increment_id><store_id>1</store_id><created_at>2007-08-30 23:23:13</created_at><updated_at>2008-08-08 12:28:24</updated_at><is_active>1</is_active><disable_auto_group_change>0</disable_auto_group_change><firstname>John</firstname><lastname>Doe</lastname><password_hash>2049484a4020ed15d0e4238db22977d5:eg</password_hash><prefix></prefix><middlename></middlename><suffix></suffix><taxvat></taxvat><default_billing>274</default_billing><default_shipping>274</default_shipping><billing_address></billing_address><shipping_address></shipping_address></Customer></Customers><Carts/></Advertise>
|