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

"Exclude child attributes" doesn't show all attributes #79

Open
6 tasks
DuckThom opened this issue Nov 28, 2024 · 2 comments
Open
6 tasks

"Exclude child attributes" doesn't show all attributes #79

DuckThom opened this issue Nov 28, 2024 · 2 comments

Comments

@DuckThom
Copy link
Contributor

Issue Brief

The list of attributes shown in the backend config "Exclude child attributes" does not show all the available product attributes.
This is the default config for this setting:

<exclude_child_attributes>url_key,small_image,small_image_label,thumbnail_label,status,tax_class_id,type_id,required_options,visibility</exclude_child_attributes>

However, when a custom config is set, overriding the default line above, visibility (among others) is then duplicated for Bundle and Configurable products.
The "Exclude child attributes" should prevent this, but as visibility is not one of the options in the list, it's not possible to add it back.
This results in certain Bundle/Configurable products being searchable, even when their visibility is set to "Catalog" as one or more child items has "Catalog, Search".

Environment

  • PHP Version: 8.1.29
  • Magento Version: 2.4.6-p8
  • Magento Enterprise: no
  • Tweakwise Export Version: v7.1.0
  • Magento Deploy Mode: production
  • Third party modules: n.a.

Steps to reproduce

  1. Install Magento with the export module
  2. Check the "Exclude child attributes" setting to see there's no visibility option
  3. Select 1 or more attributes in "Exclude child attributes"
  4. Export a configurable and/or bundle product with visibility "Catalog" that has 1 or more children with visibility "Catalog, Search" or "Search"
  5. Validate the output xml and see multiple visibility options for the confgurable and/or bundle product

Actual result

All visibility options are exported on bundle/configurable products after customizing the "Exclude child attributes" config

        <attribute datatype="numeric">
          <name><![CDATA[visibility]]></name>
          <value>2</value>
        </attribute>
        <attribute datatype="numeric">
          <name><![CDATA[visibility]]></name>
          <value>4</value>
        </attribute>

Expected result

  • [] Having the ability to select all (or at least the same as the default config) product attributes in the exclude child attributes config
  • [] Visibility is only exported once when custom "Exclude child attributes" is present
@DuckThom
Copy link
Contributor Author

As a workaround for now, I've copied the config to app/etc/config.php and added the visibility attribute manually to exclude_child_attributes:

            'tweakwise' => [
                'export' => [
                    'exclude_child_attributes' => 'url_key,...,visibility'
                ],

@pmzandbergen
Copy link
Contributor

Related (if you would like to disable child export): #83

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

2 participants