| @@ 44-56 (lines=13) @@ | ||
| 41 | return $produtos; |
|
| 42 | } |
|
| 43 | ||
| 44 | public function loadBanners($id_banner = null) { |
|
| 45 | $this->loadModel('Banner'); |
|
| 46 | ||
| 47 | $params = array('conditions' => |
|
| 48 | array('ativo' => 1, |
|
| 49 | 'usuario_id' => $this->Session->read('Usuario.id') |
|
| 50 | ) |
|
| 51 | ); |
|
| 52 | ||
| 53 | $banners = $this->Banner->find('all', $params); |
|
| 54 | ||
| 55 | return $banners; |
|
| 56 | } |
|
| 57 | ||
| 58 | public function addCart() { |
|
| 59 | $produto = $this->request->data('produto'); |
|
| @@ 129-141 (lines=13) @@ | ||
| 126 | return array('products_cart' => $produtos, 'total' => $total); |
|
| 127 | } |
|
| 128 | ||
| 129 | public function loadCategoriesProducts($id_categoria = null) { |
|
| 130 | $this->loadModel('Categoria'); |
|
| 131 | ||
| 132 | $params = array('conditions' => |
|
| 133 | array('ativo' => 1, |
|
| 134 | 'usuario_id' => $this->Session->read('Usuario.id') |
|
| 135 | ) |
|
| 136 | ); |
|
| 137 | ||
| 138 | $categorias = $this->Categoria->find('all', $params); |
|
| 139 | ||
| 140 | return $categorias; |
|
| 141 | } |
|
| 142 | ||
| 143 | public function payment() { |
|
| 144 | $andress = $this->request->data('endereco'); |
|