This file contains hidden or 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
| <script type="text/javascript">countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?></script> |
This file contains hidden or 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
| $fields['produto'][$count]['produto_codigo'] = $item->getSku(); | |
| $fields['produto'][$count]['produto_nome'] = $item->getName(); | |
| $fields['produto'][$count]['produto_qtd'] = $item->getQtyOrdered(); | |
| $fields['produto'][$count]['produto_peso'] = number_format($item->getWeight(), '2'); | |
| $fields['produto'][$count]['produto_valor'] = number_format(($item->getFinalPrice() ? $item->getFinalPrice() : $item->getPrice()), '2'); |
This file contains hidden or 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
| {"recebedor_api_token":"6F3BED11-410F-48B7-9AD3-0C8966A1891B","recebedor_email":"example_seller@paybras.com","pagador_nome":"Denis Colli","pagador_cpf":"16713462200","pagador_email":"deniscsz@gmail.com","pagador_data_nascimento":"10\/10\/1900","pagador_telefone_ddd":"11","pagador_telefone":"21515151","pagador_celular_ddd":false,"pagador_celular":false,"pagador_sexo":null,"cartao_portador_nome":"Colli DSA","cartao_numero":"376411112222331","cartao_bandeira":"amex","cartao_validade_mes":"03","cartao_validade_ano":"15","cartao_parcelas":"4","cartao_codigo_de_seguranca":"222","numberPayment":"4","cartao_portador_telefone_ddd":false,"cartao_portador_telefone":false,"cartao_portador_cpf":"167.134.622-00","cartao_portador_data_de_nascimento":"17\/11\/1987","pedido_meio_pagamento":"cartao","pedido_id":"100000150","pedido_valor_total_original":"64.90","pagador_logradouro":"Rua Comiss\u00e1rio Oct\u00e1vio Queiroz","pagador_numero":"1000","pagador_complemento":"X","pagador_bairro":"Jardim da Penha","pagador_cep":"29060 |
This file contains hidden or 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
| if(Mage::getSingleton('core/session')->getMsgEditError()) { | |
| echo '<ul class="messages"><li class="notice-msg"><ul><li><span>'.Mage::getSingleton('core/session')->getMsgEditError().'</span></li></ul></li></ul>'; | |
| Mage::getSingleton('core/session')->unsMsgEditError(); | |
| } |
This file contains hidden or 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
| {"recebedor_api_token":"6F3BED11-410F-48B7-9AD3-0C8966A1891B","recebedor_email":"example_seller@paybras.com","pagador_nome":"Denis Colli","pagador_cpf":"22245669991","pagador_email":"deniscsz@gmail.com","pagador_data_nascimento":"11\/11\/1980","pagador_telefone_ddd":"27","pagador_telefone":"97537493","pagador_celular_ddd":false,"pagador_celular":false,"pagador_sexo":null,"cartao_portador_nome":"Xoasd DSAidoj","cartao_numero":"4073020000000002","cartao_bandeira":"visa","cartao_validade_mes":"02","cartao_validade_ano":"14","cartao_parcelas":"1","cartao_codigo_de_seguranca":"123","numberPayment":"1","cartao_portador_telefone_ddd":false,"cartao_portador_telefone":false,"cartao_portador_cpf":"633.505.640-20","cartao_portador_data_de_nascimento":"03\/06\/1999","pedido_meio_pagamento":"cartao","pedido_id":"100000152","pedido_valor_total_original":"64.90","pagador_logradouro":"Rua do Centro","pagador_numero":"1200","pagador_complemento":"Apt 502","pagador_bairro":"Centro","pagador_cep":"29060-270","pagador_cidade":"V |
This file contains hidden or 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
| /* Produtos */ | |
| $items = $order->getAllVisibleItems(); | |
| $count = 0; | |
| foreach ($items as $item) { | |
| $fields['produtos'][$count]['produto_codigo'] = $item->getSku(); | |
| $fields['produtos'][$count]['produto_nome'] = $item->getName(); | |
| $fields['produtos'][$count]['produto_qtd'] = $item->getQtyOrdered(); | |
| if($item->getWeight() < 500.00) { | |
| $fields['produtos'][$count]['produto_peso'] = number_format($item->getWeight(), '2'); | |
| } |
This file contains hidden or 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
| /** | |
| * calculates total value from quote | |
| * | |
| * @return int|float | |
| */ | |
| public function getShippingPrice() { | |
| /** | |
| * get quote items | |
| */ | |
| $items = Mage::getSingleton('checkout/cart')->getItems(); |
This file contains hidden or 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
| $j('input[name*="telephone"]').keypress( function(e){ | |
| if (e.keyCode >= 9){ | |
| length = this.value.length; | |
| if (length == 0) | |
| this.value += "("; | |
| if (length == 3) | |
| this.value += ")"; | |
| /* | |
| Testa para ver se o ddd começa com 11 e coloca maxlength para 14. Para outros DDDs, alterar Regex. |
This file contains hidden or 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 | |
| define('MAGENTO', realpath(dirname(__FILE__))); | |
| set_time_limit (0); | |
| require_once MAGENTO . '/app/Mage.php'; | |
| Mage::app(); | |
| $sitemap = simplexml_load_file('http://www.cpaps.com.br/sitemap.xml'); | |
| foreach($sitemap->url as $url_list) { | |
| $_url = $url_list->loc; |
This file contains hidden or 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
| /** | |
| @params: SessionId (Autenticação), Tipo do Produto, ID do SET (veja tabela no google drive), SKU, Atributos (Array) | |
| */ | |
| $result = $client->catalogProductCreate($session, 'simple', '11', 'product_sku2', array( | |
| 'categories' => array(2), //Id das categorias | |
| 'websites' => array(1), //Utilizar sempre 1 | |
| 'name' => 'Product ERP', //Nome | |
| 'description' => 'Product description', //Descrição | |
| 'weight' => '10', //Peso |