Version Notes
Totally rewrited extension and now is safer and easy to install.
Download this release
Release Info
| Developer | Bloompa |
| Extension | Bloompcommerce |
| Version | 2.0.4 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.3 to 2.0.4
app/code/community/Bloompa/Bloompcommerce/controllers/IndexController.php
CHANGED
|
@@ -43,6 +43,7 @@ class Bloompa_Bloompcommerce_IndexController extends Mage_Core_Controller_Front_
|
|
| 43 |
|
| 44 |
$stores_ids = Mage::getModel('core/store')->getCollection()->getAllIds();
|
| 45 |
$websites_ids = Mage::getModel('core/website')->getCollection()->getAllIds();
|
|
|
|
| 46 |
|
| 47 |
// data to create coupon
|
| 48 |
$data = array(
|
|
@@ -51,7 +52,7 @@ class Bloompa_Bloompcommerce_IndexController extends Mage_Core_Controller_Front_
|
|
| 51 |
'description' => 'Cupom de desconto fornecido pelo compartilhamento do site nas redes sociais (BloompCommerce).',
|
| 52 |
'is_active' => 1,
|
| 53 |
'website_ids' => $websites_ids,
|
| 54 |
-
'customer_group_ids' =>
|
| 55 |
'coupon_type' => 2,
|
| 56 |
'coupon_code' => strtoupper('BC'.Mage::helper('core')->getRandomString(5)),
|
| 57 |
'uses_per_coupon' => 1,
|
|
@@ -112,6 +113,10 @@ class Bloompa_Bloompcommerce_IndexController extends Mage_Core_Controller_Front_
|
|
| 112 |
}
|
| 113 |
}
|
| 114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
Mage::getSingleton('checkout/cart')->getQuote()->getShippingAddress()->setCollectShippingRates(true);
|
| 116 |
|
| 117 |
// find coupon
|
|
@@ -193,5 +198,68 @@ class Bloompa_Bloompcommerce_IndexController extends Mage_Core_Controller_Front_
|
|
| 193 |
exit(json_encode(array('status'=>'success')));
|
| 194 |
}
|
| 195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
|
| 197 |
}
|
| 43 |
|
| 44 |
$stores_ids = Mage::getModel('core/store')->getCollection()->getAllIds();
|
| 45 |
$websites_ids = Mage::getModel('core/website')->getCollection()->getAllIds();
|
| 46 |
+
$customer_group_ids = Mage::getModel('customer/group')->getCollection()->getAllIds();
|
| 47 |
|
| 48 |
// data to create coupon
|
| 49 |
$data = array(
|
| 52 |
'description' => 'Cupom de desconto fornecido pelo compartilhamento do site nas redes sociais (BloompCommerce).',
|
| 53 |
'is_active' => 1,
|
| 54 |
'website_ids' => $websites_ids,
|
| 55 |
+
'customer_group_ids' => $customer_group_ids,
|
| 56 |
'coupon_type' => 2,
|
| 57 |
'coupon_code' => strtoupper('BC'.Mage::helper('core')->getRandomString(5)),
|
| 58 |
'uses_per_coupon' => 1,
|
| 113 |
}
|
| 114 |
}
|
| 115 |
|
| 116 |
+
|
| 117 |
+
// Create a consumer/user acount
|
| 118 |
+
//$this->createConsumerAccount(array('email','firstname','lastname'));
|
| 119 |
+
|
| 120 |
Mage::getSingleton('checkout/cart')->getQuote()->getShippingAddress()->setCollectShippingRates(true);
|
| 121 |
|
| 122 |
// find coupon
|
| 198 |
exit(json_encode(array('status'=>'success')));
|
| 199 |
}
|
| 200 |
|
| 201 |
+
|
| 202 |
+
|
| 203 |
+
/**
|
| 204 |
+
* Create a consumer/user account
|
| 205 |
+
*/
|
| 206 |
+
// private function createConsumerAccount($user_info=array()){
|
| 207 |
+
|
| 208 |
+
// //error_reporting(E_ALL | E_STRICT);
|
| 209 |
+
// // $mageFilename = 'app/Mage.php';
|
| 210 |
+
|
| 211 |
+
// // if (!file_exists($mageFilename)) {
|
| 212 |
+
// // if (is_dir('downloader')) {
|
| 213 |
+
// // header("Location: downloader");
|
| 214 |
+
// // } else {
|
| 215 |
+
// // echo $mageFilename." was not found";
|
| 216 |
+
// // }
|
| 217 |
+
// // exit;
|
| 218 |
+
// // }
|
| 219 |
+
// // require_once $mageFilename;
|
| 220 |
+
// // Varien_Profiler::enable();
|
| 221 |
+
// // Mage::setIsDeveloperMode(true);
|
| 222 |
+
// // ini_set('display_errors', 1);
|
| 223 |
+
// // umask(0);
|
| 224 |
+
|
| 225 |
+
// Mage::app('default');
|
| 226 |
+
|
| 227 |
+
// $customer_email = $user_info['email']; // email adress that will pass by the questionaire
|
| 228 |
+
// $customer_fname = $user_info['first_name']; // we can set a tempory firstname here
|
| 229 |
+
// $customer_lname = $user_info['last_name']; // we can set a tempory lastname here
|
| 230 |
+
// $passwordLength = 6; // the lenght of autogenerated password
|
| 231 |
+
|
| 232 |
+
// $customer = Mage::getModel('customer/customer');
|
| 233 |
+
// $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
| 234 |
+
// $customer->loadByEmail($customer_email);
|
| 235 |
+
|
| 236 |
+
// /*
|
| 237 |
+
// * Check if the email exist on the system.
|
| 238 |
+
// * If YES, it will not create a user account.
|
| 239 |
+
// */
|
| 240 |
+
// if(!$customer->getId()) {
|
| 241 |
+
|
| 242 |
+
// //setting data such as email, firstname, lastname, and password
|
| 243 |
+
|
| 244 |
+
// $customer->setEmail($customer_email);
|
| 245 |
+
// $customer->setFirstname($customer_fname);
|
| 246 |
+
// $customer->setLastname($customer_lname);
|
| 247 |
+
// $customer->setPassword($customer->generatePassword($passwordLength));
|
| 248 |
+
|
| 249 |
+
// try{
|
| 250 |
+
// //the save the data and send the new account email.
|
| 251 |
+
// $customer->save();
|
| 252 |
+
// $customer->setConfirmation(null);
|
| 253 |
+
// $customer->save();
|
| 254 |
+
// $customer->sendNewAccountEmail();
|
| 255 |
+
// }catch(Exception $ex){
|
| 256 |
+
|
| 257 |
+
// }
|
| 258 |
+
|
| 259 |
+
// }else{
|
| 260 |
+
// Mage::getSingleton('customer/session')->loginById($customer->getId());
|
| 261 |
+
// }
|
| 262 |
+
|
| 263 |
+
// }
|
| 264 |
|
| 265 |
}
|
app/code/community/Bloompa/Bloompcommerce/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Bloompa_Bloompcommerce>
|
| 5 |
-
<version>2.0.
|
| 6 |
</Bloompa_Bloompcommerce>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Bloompa_Bloompcommerce>
|
| 5 |
+
<version>2.0.4</version>
|
| 6 |
</Bloompa_Bloompcommerce>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
app/etc/modules/Bloompa_Bloompcommerce.xml
CHANGED
|
@@ -7,7 +7,7 @@
|
|
| 7 |
<depends>
|
| 8 |
<Mage_Cms />
|
| 9 |
</depends>
|
| 10 |
-
<version>2.0.
|
| 11 |
</Bloompa_Bloompcommerce>
|
| 12 |
</modules>
|
| 13 |
</config>
|
| 7 |
<depends>
|
| 8 |
<Mage_Cms />
|
| 9 |
</depends>
|
| 10 |
+
<version>2.0.4</version>
|
| 11 |
</Bloompa_Bloompcommerce>
|
| 12 |
</modules>
|
| 13 |
</config>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Bloompcommerce</name>
|
| 4 |
-
<version>2.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.gnu.org/licenses/gpl.html">GPL</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -10,9 +10,9 @@
|
|
| 10 |
<description>E-commerce stores face a big problem; low sales conversion rates. BloompCommerce is a social behavior solution to improve e-commerce stores sales conversion rates by utilizing the power of customers social networks.</description>
|
| 11 |
<notes>Totally rewrited extension and now is safer and easy to install.</notes>
|
| 12 |
<authors><author><name>Bloompa</name><user>bloompa</user><email>dev@bloompa.com.br</email></author></authors>
|
| 13 |
-
<date>2013-02-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magecommunity"><dir name="Bloompa"><dir name="Bloompcommerce"><dir name="Block"><file name="Bc_Shopping_Cart.php" hash="60430e2631dff2d8ad989a47a1a72076"/><file name="Bc_Social_Expressions.php" hash="261d578ff77edd0dbf85bca3e1de1adf"/><file name="Index.php" hash="bfa3379f338393829181d4da5c8bf9a3"/></dir><dir name="Helper"><file name="Data.php" hash="b86464697e0f7860ce665d3483390222"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="58a8f0b8dc52af2ba6ae52ac9a9df333"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Bloompcommerce</name>
|
| 4 |
+
<version>2.0.4</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.gnu.org/licenses/gpl.html">GPL</license>
|
| 7 |
<channel>community</channel>
|
| 10 |
<description>E-commerce stores face a big problem; low sales conversion rates. BloompCommerce is a social behavior solution to improve e-commerce stores sales conversion rates by utilizing the power of customers social networks.</description>
|
| 11 |
<notes>Totally rewrited extension and now is safer and easy to install.</notes>
|
| 12 |
<authors><author><name>Bloompa</name><user>bloompa</user><email>dev@bloompa.com.br</email></author></authors>
|
| 13 |
+
<date>2013-02-20</date>
|
| 14 |
+
<time>23:08:59</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="Bloompa"><dir name="Bloompcommerce"><dir name="Block"><file name="Bc_Shopping_Cart.php" hash="60430e2631dff2d8ad989a47a1a72076"/><file name="Bc_Social_Expressions.php" hash="261d578ff77edd0dbf85bca3e1de1adf"/><file name="Index.php" hash="bfa3379f338393829181d4da5c8bf9a3"/></dir><dir name="Helper"><file name="Data.php" hash="b86464697e0f7860ce665d3483390222"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="58a8f0b8dc52af2ba6ae52ac9a9df333"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="085d4df62fbd4e9056e9776527246fc6"/><file name=".DS_Store" hash="6862b007cfa65696f6199b47178c245f"/></dir><dir name="etc"><file name="config.xml" hash="747357a4b0610c1fb94e122ac6b34a39"/><file name="widget.xml" hash="dec6e8cd0f603a062bc9211ae6d296de"/></dir><dir name="sql"><dir name="bloompcommerce_setup"><file name="mysql4-install-2.0.1.php" hash="0ebbe007f262265afa615e8ca3194ba0"/></dir></dir><file name=".DS_Store" hash="7c47276314aaa4eb692b7fad98e7cc5b"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bloompa_Bloompcommerce.xml" hash="4d0fd2f0de1df616d349550d7df412ae"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="bloompcommerce.xml" hash="4dd9120b9a929ae6b5a05f2613b59e2a"/></dir><dir name="template"><dir name="bloompcommerce"><file name="cart.phtml" hash="71a6fda93b9e28d0746b24d64c443dd5"/><file name="index.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="load_js.phtml" hash="a7f2eb14c09b8bea06f510e880d9568e"/><file name="order_success.phtml" hash="3b083fdf455f456c94cfbe71afe2f5e0"/><file name="product.phtml" hash="2f97aa0b85f50f2dadd7dca7a956ae89"/><file name="product_header.phtml" hash="4873b2982024be8060bfcce31ec45da3"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
