@@ -11,17 +11,17 @@ discard block |
||
11 | 11 | |
12 | 12 | $query = array ( |
13 | 13 | 'joins' => array( |
14 | - array( |
|
15 | - 'table' => 'produtos', |
|
16 | - 'alias' => 'Produto', |
|
17 | - 'type' => 'LEFT', |
|
18 | - 'conditions' => array( |
|
19 | - 'AviseMe.produto_id = Produto.id', |
|
20 | - ), |
|
21 | - ) |
|
14 | + array( |
|
15 | + 'table' => 'produtos', |
|
16 | + 'alias' => 'Produto', |
|
17 | + 'type' => 'LEFT', |
|
18 | + 'conditions' => array( |
|
19 | + 'AviseMe.produto_id = Produto.id', |
|
20 | + ), |
|
21 | + ) |
|
22 | 22 | ), |
23 | - 'conditions' => array('AviseMe.ativo' => 1, 'AviseMe.usuario_id' => $this->instancia), |
|
24 | - 'fields' => array('Produto.nome, AviseMe.email, AviseMe.id, Produto.id'), |
|
23 | + 'conditions' => array('AviseMe.ativo' => 1, 'AviseMe.usuario_id' => $this->instancia), |
|
24 | + 'fields' => array('Produto.nome, AviseMe.email, AviseMe.id, Produto.id'), |
|
25 | 25 | ); |
26 | 26 | |
27 | 27 | $cadastros = $this->AviseMe->find('all', $query); |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | - * @return boolean |
|
52 | - * Cadastra as informações |
|
53 | - **/ |
|
51 | + * @return boolean |
|
52 | + * Cadastra as informações |
|
53 | + **/ |
|
54 | 54 | public function cadastrar_avise_me() |
55 | 55 | { |
56 | 56 | try |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | |
31 | 31 | if ($this->CategoriaBanner->save($dados)) { |
32 | 32 | $this->Session->setFlash('Categoria criada com Sucesso!','default','good'); |
33 | - return $this->redirect('/categoria_banner/listar_cadastros'); |
|
33 | + return $this->redirect('/categoria_banner/listar_cadastros'); |
|
34 | 34 | } else { |
35 | 35 | $this->Session->setFlash('Erro ao criar a categoria!','default','good'); |
36 | - return $this->redirect('/categoria_banner/listar_cadastros'); |
|
36 | + return $this->redirect('/categoria_banner/listar_cadastros'); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | |
57 | 57 | if ($this->CategoriaBanner->save($dados)) { |
58 | 58 | $this->Session->setFlash('Categoria editada com Sucesso!','default','good'); |
59 | - return $this->redirect('/categoria_banner/listar_cadastros'); |
|
59 | + return $this->redirect('/categoria_banner/listar_cadastros'); |
|
60 | 60 | } else { |
61 | 61 | $this->Session->setFlash('Erro ao editar a categoria!','default','good'); |
62 | - return $this->redirect('/categoria_banner/listar_cadastros'); |
|
62 | + return $this->redirect('/categoria_banner/listar_cadastros'); |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | |
32 | 32 | if ($this->Categoria->save($dados)) { |
33 | 33 | $this->Session->setFlash('Categoria criada com Sucesso!','default','good'); |
34 | - return $this->redirect('/categoria/listar_cadastros'); |
|
34 | + return $this->redirect('/categoria/listar_cadastros'); |
|
35 | 35 | } else { |
36 | 36 | $this->Session->setFlash('Erro ao criar a categoria!','default','good'); |
37 | - return $this->redirect('/categoria/listar_cadastros'); |
|
37 | + return $this->redirect('/categoria/listar_cadastros'); |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | |
62 | 62 | if ($this->Categoria->save($dados)) { |
63 | 63 | $this->Session->setFlash('Categoria editada com Sucesso!','default','good'); |
64 | - return $this->redirect('/categoria/listar_cadastros'); |
|
64 | + return $this->redirect('/categoria/listar_cadastros'); |
|
65 | 65 | } else { |
66 | 66 | $this->Session->setFlash('Erro ao editar a categoria!','default','good'); |
67 | - return $this->redirect('/categoria/listar_cadastros'); |
|
67 | + return $this->redirect('/categoria/listar_cadastros'); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | $this->EnderecoClienteCadastro->save($endereco); |
31 | 31 | |
32 | 32 | $this->Session->setFlash('Cliente salvo com sucesso!'); |
33 | - return $this->redirect('/cliente/listar_cadastros'); |
|
33 | + return $this->redirect('/cliente/listar_cadastros'); |
|
34 | 34 | } else { |
35 | 35 | $this->Session->setFlash('Ocorreu um erro ao salva o cliente!'); |
36 | - return $this->redirect('/cliente/listar_cadastros'); |
|
36 | + return $this->redirect('/cliente/listar_cadastros'); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
@@ -85,15 +85,15 @@ discard block |
||
85 | 85 | |
86 | 86 | if ($this->Cliente->save($dados)) { |
87 | 87 | $this->Session->setFlash('Cliente editado com sucesso!'); |
88 | - return $this->redirect('/cliente/listar_cadastros'); |
|
88 | + return $this->redirect('/cliente/listar_cadastros'); |
|
89 | 89 | } else { |
90 | 90 | $this->Session->setFlash('Ocorreu um erro ao editar o cliente!'); |
91 | - return $this->redirect('/cliente/listar_cadastros'); |
|
91 | + return $this->redirect('/cliente/listar_cadastros'); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
95 | 95 | function exportar_clientes() { |
96 | - $this->layout = 'ajax'; |
|
97 | - $this->set('event', $this->Cliente->find('all')); |
|
96 | + $this->layout = 'ajax'; |
|
97 | + $this->set('event', $this->Cliente->find('all')); |
|
98 | 98 | } |
99 | 99 | } |
100 | 100 | \ No newline at end of file |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | class AuthComponent extends Component{ |
4 | 4 | function doComplexOperation($amount1, $amount2) { |
5 | - return $amount1 + $amount2; |
|
6 | - } |
|
5 | + return $amount1 + $amount2; |
|
6 | + } |
|
7 | 7 | } |
8 | 8 | \ No newline at end of file |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | |
32 | 32 | if ($this->Cupom->save($dados)) { |
33 | 33 | $this->Session->setFlash('Cupom criado com sucesso!'); |
34 | - return $this->redirect('/cupom/listar_cadastros'); |
|
34 | + return $this->redirect('/cupom/listar_cadastros'); |
|
35 | 35 | } else { |
36 | 36 | $this->Session->setFlash('Ocorreu algum erro ao criar o cupom!'); |
37 | - return $this->redirect('/cupom/listar_cadastros'); |
|
37 | + return $this->redirect('/cupom/listar_cadastros'); |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | |
63 | 63 | if ($this->Cupom->save($dados)) { |
64 | 64 | $this->Session->setFlash('Cupom editado com sucesso!'); |
65 | - return $this->redirect('/cupom/listar_cadastros'); |
|
65 | + return $this->redirect('/cupom/listar_cadastros'); |
|
66 | 66 | } else { |
67 | 67 | $this->Session->setFlash('Ocorreu algum erro ao editar o cupom!'); |
68 | - return $this->redirect('/cupom/listar_cadastros'); |
|
68 | + return $this->redirect('/cupom/listar_cadastros'); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
@@ -77,19 +77,19 @@ discard block |
||
77 | 77 | |
78 | 78 | if ($this->Cupom->save($dados)) { |
79 | 79 | $this->Session->setFlash('Cupom excluido com sucesso!'); |
80 | - return $this->redirect('/cupom/listar_cadastros'); |
|
80 | + return $this->redirect('/cupom/listar_cadastros'); |
|
81 | 81 | } else { |
82 | 82 | $this->Session->setFlash('Ocorreu algum erro ao excluir o cupom!'); |
83 | - return $this->redirect('/cupom/listar_cadastros'); |
|
83 | + return $this->redirect('/cupom/listar_cadastros'); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | 87 | |
88 | 88 | /** |
89 | - * @param nome cupom |
|
90 | - * @param usuario id |
|
91 | - * @return false ou o array com os dados do cupom |
|
92 | - **/ |
|
89 | + * @param nome cupom |
|
90 | + * @param usuario id |
|
91 | + * @return false ou o array com os dados do cupom |
|
92 | + **/ |
|
93 | 93 | public function procurar_cupom($nome_cupom, $usuario_id) |
94 | 94 | { |
95 | 95 | if (empty($nome_cupom) && !isset($nome_cupom)) |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | - * @param valor original float |
|
120 | - * @return float com o valor final ja considerando o valor do cupom |
|
121 | - **/ |
|
119 | + * @param valor original float |
|
120 | + * @return float com o valor final ja considerando o valor do cupom |
|
121 | + **/ |
|
122 | 122 | public function calcular_desconto_cupom($valor_original, $valor_desconto_cupom, $tipo_cupom) |
123 | 123 | { |
124 | 124 | if (empty($valor_original) && !isset($valor_original)) |
@@ -140,10 +140,10 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
143 | - * @param $cupom String nome do cupom a ser utilizado |
|
144 | - * @param $valor float com o valor original da venda |
|
145 | - * @return $novo_valor float com o novo valor da venda |
|
146 | - **/ |
|
143 | + * @param $cupom String nome do cupom a ser utilizado |
|
144 | + * @param $valor float com o valor original da venda |
|
145 | + * @return $novo_valor float com o novo valor da venda |
|
146 | + **/ |
|
147 | 147 | public function utilizar_cupom($cupom, $valor_original, $usuario_id) |
148 | 148 | { |
149 | 149 | if (empty($cupom) && !isset($cupom)) |
@@ -5,46 +5,46 @@ |
||
5 | 5 | public function __construct(); |
6 | 6 | |
7 | 7 | /** |
8 | - * @return void |
|
9 | - * @param String $token |
|
10 | - **/ |
|
8 | + * @return void |
|
9 | + * @param String $token |
|
10 | + **/ |
|
11 | 11 | public function setToken($token); |
12 | 12 | |
13 | 13 | /** |
14 | - * @return void |
|
15 | - * @param String $email |
|
16 | - **/ |
|
14 | + * @return void |
|
15 | + * @param String $email |
|
16 | + **/ |
|
17 | 17 | public function setEmail($email); |
18 | 18 | |
19 | 19 | /** |
20 | - * @return String $token |
|
21 | - **/ |
|
20 | + * @return String $token |
|
21 | + **/ |
|
22 | 22 | public function getToken(); |
23 | 23 | |
24 | 24 | /** |
25 | - * @return String $email |
|
26 | - **/ |
|
25 | + * @return String $email |
|
26 | + **/ |
|
27 | 27 | public function getEmail(); |
28 | 28 | |
29 | 29 | /** |
30 | - * @return void |
|
31 | - * @param Array $produtos |
|
32 | - **/ |
|
30 | + * @return void |
|
31 | + * @param Array $produtos |
|
32 | + **/ |
|
33 | 33 | public function setProdutos($produtos); |
34 | 34 | |
35 | 35 | /** |
36 | - * @return Array $produto |
|
37 | - **/ |
|
36 | + * @return Array $produto |
|
37 | + **/ |
|
38 | 38 | public function getProdutos(); |
39 | 39 | |
40 | 40 | /** |
41 | - * @param Array Produtos a serem adicionados |
|
42 | - **/ |
|
41 | + * @param Array Produtos a serem adicionados |
|
42 | + **/ |
|
43 | 43 | public function adicionarProdutosGateway(); |
44 | 44 | |
45 | 45 | /** |
46 | - * @param Array Andress/Endeço do cliente |
|
47 | - **/ |
|
46 | + * @param Array Andress/Endeço do cliente |
|
47 | + **/ |
|
48 | 48 | public function setEnderecoClienteGateway(); |
49 | 49 | |
50 | 50 | public function setCliente($cliente); |
@@ -30,10 +30,10 @@ |
||
30 | 30 | |
31 | 31 | if ($this->Hieraquia->save($dados)) { |
32 | 32 | $this->Session->setFlash('Hieraquia salva com sucesso!'); |
33 | - return $this->redirect('/hieraquia/listar_cadastros'); |
|
33 | + return $this->redirect('/hieraquia/listar_cadastros'); |
|
34 | 34 | } else { |
35 | 35 | $this->Session->setFlash('Ocorreu um erro ao salva o produto!'); |
36 | - return $this->redirect('/hieraquia/listar_cadastros'); |
|
36 | + return $this->redirect('/hieraquia/listar_cadastros'); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 |
@@ -26,10 +26,10 @@ |
||
26 | 26 | |
27 | 27 | if ($this->Newsletter->save($dados)) { |
28 | 28 | $this->Session->setFlash('Cadastro de newsletter excluido com sucesso!'); |
29 | - return $this->redirect('/newsletter/listar_cadastros'); |
|
29 | + return $this->redirect('/newsletter/listar_cadastros'); |
|
30 | 30 | } else { |
31 | 31 | $this->Session->setFlash('Ocorreu algum erro ao excluir o cadastro de newsletter!'); |
32 | - return $this->redirect('/newsletter/listar_cadastros'); |
|
32 | + return $this->redirect('/newsletter/listar_cadastros'); |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 |