|
marcelo.reis - 21 February 2011 06:45 AM
To com problema no boleto do santader , baixei e instalei o cushy mag ,depois instalei o boleto php.
o problema eh, aparece o do BB,Real,Itau e Bradesco,mas o santader não aparece alguem sabe pq?
obrigado pela ateção!!
Olá pessoal, este tópico está sendo de grande importância para meus estudos em Magento.
Eu estava com a mesma dificuldade que o marcelo.reis citou anteriormente, até consegui evoluir a questão, mas estou precisando de ajuda.
Para que o pagamento por boleto santander apareça no admin:
Criei um arquivo “Santander.php” na pasta app/code/community/Cushy/Boleto/Model/ com o seguinte código:
<?php class Cushy_Boleto_Model_Santander_banespa extends Cushy_Boleto_Model_Standard { /** * _code property * * @var string */ protected $_code = 'boleto_santander_banespa';
/** * Prepare the values to show in the bill * * @see Cushy_Boleto_Model_Standard::prepareValues * @param Mage_Sales_Model_Order $order * @param array $values * @return array Values to Display */ protected function _prepareValues(Mage_Sales_Model_Order $order, $values) { $values = array_merge($values, array( 'quantidade' => '001', 'valor_unitario' => $values['valor_boleto'], 'aceite' => '', 'especie' => 'R$', 'especie_doc' => '', 'conta_cedente' => $values['conta'], 'conta_cedente_dv' => $values['conta_dv'], 'carteira' => '102' ));
return $values; } }
Eu também criei as referências no arquivos config.xml e system.xml
No arquivo system.xml
<boleto_santander_banespa translate="label" module="paygate"> <label>Boleto Bancário - Santander</label> <sort_order>670</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> <fields> <active translate="label"> <label>Enabled</label> <frontend_type>select</frontend_type> <source_model>adminhtml/system_config_source_yesno</source_model> <sort_order>1</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </active> <title translate="label"> <label>Title</label> <frontend_type>text</frontend_type> <sort_order>2</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </title> <due_date translate="label"> <label>Due Date (in days)</label> <frontend_type>text</frontend_type> <sort_order>5</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </due_date> <instructions translate="label"> <label>Instructions (Maximum of four lines)</label> <frontend_type>textarea</frontend_type> <sort_order>6</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </instructions> <informations translate="label"> <label>Extra Informations (Maximum of three lines)</label> <frontend_type>textarea</frontend_type> <sort_order>7</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </informations> <identification translate="label"> <label>Identification</label> <frontend_type>text</frontend_type> <sort_order>8</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </identification> <cpf_cnpj translate="label"> <label>CPF / CNPJ</label> <frontend_type>text</frontend_type> <sort_order>9</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </cpf_cnpj> <address translate="label"> <label>Address</label> <frontend_type>text</frontend_type> <sort_order>10</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </address> <city_region translate="label"> <label>City / Region</label> <frontend_type>text</frontend_type> <sort_order>11</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </city_region> <transferor translate="label"> <label>Transferor</label> <frontend_type>text</frontend_type> <sort_order>12</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </transferor> <agency translate="label"> <label>Agency (Only numbers)</label> <frontend_type>text</frontend_type> <sort_order>13</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </agency> <account translate="label"> <label>Account (Only numbers)</label> <frontend_type>text</frontend_type> <sort_order>14</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>0</show_in_store> </account> </fields> </boleto_santander_banespa>
no arquivo config.xml
<boleto_santander_banespa> <active>0</active> <model>Cushy_Boleto_Model_Santander_banespa</model> <title>Boleto Bancário - Santander</title> <due_date>5</due_date> </boleto_santander_banespa>
Certo, desta forma eu consegui inserir a opção para o boleto bancário santander no admin do magento, com suas devidas opções.
Mas, ao fazer um teste na loja, não obtenho sucesso, ao fazer o pedido, a opção de pagamento por boleto santander aparece no momento da compra, o pedido imprime, mas na hora de imprimir o boleto, fica tudo em branco.
Acredito que esteja errando no arquivo Santander.php, alguém poderia alterar ou acrescentar algo neste código para concluírmos essa opção de pagamento tão importante para todos nós?
Será que essa opção só funcionaria com as opções corretamente preenchidas, como no caso do boleto BB?
O código para 2ª via de boleto ficou show! Aguardo uma resposta pessoal...Obrigado pela atenção!
|