Hi @anthonyflibustiers
Thanks for sharing the form!
I looked into it and while I’m not exactly sure what specific logic drives those conditions (that’s mostly due to language barrier) I can see the “idea” behind and and how it’s built.
In essence, form redirects to certain URL with different value of “?add-to-cart” parameter and
– the URL itself seems to be the same in all cases
– only the number of values (product IDs, I suppose) and values themselves change
– that depends on certain fields of the form
Theoretically then, it would be possible to use just one redirect and replace all the numbers with reference to some field that would contain all the IDs.
But in practice, it would only mean moving those conditions to the form itself together with adding some additional fields to it. While it would make “After submission” settings simpler/clearer, it would in the end complicate things even more and slow down the form.
The complication here is that those values passed to URLs are arbitrary numbers (so not e.g. calculation of field 1 + field 2 values and so on) and the numbers of values passed also depends on the multiple different fields.
I gave it a while, trying to find a workaround for that, but ultimately, I’m afraid I was right initially and if it can be simplified, it would still require quite a lot of custom code and code very specific to this use case/scenario.
As much as I’d love to say otherwise, I don’t thing this could be simplified more using just available options/tools of the plugin.
Kind regards,
Adam