apply_to fix #466

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

if one of the fields apply_to is null here (which means it applies to all products) it was getting set to only apply to downloadable products. I saw this specifically with the cost attribute.

Jason Neumann added some commits Jan 9, 2014

Jason Neumann apply_to downloadable fix
if one of the fields apply_to is null here (which means it applies to all products) it was getting set to only apply to downloadable products. I saw this specifically with the cost attribute.
359b0b4
Jason Neumann another place apply to gets broken 482a4e1

@mariuszgomse mariuszgomse commented on the diff Jan 20, 2014

...nto/Bundle/data/bundle_setup/data-install-1.6.0.0.php
@@ -32,8 +32,9 @@
'minimal_price','cost','tier_price','weight'
);
foreach ($fieldList as $field) {
- $applyTo = explode(',', $installer->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $field, 'apply_to'));
- if (!in_array('bundle', $applyTo)) {
+ $applyToStr = $installer->getAttribute(Mage_Catalog_Model_Product::ENTITY, $field, 'apply_to');
+ $applyTo = explode(',', $applyToStr);
@mariuszgomse

mariuszgomse Jan 20, 2014

One more tab will be good here :)

@mariuszgomse mariuszgomse commented on the diff Jan 20, 2014

...nto/Bundle/data/bundle_setup/data-install-1.6.0.0.php
@@ -32,8 +32,9 @@
'minimal_price','cost','tier_price','weight'
);
foreach ($fieldList as $field) {
- $applyTo = explode(',', $installer->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $field, 'apply_to'));
- if (!in_array('bundle', $applyTo)) {
+ $applyToStr = $installer->getAttribute(Mage_Catalog_Model_Product::ENTITY, $field, 'apply_to');
+ $applyTo = explode(',', $applyToStr);
+ if (!empty($applyToStr) &&!in_array('bundle', $applyTo)) {
@mariuszgomse

mariuszgomse Jan 20, 2014

space after && will be great

Contributor

verklov commented Feb 10, 2014

Hello @jason-neumann , the team looked at the issue and asked to update the description for the issue. Could you please extend on the description of the issue you try to solve with this pull request? Thank you!

Contributor

verklov commented Apr 29, 2014

@jason-neumann, the team has finished reviewing the case you reported. Here is the response:

The Magento_Bundle and Magento_Downloadable modules are installed after the Magento_Catalog module.

All these attributes 'price','special_price','special_from_date','special_to_date', 'minimal_price','cost','tier_price','weight' have initial values for 'apply_to' value.

Basing on this, we cannot accept your contribution.

We are closing this pull request.

verklov closed this Apr 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment