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

"Use default value" with category: how? #403

Open
ZaneCEO opened this issue Aug 24, 2017 · 0 comments
Open

"Use default value" with category: how? #403

ZaneCEO opened this issue Aug 24, 2017 · 0 comments

Comments

@ZaneCEO
Copy link

ZaneCEO commented Aug 24, 2017

Hi,
I'm experiencing a problem similar to #402 , but this time is with categories.

I'm trying to import a category array where:

Index 0: the default scope
Index 1: values for the it store
Index 2: values for the en store

The goal is to set Use default value for the ###EMPTY### values.

This is my array, and it works like a charm:

‌‌$arrAvS
‌array (
  0 => 
  array (
    '_root' => 'Default Category',
    'is_active' => 'yes',
    'include_in_menu' => 'yes',
    'available_sort_by' => NULL,
    'default_sort_by' => 'position',
    'display_mode' => 'static block only',
    'code_category' => 'D',
    '_category' => 'My category',
    'url_key' => 'my-cat',
    'meta_title' => 'DEFAULT: meta-title',
    'meta_description' => 'DEFAULT: meta-descr',
    'description' => 'DEFAULT: descr',
  ),
  1 => 
  array (
    '_store' => 'it',
    'name' => 'IT: name',
    'url_key' => 'it-slug',
    'meta_title' => 'ITA: meta-title',
    'meta_description' => 'ITA: meta-descr',
    'description' => 'ITA: descr',
  ),
  2 => 
  array (
    '_store' => 'en',
    'meta_title' => 'EN: meta-title',
    'meta_description' => 'EN: meta-descr',
    'name' => 'EN: name',
    'url_key' => 'en-slug',
    'description' => 'EN: description',
  ),
)

Again, this works as expected.

The problem occurs when I want to set the store value to Use default value. For example, i change the second array from 'name' => 'EN: name', to 'name' => '###EMPTY###' (description also). In this scenario, the name|description fields in the EN storeview simply get set to empty

Screenshot

The importing code is:

$import = Mage::getModel('fastsimpleimport/import');
$import->processCategoryImport($arrAvS);

Admin config:

Screenshot

The store is a july-SUPEE patched Magento ver. 1.9.2.4.

AvS is 0.7.1.

Any help is greatly appreciated, thanks!


One more example:

        $data = array();
        $data[] = array(
            '_root' => 'Default Category',
            '_category' => 'Myyy Category',
            'description' => 'Myyy Category Description',
            'is_active' => 'yes',
            'include_in_menu' => 'yes',
            'meta_description' => 'Myyy Category Meta',
            'available_sort_by' => 'position',
            'default_sort_by' => 'position',
        );

        $data[] = array(
            '_store' => 'en',
            'name' => 'I don't want to put a custom text here, must use default',
            'description' => 'Myyy Category EN DESCR'
        );


        $this->import
            ->processCategoryImport($data);

To use default for name, I changed the second element to:

'name' => false

nope, still do not use default, displays empty text

'name' => null,

nope

'name' => Mage::getStoreConfig('fastsimpleimport/general/symbol_for_clear_field')

nope

I'm fresh out of ideas, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant