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.5 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.4 to 2.0.5
- app/code/community/Bloompa/Bloompcommerce/.DS_Store +0 -0
- app/code/community/Bloompa/Bloompcommerce/controllers/IndexController.php +127 -61
- app/code/community/Bloompa/Bloompcommerce/etc/config.xml +1 -1
- app/code/community/Bloompa/Bloompcommerce/sql/.DS_Store +0 -0
- app/code/community/Bloompa/Bloompcommerce/sql/bloompcommerce_setup/.DS_Store +0 -0
- app/code/community/Bloompa/Bloompcommerce/sql/bloompcommerce_setup/mysql4-install-2.0.5.php +17 -0
- app/design/frontend/base/default/layout/bloompcommerce.xml +8 -1
- app/design/frontend/base/default/template/bloompcommerce/.DS_Store +0 -0
- app/design/frontend/base/default/template/bloompcommerce/cart.phtml +2 -2
- app/design/frontend/base/default/template/bloompcommerce/order_success.phtml +1 -1
- app/design/frontend/base/default/template/bloompcommerce/social_login.phtml +29 -0
- app/etc/modules/Bloompa_Bloompcommerce.xml +1 -1
- package.xml +4 -4
app/code/community/Bloompa/Bloompcommerce/.DS_Store
CHANGED
|
Binary file
|
app/code/community/Bloompa/Bloompcommerce/controllers/IndexController.php
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
<?php
|
| 2 |
require_once 'Mage/Checkout/controllers/CartController.php';
|
| 3 |
class Bloompa_Bloompcommerce_IndexController extends Mage_Core_Controller_Front_Action{
|
| 4 |
|
|
@@ -22,10 +22,20 @@ class Bloompa_Bloompcommerce_IndexController extends Mage_Core_Controller_Front_
|
|
| 22 |
$bc_discount_percent = $readConnection->fetchOne("SELECT value FROM `bloompa_settings` WHERE `param`='discount_value_".strtolower($social_network)."' AND product='BloompCommerce' LIMIT 1");
|
| 23 |
|
| 24 |
if(!is_null($bc_discount_percent)){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
|
|
|
|
|
|
| 26 |
$new_code = false;
|
|
|
|
| 27 |
if(isset($_SESSION['bc_customer_id'])){
|
|
|
|
| 28 |
$customer_id = $_SESSION['bc_customer_id'];
|
|
|
|
| 29 |
}else{
|
| 30 |
|
| 31 |
$customer_id = Mage::getSingleton('customer/session')->getCustomerId();
|
|
@@ -113,9 +123,6 @@ class Bloompa_Bloompcommerce_IndexController extends Mage_Core_Controller_Front_
|
|
| 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 |
|
|
@@ -198,68 +205,127 @@ class Bloompa_Bloompcommerce_IndexController extends Mage_Core_Controller_Front_
|
|
| 198 |
exit(json_encode(array('status'=>'success')));
|
| 199 |
}
|
| 200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
|
| 202 |
|
| 203 |
/**
|
| 204 |
* Create a consumer/user account
|
| 205 |
*/
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 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 |
}
|
| 1 |
+
<?php
|
| 2 |
require_once 'Mage/Checkout/controllers/CartController.php';
|
| 3 |
class Bloompa_Bloompcommerce_IndexController extends Mage_Core_Controller_Front_Action{
|
| 4 |
|
| 22 |
$bc_discount_percent = $readConnection->fetchOne("SELECT value FROM `bloompa_settings` WHERE `param`='discount_value_".strtolower($social_network)."' AND product='BloompCommerce' LIMIT 1");
|
| 23 |
|
| 24 |
if(!is_null($bc_discount_percent)){
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
// Create a consumer/user acount
|
| 28 |
+
if($_GET['consumer_name'] AND $_GET['consumer_email'])
|
| 29 |
+
$this->createConsumerAccount(array('email'=>$_GET['consumer_email'],'name'=>$_GET['consumer_name']));
|
| 30 |
|
| 31 |
+
|
| 32 |
+
|
| 33 |
$new_code = false;
|
| 34 |
+
|
| 35 |
if(isset($_SESSION['bc_customer_id'])){
|
| 36 |
+
|
| 37 |
$customer_id = $_SESSION['bc_customer_id'];
|
| 38 |
+
|
| 39 |
}else{
|
| 40 |
|
| 41 |
$customer_id = Mage::getSingleton('customer/session')->getCustomerId();
|
| 123 |
}
|
| 124 |
}
|
| 125 |
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
Mage::getSingleton('checkout/cart')->getQuote()->getShippingAddress()->setCollectShippingRates(true);
|
| 128 |
|
| 205 |
exit(json_encode(array('status'=>'success')));
|
| 206 |
}
|
| 207 |
|
| 208 |
+
|
| 209 |
+
/**
|
| 210 |
+
* UPDATE SOCIAL LOGIN STATUS - Request from Bloompa's server
|
| 211 |
+
* */
|
| 212 |
+
public function UpdateSocialLoginStatusAction(){
|
| 213 |
+
|
| 214 |
+
header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"');
|
| 215 |
+
header("Access-Control-Allow-Methods: POST,GET,OPTIONS");
|
| 216 |
+
header("Access-Control-Allow-Origin: *");
|
| 217 |
+
header('Access-Control-Allow-Headers: X-Requested-With');
|
| 218 |
+
|
| 219 |
+
$status = trim($_POST['status']);
|
| 220 |
+
|
| 221 |
+
$writeConnection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
| 222 |
+
if(!$writeConnection->query("UPDATE bloompa_settings SET value ='".$status."' WHERE product='BloompCommerce' AND param='social_login_status'"))
|
| 223 |
+
exit(json_encode(array('status'=>'fail')));
|
| 224 |
+
|
| 225 |
+
exit(json_encode(array('status'=>'success')));
|
| 226 |
+
|
| 227 |
+
}
|
| 228 |
|
| 229 |
|
| 230 |
/**
|
| 231 |
* Create a consumer/user account
|
| 232 |
*/
|
| 233 |
+
private function createConsumerAccount(Array $user_info){
|
| 234 |
+
|
| 235 |
+
//error_reporting(E_ALL | E_STRICT);
|
| 236 |
+
// $mageFilename = 'app/Mage.php';
|
| 237 |
+
|
| 238 |
+
// if (!file_exists($mageFilename)) {
|
| 239 |
+
// if (is_dir('downloader')) {
|
| 240 |
+
// header("Location: downloader");
|
| 241 |
+
// } else {
|
| 242 |
+
// echo $mageFilename." was not found";
|
| 243 |
+
// }
|
| 244 |
+
// exit;
|
| 245 |
+
// }
|
| 246 |
+
// require_once $mageFilename;
|
| 247 |
+
// Varien_Profiler::enable();
|
| 248 |
+
// Mage::setIsDeveloperMode(true);
|
| 249 |
+
// ini_set('display_errors', 1);
|
| 250 |
+
// umask(0);
|
| 251 |
+
|
| 252 |
+
// Set name and last name
|
| 253 |
+
$user_info['last_name'] = '';
|
| 254 |
+
$user_info['first_name'] = '';
|
| 255 |
+
|
| 256 |
+
if($name = explode(' ',urldecode($user_info['name']))){
|
| 257 |
+
$user_info['first_name'] = $name[0];
|
| 258 |
+
for($i=1;$i<count($name);$i++){
|
| 259 |
+
$user_info['last_name'] .= $name[$i].' ';
|
| 260 |
+
}
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
|
| 264 |
+
// Check settings
|
| 265 |
+
$readConnection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
| 266 |
+
$is_active = $readConnection->fetchOne("SELECT value FROM `bloompa_settings` WHERE `param`='social_login_status' AND product='BloompCommerce' LIMIT 1");
|
| 267 |
+
|
| 268 |
+
if(!is_null($is_active) AND $is_active=='1'){
|
| 269 |
+
|
| 270 |
+
Mage::app('default');
|
| 271 |
+
|
| 272 |
+
$customer_email = urldecode($user_info['email']);
|
| 273 |
+
$customer_fname = $user_info['first_name'];
|
| 274 |
+
$customer_lname = $user_info['last_name'];
|
| 275 |
+
$passwordLength = 6;
|
| 276 |
+
|
| 277 |
+
$customer = Mage::getModel('customer/customer');
|
| 278 |
+
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
| 279 |
+
$customer->loadByEmail($customer_email);
|
| 280 |
+
|
| 281 |
+
/*
|
| 282 |
+
* Check if the email exist on the system.
|
| 283 |
+
* If YES, it will not create a user account.
|
| 284 |
+
*/
|
| 285 |
+
if(!$customer->getId()) {
|
| 286 |
+
|
| 287 |
+
//setting data such as email, firstname, lastname, and password
|
| 288 |
+
|
| 289 |
+
$customer->setEmail($customer_email);
|
| 290 |
+
$customer->setFirstname($customer_fname);
|
| 291 |
+
$customer->setLastname($customer_lname);
|
| 292 |
+
$customer->setPassword($customer->generatePassword($passwordLength));
|
| 293 |
+
|
| 294 |
+
try{
|
| 295 |
+
|
| 296 |
+
//the save the data and send the new account email.
|
| 297 |
+
$customer->save();
|
| 298 |
+
$customer->setConfirmation(null);
|
| 299 |
+
$customer->save();
|
| 300 |
+
$customer->sendNewAccountEmail();
|
| 301 |
+
|
| 302 |
+
Mage::getSingleton('customer/session')->loginById($customer->getId());
|
| 303 |
+
|
| 304 |
+
Mage::getSingleton('core/session')->addSuccess('Usuário cadastrado e logado com sucesso!');
|
| 305 |
+
|
| 306 |
+
}catch(Exception $ex){
|
| 307 |
+
//Mage::getSingleton('core/session')->addError('Houve uma falha ao tentar cadastrar e logar o usuário!');
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
}else{
|
| 311 |
+
Mage::getSingleton('customer/session')->loginById($customer->getId());
|
| 312 |
+
}
|
| 313 |
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
/**
|
| 320 |
+
* Redirect from Social Login
|
| 321 |
+
* */
|
| 322 |
+
public function CustomerAccountCreateAction(){
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
$this->createConsumerAccount(array('email'=>$_GET['email'],'name'=>$_GET['name']));
|
| 326 |
+
|
| 327 |
+
$this->_redirectUrl(Mage::getBaseUrl());
|
| 328 |
+
|
| 329 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
|
| 331 |
}
|
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.5</version>
|
| 6 |
</Bloompa_Bloompcommerce>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
app/code/community/Bloompa/Bloompcommerce/sql/.DS_Store
ADDED
|
Binary file
|
app/code/community/Bloompa/Bloompcommerce/sql/bloompcommerce_setup/.DS_Store
ADDED
|
Binary file
|
app/code/community/Bloompa/Bloompcommerce/sql/bloompcommerce_setup/mysql4-install-2.0.5.php
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
$installer = $this;
|
| 3 |
+
$installer->startSetup();
|
| 4 |
+
$installer->run("
|
| 5 |
+
CREATE TABLE IF NOT EXISTS `bloompa_settings` (
|
| 6 |
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
| 7 |
+
`product` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
|
| 8 |
+
`param` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
|
| 9 |
+
`value` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
|
| 10 |
+
PRIMARY KEY (`id`)
|
| 11 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci COMMENT='Tabela com as configurações do bloompa';
|
| 12 |
+
INSERT IGNORE INTO bloompa_settings SET id=1, product='BloompCommerce', param='token', value='novo';
|
| 13 |
+
INSERT IGNORE INTO bloompa_settings SET id=2, product='BloompCommerce', param='discount_value_facebook', value='5';
|
| 14 |
+
INSERT IGNORE INTO bloompa_settings SET id=3, product='BloompCommerce', param='discount_value_twitter', value='5';
|
| 15 |
+
INSERT INTO bloompa_settings(id,product,param,value) VALUES(4,'BloompCommerce','social_login_status','0');
|
| 16 |
+
");
|
| 17 |
+
$installer->endSetup();
|
app/design/frontend/base/default/layout/bloompcommerce.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
<layout version="1.5.0">
|
| 4 |
|
| 5 |
-
|
| 6 |
<reference name="root">
|
| 7 |
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
| 8 |
</reference>
|
|
@@ -11,6 +11,13 @@
|
|
| 11 |
</reference>
|
| 12 |
</bloompcommerce_index_index>
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
<checkout_cart_index>
|
| 15 |
<reference name="head">
|
| 16 |
<block type="page/html" template="bloompcommerce/cart.phtml"/>
|
| 2 |
|
| 3 |
<layout version="1.5.0">
|
| 4 |
|
| 5 |
+
<bloompcommerce_index_index>
|
| 6 |
<reference name="root">
|
| 7 |
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
| 8 |
</reference>
|
| 11 |
</reference>
|
| 12 |
</bloompcommerce_index_index>
|
| 13 |
|
| 14 |
+
|
| 15 |
+
<customer_account_login>
|
| 16 |
+
<reference name="content">
|
| 17 |
+
<block type="page/html" template="bloompcommerce/social_login.phtml" name="bc_social_login" />
|
| 18 |
+
</reference>
|
| 19 |
+
</customer_account_login>
|
| 20 |
+
|
| 21 |
<checkout_cart_index>
|
| 22 |
<reference name="head">
|
| 23 |
<block type="page/html" template="bloompcommerce/cart.phtml"/>
|
app/design/frontend/base/default/template/bloompcommerce/.DS_Store
ADDED
|
Binary file
|
app/design/frontend/base/default/template/bloompcommerce/cart.phtml
CHANGED
|
@@ -10,7 +10,7 @@ if(is_null($coupon_code)):
|
|
| 10 |
|
| 11 |
<!-- BloompCommerce - cart -->
|
| 12 |
<meta name="bloompa:source" content="cart" />
|
| 13 |
-
<meta name="bloompa:cart-amount" content="<?php echo Mage::getSingleton('checkout/session')->getQuote()->getSubtotal(); ?>" />
|
| 14 |
<!-- <meta name="bloompa:cart-discount_amount" content="4.00" /> -->
|
| 15 |
<meta name="bloompa:cart-share_image" content="<?php echo $this->getLogoSrc()?>" />
|
| 16 |
<meta name="bloompa:cart-redirect_url" content="<?php echo Mage::getBaseUrl().'bloompcommerce';?>" />
|
|
@@ -20,7 +20,7 @@ if(is_null($coupon_code)):
|
|
| 20 |
|
| 21 |
<!-- BloompCommerce - Products in the shopping cart -->
|
| 22 |
<?php foreach( Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection() as $item ) : ?>
|
| 23 |
-
<div data-prefix="bloompa:cart-product" data-title="<?php echo $item->_data['name'];?>" data-price="<?php echo $item->_data['price'];?>" data-url="<?php echo Mage::getBaseUrl().($item->_data['product']->_data['url_path']);?>" data-image="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$item->_data['product']->_data['thumbnail'];?>" data-currency="BRL"></div>
|
| 24 |
<?php endforeach; ?>
|
| 25 |
<!-- BloompCommerce - Products in the shopping cart -->
|
| 26 |
|
| 10 |
|
| 11 |
<!-- BloompCommerce - cart -->
|
| 12 |
<meta name="bloompa:source" content="cart" />
|
| 13 |
+
<meta name="bloompa:cart-amount" content="<?php echo number_format(Mage::getSingleton('checkout/session')->getQuote()->getSubtotal(),2,'.',''); ?>" />
|
| 14 |
<!-- <meta name="bloompa:cart-discount_amount" content="4.00" /> -->
|
| 15 |
<meta name="bloompa:cart-share_image" content="<?php echo $this->getLogoSrc()?>" />
|
| 16 |
<meta name="bloompa:cart-redirect_url" content="<?php echo Mage::getBaseUrl().'bloompcommerce';?>" />
|
| 20 |
|
| 21 |
<!-- BloompCommerce - Products in the shopping cart -->
|
| 22 |
<?php foreach( Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection() as $item ) : ?>
|
| 23 |
+
<div data-prefix="bloompa:cart-product" data-title="<?php echo $item->_data['name'];?>" data-price="<?php echo number_format($item->_data['price'], 2, '.', '');?>" data-url="<?php echo Mage::getBaseUrl().($item->_data['product']->_data['url_path']);?>" data-image="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$item->_data['product']->_data['thumbnail'];?>" data-currency="BRL"></div>
|
| 24 |
<?php endforeach; ?>
|
| 25 |
<!-- BloompCommerce - Products in the shopping cart -->
|
| 26 |
|
app/design/frontend/base/default/template/bloompcommerce/order_success.phtml
CHANGED
|
@@ -29,7 +29,7 @@ if($token!='' && $token!='novo'):
|
|
| 29 |
|
| 30 |
<!-- BloompCommerce - conversion -->
|
| 31 |
<meta name="bloompa:source" content="conversion" />
|
| 32 |
-
<meta name="bloompa:conversion-amount" content="<?php echo $order->getGrandTotal() ?>" />
|
| 33 |
<meta name="bloompa:conversion-order_id" content="<?php echo $order->getId() ?>" />
|
| 34 |
<meta name="bloompa:conversion-discount_amount" content="<?php echo $bc_discount_percent ?>" />
|
| 35 |
<!-- /BloompCommerce - conversion -->
|
| 29 |
|
| 30 |
<!-- BloompCommerce - conversion -->
|
| 31 |
<meta name="bloompa:source" content="conversion" />
|
| 32 |
+
<meta name="bloompa:conversion-amount" content="<?php echo number_format($order->getGrandTotal(),2,'.','') ?>" />
|
| 33 |
<meta name="bloompa:conversion-order_id" content="<?php echo $order->getId() ?>" />
|
| 34 |
<meta name="bloompa:conversion-discount_amount" content="<?php echo $bc_discount_percent ?>" />
|
| 35 |
<!-- /BloompCommerce - conversion -->
|
app/design/frontend/base/default/template/bloompcommerce/social_login.phtml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
$item = Mage::registry('product');
|
| 3 |
+
$readConnection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
| 4 |
+
$bloompa_settings = $readConnection->fetchAll("SELECT * FROM `bloompa_settings` WHERE product='BloompCommerce'");
|
| 5 |
+
|
| 6 |
+
$token = null;
|
| 7 |
+
$social_login_status = null;
|
| 8 |
+
foreach($bloompa_settings as $setting){
|
| 9 |
+
|
| 10 |
+
if($setting['param']=='token')
|
| 11 |
+
$token = $setting['value'];
|
| 12 |
+
|
| 13 |
+
if($setting['param']=='social_login_status')
|
| 14 |
+
$social_login_status = $setting['value'];
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
if(!is_null($token) AND $token!='novo' AND $social_login_status=='1'):
|
| 18 |
+
?>
|
| 19 |
+
|
| 20 |
+
<!-- BloompCommerce - login social -->
|
| 21 |
+
<div data-prefix="bloompa:login" data-redirect_url="<?php echo Mage::getBaseUrl().'bloompcommerce/index/CustomerAccountCreate';?>"></div>
|
| 22 |
+
<!-- /BloompCommerce - login social -->
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
<!-- BloompCommerce - JS -->
|
| 26 |
+
<script src="http<?php echo (isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on")?'s':''?>://www.bloompa.com.br/js/bloompcommerce.widget-load.js" data-apitoken="<?php echo $token;?>"></script>
|
| 27 |
+
<!-- /BloompCommerce - JS -->
|
| 28 |
+
|
| 29 |
+
<?php endif; ?>
|
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.5</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.5</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-28</date>
|
| 14 |
+
<time>20:16:31</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="9f39acb71d62d1ae5804299b08ad1e12"/><file name=".DS_Store" hash="6862b007cfa65696f6199b47178c245f"/></dir><dir name="etc"><file name="config.xml" hash="c48a5cefd0cfe5b52b870c4343f09d23"/><file name="widget.xml" hash="dec6e8cd0f603a062bc9211ae6d296de"/></dir><dir name="sql"><dir name="bloompcommerce_setup"><file name="mysql4-install-2.0.1.php" hash="0ebbe007f262265afa615e8ca3194ba0"/><file name="mysql4-install-2.0.5.php" hash="4ba2a67cf1fc57a2d7b9ee3cd6821734"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name=".DS_Store" hash="c9ecae39bf0a17e63a9426b7894533b8"/></dir><file name=".DS_Store" hash="de26946b00efd74fcbe32cb97622212b"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bloompa_Bloompcommerce.xml" hash="3eeb6285e9e5693d19a7b62e1d682d89"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="bloompcommerce.xml" hash="8be4671d03278c17a2ac3e402521ff3f"/></dir><dir name="template"><dir name="bloompcommerce"><file name="cart.phtml" hash="9a2fd9bd091de4f777fbb7de1402d176"/><file name="index.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="load_js.phtml" hash="a7f2eb14c09b8bea06f510e880d9568e"/><file name="order_success.phtml" hash="c5075e73086ddb4ce7dd167c9332b7fa"/><file name="product.phtml" hash="2f97aa0b85f50f2dadd7dca7a956ae89"/><file name="product_header.phtml" hash="4873b2982024be8060bfcce31ec45da3"/><file name="social_login.phtml" hash="46ce40d4cafc278242587c2c0da04ee2"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></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>
|
