I want add some adjustments when I edit a single product in administrator. Which event should I use for that (on save product)?
Could you give me an example?
You may want to override the sw-product-detail
component and the onSave
method to make some changes prior to calling the original method.
Shopware.Component.override('sw-product-detail', {
methods: {
onSave() {
this.product.somePropertyToChange = 'foobar';
this.$super('onSave');
}
}
});