Version Notes
* Adicionada opção para não exibir o prazo de entrega
Download this release
Release Info
| Developer | Willian |
| Extension | correios |
| Version | 1.0.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.2 to 1.0.3
app/code/community/Storm/Correios/Model/Carrier/Shipping.php
CHANGED
|
@@ -51,7 +51,7 @@ class Storm_Correios_Model_Carrier_Shipping extends Mage_Shipping_Model_Carrier_
|
|
| 51 |
$method->setCarrier($this->_code)
|
| 52 |
->setCarrierTitle($this->getConfigData('title'))
|
| 53 |
->setMethod($rate->getCode())
|
| 54 |
-
->setMethodTitle($this->_getMethodTitle($rate,
|
| 55 |
->setCost($rate->getPrice())
|
| 56 |
->setPrice($this->_getFinalPrice($rate, $request));
|
| 57 |
|
|
@@ -65,6 +65,11 @@ class Storm_Correios_Model_Carrier_Shipping extends Mage_Shipping_Model_Carrier_
|
|
| 65 |
return $result;
|
| 66 |
}
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
/**
|
| 69 |
* Adds the error message in the result
|
| 70 |
*
|
|
@@ -284,7 +289,11 @@ class Storm_Correios_Model_Carrier_Shipping extends Mage_Shipping_Model_Carrier_
|
|
| 284 |
$title = $this->_getHelper()->getMethodTitle($method->getCode());
|
| 285 |
|
| 286 |
if ($includeDeliveryTime) {
|
| 287 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
}
|
| 289 |
|
| 290 |
return $title;
|
| 51 |
$method->setCarrier($this->_code)
|
| 52 |
->setCarrierTitle($this->getConfigData('title'))
|
| 53 |
->setMethod($rate->getCode())
|
| 54 |
+
->setMethodTitle($this->_getMethodTitle($rate, $this->_canShowDeliverytime()))
|
| 55 |
->setCost($rate->getPrice())
|
| 56 |
->setPrice($this->_getFinalPrice($rate, $request));
|
| 57 |
|
| 65 |
return $result;
|
| 66 |
}
|
| 67 |
|
| 68 |
+
protected function _canShowDeliverytime()
|
| 69 |
+
{
|
| 70 |
+
return (bool) $this->_getHelper()->getConfigData('show_deliverytime');
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
/**
|
| 74 |
* Adds the error message in the result
|
| 75 |
*
|
| 289 |
$title = $this->_getHelper()->getMethodTitle($method->getCode());
|
| 290 |
|
| 291 |
if ($includeDeliveryTime) {
|
| 292 |
+
if($method->getDeliveryTime() > 1) {
|
| 293 |
+
return $this->_getHelper()->__('%s (%d working days)', $title, $method->getDeliveryTime());
|
| 294 |
+
} else {
|
| 295 |
+
return $this->_getHelper()->__('%s (%d working day)', $title, $method->getDeliveryTime());
|
| 296 |
+
}
|
| 297 |
}
|
| 298 |
|
| 299 |
return $title;
|
app/code/community/Storm/Correios/etc/config.xml
CHANGED
|
@@ -94,8 +94,9 @@
|
|
| 94 |
<name>Correios</name>
|
| 95 |
<title>Correios</title>
|
| 96 |
<debug_mode>0</debug_mode>
|
| 97 |
-
<showmethod>1</showmethod>
|
| 98 |
<free_shipping_method>no-free-shipping</free_shipping_method>
|
|
|
|
| 99 |
</correios>
|
| 100 |
</carriers>
|
| 101 |
</default>
|
| 94 |
<name>Correios</name>
|
| 95 |
<title>Correios</title>
|
| 96 |
<debug_mode>0</debug_mode>
|
| 97 |
+
<showmethod>1</showmethod>
|
| 98 |
<free_shipping_method>no-free-shipping</free_shipping_method>
|
| 99 |
+
<show_deliverytime>1</show_deliverytime>
|
| 100 |
</correios>
|
| 101 |
</carriers>
|
| 102 |
</default>
|
app/code/community/Storm/Correios/etc/system.xml
CHANGED
|
@@ -115,11 +115,20 @@
|
|
| 115 |
<show_in_website>1</show_in_website>
|
| 116 |
<show_in_store>1</show_in_store>
|
| 117 |
</showmethod>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
<handling_type translate="label">
|
| 119 |
<label>Calculate Handling Fee</label>
|
| 120 |
<frontend_type>select</frontend_type>
|
| 121 |
<source_model>shipping/source_handlingType</source_model>
|
| 122 |
-
<sort_order>
|
| 123 |
<show_in_default>1</show_in_default>
|
| 124 |
<show_in_website>1</show_in_website>
|
| 125 |
<show_in_store>0</show_in_store>
|
|
@@ -128,8 +137,8 @@
|
|
| 128 |
<label>Handling Fee</label>
|
| 129 |
<frontend_type>text</frontend_type>
|
| 130 |
<comment><![CDATA[This value will be added on final price of shipping]]></comment>
|
| 131 |
-
<validate>validate-number
|
| 132 |
-
<sort_order>
|
| 133 |
<show_in_default>1</show_in_default>
|
| 134 |
<show_in_website>1</show_in_website>
|
| 135 |
<show_in_store>0</show_in_store>
|
| 115 |
<show_in_website>1</show_in_website>
|
| 116 |
<show_in_store>1</show_in_store>
|
| 117 |
</showmethod>
|
| 118 |
+
<show_deliverytime>
|
| 119 |
+
<label>Show delivery time</label>
|
| 120 |
+
<frontend_type>select</frontend_type>
|
| 121 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 122 |
+
<sort_order>12</sort_order>
|
| 123 |
+
<show_in_default>1</show_in_default>
|
| 124 |
+
<show_in_website>1</show_in_website>
|
| 125 |
+
<show_in_store>1</show_in_store>
|
| 126 |
+
</show_deliverytime>
|
| 127 |
<handling_type translate="label">
|
| 128 |
<label>Calculate Handling Fee</label>
|
| 129 |
<frontend_type>select</frontend_type>
|
| 130 |
<source_model>shipping/source_handlingType</source_model>
|
| 131 |
+
<sort_order>13</sort_order>
|
| 132 |
<show_in_default>1</show_in_default>
|
| 133 |
<show_in_website>1</show_in_website>
|
| 134 |
<show_in_store>0</show_in_store>
|
| 137 |
<label>Handling Fee</label>
|
| 138 |
<frontend_type>text</frontend_type>
|
| 139 |
<comment><![CDATA[This value will be added on final price of shipping]]></comment>
|
| 140 |
+
<validate>validate-number</validate>
|
| 141 |
+
<sort_order>14</sort_order>
|
| 142 |
<show_in_default>1</show_in_default>
|
| 143 |
<show_in_website>1</show_in_website>
|
| 144 |
<show_in_store>0</show_in_store>
|
app/locale/pt_BR/Storm_Correios.csv
CHANGED
|
@@ -21,7 +21,8 @@
|
|
| 21 |
"The heigth of the products is greater than %d cm","A altura dos produtos é maior do que %d cm"
|
| 22 |
"The length of the products is greater than %d cm","O comprimento dos produtos é maior do que %d cm"
|
| 23 |
"The dimensions of the products have passed the limit of of %d cm","As dimensões dos produtos passaram do limite de %d cm"
|
| 24 |
-
"%s
|
|
|
|
| 25 |
"Please, enter the postcode correctly.","Por favor, digite o código postal corretamente"
|
| 26 |
"The package weight exceeds the weight limit.","O peso do pacote excede o peso limite."
|
| 27 |
"Show method if not applicable","Mostrar método se não aplicável"
|
|
@@ -32,11 +33,12 @@
|
|
| 32 |
"Handling Fee","Taxa de Manuseio"
|
| 33 |
"Calculate Handling Fee","Cálculo de Taxa de Manuseio"
|
| 34 |
"Fixed","Fixo"
|
| 35 |
-
"Percent","
|
| 36 |
"Title","Título"
|
| 37 |
"Enabled","Habilitado"
|
| 38 |
"Yes","Sim"
|
| 39 |
"No","Não"
|
| 40 |
"This value will be added on final price of shipping","Este valor será adicionado no preço final do frete"
|
| 41 |
"The extension of PHP Soap must be installed so that the module Correios to function properly.","A extensão do PHP Soap deve estar instalada para que o módulo dos Correios funcione corretamente."
|
| 42 |
-
"You must to install PHP Soap extension to use shipping method Correios.","Você deve instalar a extensão Soap do PHP para usar o método de entrega dos Correios."
|
|
|
| 21 |
"The heigth of the products is greater than %d cm","A altura dos produtos é maior do que %d cm"
|
| 22 |
"The length of the products is greater than %d cm","O comprimento dos produtos é maior do que %d cm"
|
| 23 |
"The dimensions of the products have passed the limit of of %d cm","As dimensões dos produtos passaram do limite de %d cm"
|
| 24 |
+
"%s (%d working days)","%s (%d dias úteis)"
|
| 25 |
+
"%s (%d working day)","%s (%d dia útil)"
|
| 26 |
"Please, enter the postcode correctly.","Por favor, digite o código postal corretamente"
|
| 27 |
"The package weight exceeds the weight limit.","O peso do pacote excede o peso limite."
|
| 28 |
"Show method if not applicable","Mostrar método se não aplicável"
|
| 33 |
"Handling Fee","Taxa de Manuseio"
|
| 34 |
"Calculate Handling Fee","Cálculo de Taxa de Manuseio"
|
| 35 |
"Fixed","Fixo"
|
| 36 |
+
"Percent","Porcentagem"
|
| 37 |
"Title","Título"
|
| 38 |
"Enabled","Habilitado"
|
| 39 |
"Yes","Sim"
|
| 40 |
"No","Não"
|
| 41 |
"This value will be added on final price of shipping","Este valor será adicionado no preço final do frete"
|
| 42 |
"The extension of PHP Soap must be installed so that the module Correios to function properly.","A extensão do PHP Soap deve estar instalada para que o módulo dos Correios funcione corretamente."
|
| 43 |
+
"You must to install PHP Soap extension to use shipping method Correios.","Você deve instalar a extensão Soap do PHP para usar o método de entrega dos Correios."
|
| 44 |
+
"Show delivery time","Mostrar o prazo de entrega"
|
package.xml
CHANGED
|
@@ -1,44 +1,30 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>correios</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
-
<summary>Módulo
|
| 10 |
-
<description>
|
| 11 |
-
|
| 12 |
-

|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-

|
| 19 |
-
|
| 20 |
-

|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
- e-Sedex
|
| 25 |
-
- e-Sedex prioritário
|
| 26 |
-
- e-Sedex express
|
| 27 |
-

|
| 28 |
-
Funções do módulo:
|
| 29 |
-

|
| 30 |
-
* Rastreador de objeto em tempo real
|
| 31 |
-
* Escolha do método de frete grátis inteligente ( segue regras de promoção )
|
| 32 |
-
* Possibilidade de adicionar dias ao prazo de entrega
|
| 33 |
-
* Fácil tradução de todas as mensagens
|
| 34 |
-
* Configuração fácil e intuítiva</description>
|
| 35 |
-
<notes>* Verificação da extensão PHP Soap
|
| 36 |
-
* Melhorada mensagem de prazo de entrega
|
| 37 |
-
* Adicionado link para wiki nas configurações</notes>
|
| 38 |
<authors><author><name>Willian</name><user>willsouza</user><email>williancordeirodesouza@gmail.com</email></author></authors>
|
| 39 |
-
<date>2013-04-
|
| 40 |
-
<time>
|
| 41 |
-
<contents><target name="magecommunity"><dir name="Storm"><dir name="Correios"><dir name="Helper"><file name="Data.php" hash="c0344a3cccf20787f115b24cacef68b7"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Observer.php" hash="3e2d7ae7abb9dc2131f2a7868fd89d87"/></dir><dir name="Carrier"><dir name="Package"><file name="Dimension.php" hash="88d12d19a36e753c94f30c08431e9c45"/></dir><dir name="Shipping"><file name="Tracking.php" hash="6eb85dafb65d4d35bbf36a609905aae7"/></dir><file name="Shipping.php" hash="
|
| 42 |
<compatible/>
|
| 43 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 44 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>correios</name>
|
| 4 |
+
<version>1.0.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
+
<summary>Módulo de cálculo de frete e prazo de entrega dos Correios com Pac, Sedex, Sedex 10, Sedex Hoje e e-Sedex.</summary>
|
| 10 |
+
<description>Módulo para efetuar cálculo de frete e prazo de entrega dos Correios.<br /> 
|
| 11 |
+
As seguintes funções estão disponíves:<br /><br />
|
| 12 |
+
* Entrega com Sedex, Sedex a cobrar, Sedex 10, Sedex hoje, Pac, e-Sedex, e-Sedex prioritário e e-Sedex express.<br />
|
| 13 |
+
* Confingurações para comerciantes com contrato com os Correios com preço diferenciado.<br />
|
| 14 |
+
* Rastreador de objeto em tempo real.<br />
|
| 15 |
+
* Escolha do método de frete grátis inteligente ( segue regras de promoção ).<br />
|
| 16 |
+
* Possibilidade de adicionar dias ao prazo de entrega.<br /> 
|
| 17 |
+
* Possibilidade de adicionar taxa de manuseio fixa ou percentual.<br />
|
| 18 |
+
* Configuração e instalação fácil e intuítiva.<br />
|
| 19 |
+
<br />
|
| 20 |
+
Caso tenha dúvida de como instalar e configurar o módulo <a href="https://bitbucket.org/willcs/correios/wiki">acesse nosso Wiki</a>.<br />
|
| 21 |
+
<hr />
|
| 22 |
+
This module is available only to Brazil.</description>
|
| 23 |
+
<notes>* Adicionada opção para não exibir o prazo de entrega</notes>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
<authors><author><name>Willian</name><user>willsouza</user><email>williancordeirodesouza@gmail.com</email></author></authors>
|
| 25 |
+
<date>2013-04-26</date>
|
| 26 |
+
<time>01:39:21</time>
|
| 27 |
+
<contents><target name="magecommunity"><dir name="Storm"><dir name="Correios"><dir name="Helper"><file name="Data.php" hash="c0344a3cccf20787f115b24cacef68b7"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Observer.php" hash="3e2d7ae7abb9dc2131f2a7868fd89d87"/></dir><dir name="Carrier"><dir name="Package"><file name="Dimension.php" hash="88d12d19a36e753c94f30c08431e9c45"/></dir><dir name="Shipping"><file name="Tracking.php" hash="6eb85dafb65d4d35bbf36a609905aae7"/></dir><file name="Shipping.php" hash="bd6ee1f366902a4d202b48357fb3ca70"/><file name="Webservice.php" hash="79c7b0d57285e94b82b1c47521da3675"/></dir><dir name="Catalog"><dir name="Resource"><file name="Setup.php" hash="833a10b8bc912d3df9818f3b0f86d442"/></dir></dir><dir name="Source"><file name="FreeMethods.php" hash="67646bf270c42fa6fa8b79de336236b3"/><file name="Methods.php" hash="d9118016fe15471f813682385c95a93b"/></dir></dir><dir name="etc"><file name="config.xml" hash="2c44532bab3a88901458f87e0addb250"/><file name="system.xml" hash="e5873a80b24f0234ffe30194baf6765b"/></dir><dir name="sql"><dir name="correios_setup"><file name="mysql4-install-0.1.0.php" hash="dca339c0e46e4b9d116bc1eea9d09930"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Storm_Correios.csv" hash="614f83b94693fbb2e05f85ed6030d6d0"/></dir></target><target name="mageetc"><dir name="modules"><file name="Storm_Correios.xml" hash="93aa3a9938657131b77fa2a2e60abd71"/></dir></target></contents>
|
| 28 |
<compatible/>
|
| 29 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 30 |
</package>
|
