Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aba dos Correios na edição de produtos #154

Merged
merged 2 commits into from
May 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();