Skip to content

Commit

Permalink
#46 Correção do build
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelpatro committed Dec 22, 2014
2 parents 07795c3 + 4048153 commit 9358424
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ protected function _filterByItem()
/* @var $_product Mage_Catalog_Model_Product */
$product = Mage::getModel('catalog/product')->load($item->getProductId());
$postMethodsList = explode(',', $this->_postMethods);
$prodPostMethods = (array) $product->getAttributeText('postmethods');
$prodPostMethods = explode(',', $product->getData('postmethods'));
$intersection = array_intersect($prodPostMethods, $postMethodsList);
$this->_postMethods = implode(',', $intersection);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
*
* @category PedroTeixeira
* @package PedroTeixeira_Correios
* @copyright Copyright (c) 2014 Pedro Teixeira (http://pedroteixeira.io)
* @author Pedro Teixeira <hello@pedroteixeira.io>
* @license http://opensource.org/licenses/MIT
* @copyright 2014 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 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@
'position' => 1,
'required' => 0,
'label' => 'Serviços de Entrega',
'type' => 'varchar',
'type' => 'text',
'input' => 'multiselect',
'source' => 'pedroteixeira_correios/source_postMethods',
'backend' => 'eav/entity_attribute_backend_array',
'apply_to' => 'simple,bundle,grouped,configurable',
'note' => 'Selecione os serviços apropriados para o produto.'
);
Expand All @@ -83,7 +84,7 @@
'type' => 'varchar',
'input' => 'text',
'apply_to' => 'simple,bundle,grouped,configurable',
'note' => 'Caso o produto possa ser encaixado, especifique a diferença de tamanho do encaixe (Exemplo: Um item mede 10cm de altura. Dois itens encaixados medem 11cm. A diferença é de 1cm.)'
'note' => 'Exemplo: Se 1 item mede 10cm de altura, e 2 itens encaixados medem 11cm. A diferença é de 1cm.'
);

$setup->addAttribute('catalog_product', $codigo, $config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
'position' => 1,
'required' => 0,
'label' => 'Serviços de Entrega',
'type' => 'varchar',
'type' => 'text',
'input' => 'multiselect',
'source' => 'pedroteixeira_correios/source_postMethods',
'backend' => 'eav/entity_attribute_backend_array',
'apply_to' => 'simple,bundle,grouped,configurable',
'note' => 'Selecione os serviços apropriados para o produto.'
);
Expand All @@ -41,7 +42,7 @@
'type' => 'varchar',
'input' => 'text',
'apply_to' => 'simple,bundle,grouped,configurable',
'note' => 'Caso o produto possa ser encaixado, especifique a diferença de tamanho do encaixe (Exemplo: Um item mede 10cm de altura. Dois itens encaixados medem 11cm. A diferença é de 1cm.)'
'note' => 'Exemplo: Se 1 item mede 10cm de altura, e 2 itens encaixados medem 11cm. A diferença é de 1cm.'
);

$setup->addAttribute('catalog_product', $codigo, $config);
Expand Down

0 comments on commit 9358424

Please sign in to comment.