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

# NEW| Added a configuration option for the propagation to variants #32237

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

EnjoyFelix
Copy link
Contributor

The propagation of modifications to variant products is automatic, but there are legit cases where you don't want to propagation to occur.

Example: The status of a parent product should be "not for sale" while the variants are "for sale"

This adds an option in the configuration of the module to prevent the propagation from occurring.

@eldy
Copy link
Member

eldy commented Dec 5, 2024

I don't think having a global option is enough.
Each decision to propagate or not will depend on what data is changed. So a better change would be to have a checbox before the button Save to ask
"Propagate change on variant" so user can decide or not depending on its change to prooagate on not.

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Dec 5, 2024
@daxid
Copy link

daxid commented Dec 5, 2024

Hi @eldy, thanks for your answer,

I work with @EnjoyFelix and some context is missing to this PR.

We are developing a Dolibarr module to improve attribute propagation to variants. The default module only propagates "base" attributes to the variants. We needed to propagate also client and provider prices, as well as user defined attributes. We have detailed preferences in the module to know which attributes to propagate and ask for user confirmation before propagation.

To do so, we need to be able de deactivate the default propagation in the core "variant" module (I don't remember the english name...). I think our module could be included in the core module eventually.

@eldy What do you think ?

Also for our client, asking each time which attribute to propagate on save will be an overhead.

@eldy
Copy link
Member

eldy commented Jan 13, 2025

Hi @eldy, thanks for your answer,

I work with @EnjoyFelix and some context is missing to this PR.

We are developing a Dolibarr module to improve attribute propagation to variants. The default module only propagates "base" attributes to the variants. We needed to propagate also client and provider prices, as well as user defined attributes. We have detailed preferences in the module to know which attributes to propagate and ask for user confirmation before propagation.

To do so, we need to be able de deactivate the default propagation in the core "variant" module (I don't remember the english name...). I think our module could be included in the core module eventually.

@eldy What do you think ?

Also for our client, asking each time which attribute to propagate on save will be an overhead.

So if need is to disable a feature to open the way for addons, it is better to change test ibto
If ! getDolGlobaString("PRODUIT_ATTRIBUTE_DISABLE_PROPAGATION")
Also this must remain a hidden option with no access for user. If your module disable optuon and user enable option form setup, result will not be as expected.

@eldy eldy added PR to fix - Conflict or CI error to solve The PHP unit tests return something wrong. Check details to know what to fix or solve the conflicts. and removed Discussion Some questions or discussions are opened and wait answers of author or other people to be processed labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR to fix - Conflict or CI error to solve The PHP unit tests return something wrong. Check details to know what to fix or solve the conflicts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants