Skip to content

Commit

Permalink
Merge pull request #154 from mateus007/correios_tab
Browse files Browse the repository at this point in the history
Aba dos Correios na edição de produtos
  • Loading branch information
pedro-teixeira committed May 17, 2016
2 parents b9670d9 + 0b9c3be commit c156be0
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/code/community/PedroTeixeira/Correios/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<config>
<modules>
<PedroTeixeira_Correios>
<version>4.6.0</version>
<version>4.7.0</version>
<depends>
<Mage_Shipping/>
</depends>
Expand Down Expand Up @@ -421,15 +421,15 @@
<sro_password>SRO</sro_password>
<sro_type>L</sro_type>
<sro_result>U</sro_result>

<sro_event_type_notify>BDE,BDI,BDR,FC,LDI,OEC</sro_event_type_notify>
<sro_event_status_notify_bde>0,1,2,7,20,24,25,34,45,54,55</sro_event_status_notify_bde>
<sro_event_status_notify_bdi>0,1,2,7,20,24,25,34,45,54,55</sro_event_status_notify_bdi>
<sro_event_status_notify_bdr>0,1,2,7,20,24,25,34,45,54,55</sro_event_status_notify_bdr>
<sro_event_status_notify_fc>4,7</sro_event_status_notify_fc>
<sro_event_status_notify_ldi>0,1,2,3,14</sro_event_status_notify_ldi>
<sro_event_status_notify_oec>0,1</sro_event_status_notify_oec>

<sro_event_type_warn>BDE,BDI,BDR,FC,LDI,OEC</sro_event_type_warn>
<sro_event_status_warn_bde>3,4,5,6,7,8,9,10,12,19,21,22,23,26,28,33,34,35,36,37,38,40,41,42,43,48,49,50,51,52,54,55,56,57,58,59,69</sro_event_status_warn_bde>
<sro_event_status_warn_bdi>3,4,5,6,7,8,9,10,12,19,21,22,23,26,28,33,34,35,36,37,38,40,41,42,43,48,49,50,51,52,54,55,56,57,58,59,69</sro_event_status_warn_bdi>
Expand All @@ -438,12 +438,12 @@
<sro_event_status_warn_ldi>0,1,3,14</sro_event_status_warn_ldi>
<sro_event_status_warn_fc>1,4,5</sro_event_status_warn_fc>
<sro_event_status_warn_idc>1,2,3,4,5,6,7</sro_event_status_warn_idc>

<sro_event_type_last>BDE,BDI,BDR</sro_event_type_last>
<sro_event_status_last_bde>0,1</sro_event_status_last_bde>
<sro_event_status_last_bdi>0,1</sro_event_status_last_bdi>
<sro_event_status_last_bdr>0,1</sro_event_status_last_bdr>

<url_sro_correios>http://websro.correios.com.br/sro_bin/sroii_xml.eventos</url_sro_correios>
<url_tracking>http://websro.correios.com.br/sro_bin/txect01$.QueryList</url_tracking>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

/**
* This source file is subject to the MIT License.
* It is also available through http://opensource.org/licenses/MIT
*
* @category PedroTeixeira
* @package PedroTeixeira_Correios
* @author Pedro Teixeira <hello@pedroteixeira.io>
* @copyright 2015 Pedro Teixeira (http://pedroteixeira.io)
* @license http://opensource.org/licenses/MIT MIT
* @link https://github.com/pedro-teixeira/correios
*/

/** @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$setIds = $setup->getAllAttributeSetIds('catalog_product');

$attributes = array(
'volume_comprimento',
'volume_altura',
'volume_largura',
'postmethods',
'fit_size',
'posting_days'
);

foreach ( $setIds as $setId ) {

$setup->addAttributeGroup('catalog_product', $setId, 'Correios', 2);
$groupId = $setup->getAttributeGroupId('catalog_product', $setId, 'Correios');

foreach ( $attributes as $attribute ) {
$attributeId = $setup->getAttributeId('catalog_product', $attribute);
$setup->addAttributeToGroup('catalog_product', $setId, $groupId, $attributeId);
}

}

$installer->endSetup();

0 comments on commit c156be0

Please sign in to comment.