Skip to content

Instantly share code, notes, and snippets.

View evoratec's full-sized avatar

Juan Antonio Navarro evoratec

View GitHub Profile
public function login($username, $password)
{
/** @var $customer Mage_Customer_Model_Customer */
$customer = Mage::getModel('customer/customer')
->setWebsiteId(Mage::app()->getStore()->getWebsiteId());
if ($customer->authenticate($username, $password)) {
$this->setCustomerAsLoggedIn($customer);
//$this->renewSession();
return true;
@evoratec
evoratec / gist:10044104
Created April 7, 2014 20:17
Declaración inline de plantilla en angular
<script type="text/ng-template" id="detalle.html">
// linea 22
directives.service('Navigator', function(ONSEN_CONSTANTS, $http, $compile, $parse, NavigatorStack, requestAnimationFrame,$templateCache) {
// Linea 567
if ($templateCache.get(page) != undefined) {
var div = document.createElement('div');
div.innerHTML = $templateCache.get(page);
var pageContent = angular.element(div.cloneNode(true));
var pageEl = this.generatePageEl(pageContent, options);
var pageScope = this.createPageScope();