This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 id="title" class="title">Login</h1> | |
<p class="sub-title">Hello! Log in with your email.</p> | |
<form #myForm="ngForm" (ngSubmit)="login()" aria-labelledby="title"> | |
<div class="form-control-group"> | |
<label class="label" for="input-email">Email address:</label> | |
<input nbInput | |
fullWidth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'login', | |
styleUrls: [], | |
templateUrl: './login.component.html', | |
}) | |
export class LoginComponent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { RouterModule, Routes } from '@angular/router'; | |
import { LoginComponent } from './login.component'; | |
import { FormsModule } from '@angular/forms'; | |
export const routes: Routes = [ | |
{ | |
path: '', | |
component: LoginComponent, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CommonModule } from '@angular/common'; | |
import { NgModule } from '@angular/core'; | |
import { FormsModule } from '@angular/forms'; | |
import { RouterModule } from '@angular/router'; | |
import { NgxAuthRoutingModule } from './auth-routing.module'; | |
import { | |
NbAlertModule, | |
NbButtonModule, | |
NbCheckboxModule, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Decorator function to create global method (Extend the object service) | |
#add this function outside of any class! | |
def extend(class_to_extend): | |
""" | |
Decorator to use to extend a existing class with a new method | |
Example : | |
@extend(osv.osv) | |
def new_method(self, *args, **kwargs): | |
print 'I am in the new_method', self._name | |
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Your dictionary of crawl values | |
vals = { | |
'name': | |
'date': | |
'lines': self.prepare_lines(), | |
} | |
def prepare_lines(): | |
objects = find_objects() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<field name="crawls" widget="one2many_list" nolabel="1"> | |
<tree string=""> | |
<field name="name" /> | |
<field name="enabled" /> | |
<field name="crawl_type" /> | |
</tree> | |
<form string=""> | |
<field name="name" /> | |
<field name="enabled" /> | |
<field name="crawl_type" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
[item] => Array | |
( | |
[124289] => Array | |
( | |
[qty] => 1 | |
[bundle_option_qty] => Array | |
( | |
[33607] => 1 | |
[33608] => 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function updateproductstock(array $productData) { | |
foreach ($productData as $productId => $data) { | |
$productId = (int) $productId; | |
$isInStock = $data['is_in_stock']; | |
$manageStock = $data['manage_stock']; | |
$qty = $data['qty']; | |
$configManageStock = $data['config_manage_stock']; | |
$this->updateOneProductStock($productId, $isInStock, $manageStock, $qty, $configManageStock); | |
} | |
// $process = Mage::getModel('index/indexer')->getProcessByCode('cataloginventory_stock'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* @category USWF | |
* @package GroupedCartName | |
* @author Kyle Waid | |
*/ | |
/* @var $installer Mage_Core_Model_Resource_Setup */ | |
$installer = $this; |
NewerOlder