# Extend properties within a module, instead of overwriting the whole property

**URL:** <https://forum.shopware.com/t/extend-properties-within-a-module-instead-of-overwriting-the-whole-property/65905>\
**Category:** Programmierung\
**Created:** [31. März 2020 um 12:51 UTC](https://forum.shopware.com/t/extend-properties-within-a-module-instead-of-overwriting-the-whole-property/65905 "2020-03-31T12:51:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [31. März 2020 um 12:51 UTC](https://forum.shopware.com/t/extend-properties-within-a-module-instead-of-overwriting-the-whole-property/65905/1 "2020-03-31T12:51:48Z")

</div>

Hey party people - Quick question:  
If I override a component: Is there a way to really extend a method or properties instead of overwriting the whole property or method to keep the core data?

For example, i want to override component XY which has some computed properties:

```
computed: {
        fooBar() {
            return [
                { value: 'foo' },
                { value: 'foo' }
            ];
        },
...

```

Now instead of overriding the whole property fooBar, I just want to extend it / push the new value to it to keep the core values and not override them.  
I would do it with something like

```
corevalues.push('...');

```

But I am wondering how would I get the core values from the parent component? 🙂

If I am looking at the vue docs, this would be done with mixins: [https://vuejs.org/v2/guide/mixins.html#Option-Merging](https://vuejs.org/v2/guide/mixins.html#Option-Merging)  
But the core component within Shopware doesn’t use those mixins for the values as far as i see. So is there a “Shopware way” to merge those values within administration components/modules?

---

<div class="post-metadata">

**Author:** ![aleximi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/aleximi/32/13313_2.png) [@aleximi](https://forum.shopware.com/u/aleximi)\
**Post date:** [4. Juni 2021 um 10:18 UTC](https://forum.shopware.com/t/extend-properties-within-a-module-instead-of-overwriting-the-whole-property/65905/2 "2021-06-04T10:18:57Z")

</div>

Did you find a solution?

---

<div class="post-metadata">

**Author:** ![NacScha](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@NacScha](https://forum.shopware.com/u/NacScha)\
**Post date:** [5. September 2023 um 09:05 UTC](https://forum.shopware.com/t/extend-properties-within-a-module-instead-of-overwriting-the-whole-property/65905/3 "2023-09-05T09:05:52Z")

</div>

@Shopwareianer

Did someone found a solution?

EDIT: probably like this:  
[https://developer.shopware.com/docs/guides/plugins/plugins/administration/add-rule-assignment-configuration](https://developer.shopware.com/docs/guides/plugins/plugins/administration/add-rule-assignment-configuration)

---

<div class="post-metadata">

**Author:** ![bettenundwohnen](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@bettenundwohnen](https://forum.shopware.com/u/bettenundwohnen)\
**Post date:** [27. September 2023 um 20:11 UTC](https://forum.shopware.com/t/extend-properties-within-a-module-instead-of-overwriting-the-whole-property/65905/4 "2023-09-27T20:11:26Z")

</div>

There is at least a property merger out there very useful. Unfortunatley it is missing option merge, but you may want to extend it yourself. Workaround could be to put the „to merge options“ in a fake group and then perform the group merge, before that - cleaning spaces, or other inconsistent data so it will merge /override.

> **[GitHub - Webwirkung/webwirkung-property-merger: This shopware plugin let you...](https://github.com/Webwirkung/webwirkung-property-merger)**
>
> This shopware plugin let you merge duplicate property groups in Shopware 6. - GitHub - Webwirkung/webwirkung-property-merger: This shopware plugin let you merge duplicate property groups in Shopwar...
