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.
Download this release
Release Info
Developer | Michael Oxley |
Extension | AdvertiseCommunity |
Version | 1.2.3 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 1.2.3
app/code/community/Advertise/Dataexport/Helper/Data.php
CHANGED
@@ -21,6 +21,8 @@ class Advertise_Dataexport_Helper_Data extends Mage_Core_Helper_Abstract
|
|
21 |
$basket = '';
|
22 |
}
|
23 |
|
|
|
|
|
24 |
$jsoutput = "
|
25 |
var adv_store_base_url = '".Mage::getBaseUrl()."';
|
26 |
var adv_reload = true;
|
@@ -28,6 +30,7 @@ class Advertise_Dataexport_Helper_Data extends Mage_Core_Helper_Abstract
|
|
28 |
adv_crosssell_reload = true;
|
29 |
var adv_productid = '".$prodid."';
|
30 |
var adv_bsk = '".$basket."';
|
|
|
31 |
";
|
32 |
// var cartcount = '".Mage::helper('checkout/cart')->getCart()->getItemsCount()."';
|
33 |
|
@@ -121,4 +124,27 @@ class Advertise_Dataexport_Helper_Data extends Mage_Core_Helper_Abstract
|
|
121 |
$initialVector
|
122 |
);
|
123 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
21 |
$basket = '';
|
22 |
}
|
23 |
|
24 |
+
$referrerId = $this->getReferrerPageProductID();
|
25 |
+
|
26 |
$jsoutput = "
|
27 |
var adv_store_base_url = '".Mage::getBaseUrl()."';
|
28 |
var adv_reload = true;
|
30 |
adv_crosssell_reload = true;
|
31 |
var adv_productid = '".$prodid."';
|
32 |
var adv_bsk = '".$basket."';
|
33 |
+
var adv_refid = '".$referrerId."';
|
34 |
";
|
35 |
// var cartcount = '".Mage::helper('checkout/cart')->getCart()->getItemsCount()."';
|
36 |
|
124 |
$initialVector
|
125 |
);
|
126 |
}
|
127 |
+
|
128 |
+
function getReferrerPageProductID() {
|
129 |
+
$referrerPath = $_SERVER ['HTTP_REFERER'];
|
130 |
+
if (!strncmp($referrerPath, Mage::getBaseUrl(), strlen(Mage::getBaseUrl()))) {
|
131 |
+
// If REFERRER starts with store base URL
|
132 |
+
$referrerPath = substr($referrerPath, strlen(Mage::getBaseUrl()));
|
133 |
+
} else {
|
134 |
+
// Referrer not from this site so stop
|
135 |
+
return;
|
136 |
+
}
|
137 |
+
try {
|
138 |
+
$oRewrite = Mage::getModel('core/url_rewrite')
|
139 |
+
->setStoreId(Mage::app()->getStore()->getId())
|
140 |
+
->loadByRequestPath($referrerPath);
|
141 |
+
$iProductId = $oRewrite->getProductId();
|
142 |
+
} catch (Exception $e) {
|
143 |
+
// No product ID - referrer not product page
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
// Gets product model object itself
|
147 |
+
//$oProduct = Mage::getModel('catalog/product')->load($iProductId);
|
148 |
+
return $iProductId;
|
149 |
+
}
|
150 |
}
|
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>
|
@@ -24,11 +24,13 @@ These elements are not active unless those packages are installed. So if you onl
|
|
24 |

|
25 |
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 |
<authors><author><name>Michael Oxley</name><user>advertise</user><email>mike@adverti.se</email></author></authors>
|
29 |
-
<date>2012-
|
30 |
-
<time>15:
|
31 |
-
<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="
|
32 |
<compatible/>
|
33 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
34 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>AdvertiseCommunity</name>
|
4 |
+
<version>1.2.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
24 |

|
25 |
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.</notes>
|
30 |
<authors><author><name>Michael Oxley</name><user>advertise</user><email>mike@adverti.se</email></author></authors>
|
31 |
+
<date>2012-11-05</date>
|
32 |
+
<time>15:11:44</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="0b05f5861f9639dc3e4619b0ce186200"/></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"/></dir></dir></target></contents>
|
34 |
<compatible/>
|
35 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
36 |
</package>
|