jeudi 28 juillet 2016

Conditional statement for attribute in an array

I have an array that gets imported daily. For the specific field 'special_price' i only want it to import into Main Website > Main Website Store > Default Store View

Default store view = 1

  protected function _getFieldNames()
        {
            return array(
                'company_number',
                'sku',
                'style_number',
                'name',
                'div_code',
                'div_desc',
                'color_code',
                'color',
                'size_type',
                'size',
                'price',
                'weight',
                'description',
                'special_price',
                'tax_code',
            );
        }

I can instantiate the class like so:

$storeId = Mage::app()->getStore()->getStoreId();

My question is how to parse that one specific field for only the default store and let the other updates run as usual. I assume i'm using an IF statement.

Aucun commentaire:

Enregistrer un commentaire