Version Notes
Some bugfixes.
You can sign up for an account immediately after you register. Do let us know if you have any feedback or comments either through our website http://getadvocado.com, or via our email: dax@getadvocado.com
Download this release
Release Info
Developer | SY Quek |
Extension | Advocado |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
app/code/community/GozoLabs/Advocado/Helper/Data.php
CHANGED
@@ -1108,8 +1108,9 @@ class GozoLabs_Advocado_Helper_Data extends Mage_Core_Helper_Data {
|
|
1108 |
const SHARE_CODES_SHARES = 'shares';
|
1109 |
const ADVOCADO_CATEGORY_NAME = 'Advocado Products';
|
1110 |
|
1111 |
-
function getWebsite($websiteId) {
|
1112 |
-
$
|
|
|
1113 |
foreach( $sites as $s ) {
|
1114 |
if ($s->getId() == $websiteId) {
|
1115 |
return $s;
|
@@ -1260,7 +1261,9 @@ class GozoLabs_Advocado_Helper_Data extends Mage_Core_Helper_Data {
|
|
1260 |
if ( !$id ) {
|
1261 |
|
1262 |
$_collect = Mage::getResourceModel('catalog/product_collection')
|
1263 |
-
->setStoreId(
|
|
|
|
|
1264 |
|
1265 |
// version 1 of the join - doesn't work
|
1266 |
//$_collect->getSelect()
|
@@ -1289,6 +1292,7 @@ class GozoLabs_Advocado_Helper_Data extends Mage_Core_Helper_Data {
|
|
1289 |
//)
|
1290 |
//)
|
1291 |
//);
|
|
|
1292 |
$collect = new AdvocCustomProductCollection($_collect);
|
1293 |
|
1294 |
if (is_array( $filters ) && count( $filters ) > 0 ) {
|
@@ -1558,3 +1562,12 @@ class GozoLabs_Advocado_Helper_Data extends Mage_Core_Helper_Data {
|
|
1558 |
}
|
1559 |
|
1560 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1108 |
const SHARE_CODES_SHARES = 'shares';
|
1109 |
const ADVOCADO_CATEGORY_NAME = 'Advocado Products';
|
1110 |
|
1111 |
+
function getWebsite($websiteId=1) {
|
1112 |
+
$withDefault = ($websiteId == 0) ? true : false;
|
1113 |
+
$sites = Mage::app()->getWebsites($withDefault);
|
1114 |
foreach( $sites as $s ) {
|
1115 |
if ($s->getId() == $websiteId) {
|
1116 |
return $s;
|
1261 |
if ( !$id ) {
|
1262 |
|
1263 |
$_collect = Mage::getResourceModel('catalog/product_collection')
|
1264 |
+
->setStoreId($this->getWebsite()->getDefaultStore()->getStoreId());
|
1265 |
+
// lazy collection, needs to load stuff, so we call count
|
1266 |
+
// this is really weird.
|
1267 |
|
1268 |
// version 1 of the join - doesn't work
|
1269 |
//$_collect->getSelect()
|
1292 |
//)
|
1293 |
//)
|
1294 |
//);
|
1295 |
+
//Mage::log('Number of products = ' . $_collect->count());
|
1296 |
$collect = new AdvocCustomProductCollection($_collect);
|
1297 |
|
1298 |
if (is_array( $filters ) && count( $filters ) > 0 ) {
|
1562 |
}
|
1563 |
|
1564 |
?>
|
1565 |
+
<?php
|
1566 |
+
|
1567 |
+
/*
|
1568 |
+
* ==================================================
|
1569 |
+
* Utilities
|
1570 |
+
* ==================================================
|
1571 |
+
*/
|
1572 |
+
|
1573 |
+
|
app/code/community/GozoLabs/Advocado/controllers/V1Controller.php
CHANGED
@@ -250,6 +250,7 @@ class GozoLabs_Advocado_V1Controller extends Mage_Core_Controller_Front_Action {
|
|
250 |
|
251 |
public function productsAction() {
|
252 |
|
|
|
253 |
$id = $this->getRequest()->getParam('id');
|
254 |
$response = $this->getJsonResponse();
|
255 |
|
250 |
|
251 |
public function productsAction() {
|
252 |
|
253 |
+
Mage::log('Getting products');
|
254 |
$id = $this->getRequest()->getParam('id');
|
255 |
$response = $this->getJsonResponse();
|
256 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Advocado</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/mit-license.php">MITL</license>
|
7 |
<channel>community</channel>
|
@@ -24,13 +24,13 @@
|
|
24 |
<li>Generate more referrals - Reward your customers for every successful referral they make and drive more sales for your business.</li>
|
25 |
<li>Easy to set up - You can install our plugin or copy & paste a snippet of codes to get Advocado up and running. Our set up wizard will guide you through this.</li>
|
26 |
</ol></description>
|
27 |
-
<notes>
|
28 |

|
29 |
You can sign up for an account immediately after you register. Do let us know if you have any feedback or comments either through our website http://getadvocado.com, or via our email: dax@getadvocado.com</notes>
|
30 |
<authors><author><name>SY Quek</name><user>syquek</user><email>quek@getadvocado.com</email></author></authors>
|
31 |
-
<date>2013-08-
|
32 |
-
<time>
|
33 |
-
<contents><target name="magecommunity"><dir name="GozoLabs"><dir name="Advocado"><dir name="Block"><dir name="Adminhtml"><file name="Login.php" hash="39706986405f7348ef71192d1c86615d"/></dir><file name="Site.php" hash="3b62c41138ac5a90e1f9432a10e6d19e"/></dir><dir name="Helper"><file name="Admin.php" hash="bcda9a0a4e383c14b8c6f7372167a14d"/><file name="Analytics.php" hash="2bf2b9439ace050851ff54faf6734f31"/><file name="Backend.php" hash="125ee66f4aa5d43368679d960c165494"/><file name="Data.php" hash="
|
34 |
<compatible/>
|
35 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.7.0.2</max></package></required></dependencies>
|
36 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Advocado</name>
|
4 |
+
<version>1.1.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/mit-license.php">MITL</license>
|
7 |
<channel>community</channel>
|
24 |
<li>Generate more referrals - Reward your customers for every successful referral they make and drive more sales for your business.</li>
|
25 |
<li>Easy to set up - You can install our plugin or copy & paste a snippet of codes to get Advocado up and running. Our set up wizard will guide you through this.</li>
|
26 |
</ol></description>
|
27 |
+
<notes>Some bugfixes.
|
28 |

|
29 |
You can sign up for an account immediately after you register. Do let us know if you have any feedback or comments either through our website http://getadvocado.com, or via our email: dax@getadvocado.com</notes>
|
30 |
<authors><author><name>SY Quek</name><user>syquek</user><email>quek@getadvocado.com</email></author></authors>
|
31 |
+
<date>2013-08-15</date>
|
32 |
+
<time>06:10:55</time>
|
33 |
+
<contents><target name="magecommunity"><dir name="GozoLabs"><dir name="Advocado"><dir name="Block"><dir name="Adminhtml"><file name="Login.php" hash="39706986405f7348ef71192d1c86615d"/></dir><file name="Site.php" hash="3b62c41138ac5a90e1f9432a10e6d19e"/></dir><dir name="Helper"><file name="Admin.php" hash="bcda9a0a4e383c14b8c6f7372167a14d"/><file name="Analytics.php" hash="2bf2b9439ace050851ff54faf6734f31"/><file name="Backend.php" hash="125ee66f4aa5d43368679d960c165494"/><file name="Data.php" hash="0c7ea63433a87037af08372406b9ef73"/></dir><dir name="Model"><file name="Credentials.php" hash="f7d6c7c82369b4e71fa1ef605c7d5736"/><file name="Observer.php" hash="f39c3df5aa69c724f48e4e28afdb7b06"/><dir name="Resource"><dir name="Credentials"><file name="Collection.php" hash="d7061008f932a933bff5a934133f4f58"/></dir><file name="Credentials.php" hash="db06bec94d7eaf9e9511ef87296f791a"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AdvocadoController.php" hash="b47e8a4eb15cb6fe497a04afa9e146e3"/></dir><file name="CampaignController.php" hash="95d945d30e11561c06c63a65744f0998"/><file name="CartController.php" hash="e42cb1757de7760862d905b64c1a21f0"/><file name="IndexController.php" hash="105efc19158e33b8dae67e23682d08d5"/><file name="V1Controller.php" hash="4c8cf4357c18224b317a172914de07d5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7c94738fe2d40efca729d81311afa529"/><file name="config.xml" hash="9dba171f358f27c5f9e51de2d533b040"/></dir><dir name="sql"><dir name="gozolabs_advocado_setup"><file name="install-0.1.0.php" hash="db8f967eb2a9af200305bde91abe423a"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="gozolabs_advocado.xml" hash="8a3eee7e9e393ba02fea4d67a0ddcda1"/></dir><dir name="template"><dir name="gozolabs"><dir name="advocado"><file name="login.phtml" hash="8ade68e2f79c41c5b95d585a325cf883"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="gozolabs_advocado.xml" hash="5e560a16061cb5f792c0351b6c34bb69"/></dir><dir name="template"><dir name="gozolabs"><dir name="advocado"><file name="site.phtml" hash="a239ca877dd55c3c45943c428352df35"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="GozoLabs_Advocado.xml" hash="5309e7603426b687ad46a42ab565c692"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="gozolabs_advocado.css" hash="4177c19b32d7aed880d1ce695dfc0ad7"/><file name="animate.min.css" hash="bbe717113fde11700cb83ec3d79d9de0"/></dir><dir name="js"><dir name="gozolabs_advocado"><file name="gozolabs_advocado.js" hash="8fe3afda0d605278e24b074efa2a940b"/><file name="jquery.min.js" hash="e1288116312e4728f98923c79b034b67"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Analytics"><dir name="Analytics"><file name="Client.php" hash="0648505a1ad5e4700b0a20855bb34fac"/><dir name="Consumer"><file name="File.php" hash="602b0430e01b131ef4a07f89bb548956"/><file name="ForkCurl.php" hash="83fa57b1b0f09f592e726545d58f12bc"/><file name="Socket.php" hash="b3c6aeacfb0f73ee842288cf2b6e2d56"/></dir><file name="Consumer.php" hash="8299490437cd905bd32f9294ac60b64e"/><file name="QueueConsumer.php" hash="cc20ab42b8013847f06355f32b46e94f"/></dir><file name="Analytics.php" hash="f5703a127a85f014335624016716260d"/></dir></target></contents>
|
34 |
<compatible/>
|
35 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.7.0.2</max></package></required></dependencies>
|
36 |
</package>
|
skin/adminhtml/default/default/js/gozolabs_advocado/gozolabs_advocado.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
4 |
var advocado = (function($, A) {
|
5 |
|
6 |
var POPUP_TITLE = 'Create a new Advocado account',
|
@@ -239,7 +240,7 @@ var advocado = (function($, A) {
|
|
239 |
);
|
240 |
})
|
241 |
.fail(function(xhr, txtStatus, errThrown) {
|
242 |
-
if (xhr.
|
243 |
displayError('register', 'An account with this email address already exists. Please log in');
|
244 |
} else {
|
245 |
displayError('register', 'There was an error signing up. You might have used an invalid email address.');
|
@@ -298,9 +299,9 @@ var advocado = (function($, A) {
|
|
298 |
|
299 |
return A;
|
300 |
|
301 |
-
})(
|
302 |
|
303 |
-
|
304 |
advocado.createAccountEvents();
|
305 |
advocado.loginFormEvents();
|
306 |
});
|
1 |
+
|
2 |
+
// give $ back
|
3 |
+
var jQuery_A = jQuery.noConflict();
|
4 |
+
|
5 |
var advocado = (function($, A) {
|
6 |
|
7 |
var POPUP_TITLE = 'Create a new Advocado account',
|
240 |
);
|
241 |
})
|
242 |
.fail(function(xhr, txtStatus, errThrown) {
|
243 |
+
if (xhr.status === 403) {
|
244 |
displayError('register', 'An account with this email address already exists. Please log in');
|
245 |
} else {
|
246 |
displayError('register', 'There was an error signing up. You might have used an invalid email address.');
|
299 |
|
300 |
return A;
|
301 |
|
302 |
+
})(jQuery_A, advocado || {});
|
303 |
|
304 |
+
jQuery_A(document).ready(function() {
|
305 |
advocado.createAccountEvents();
|
306 |
advocado.loginFormEvents();
|
307 |
});
|