Support is online

Compare two fields on import #73649

Open tonis opened this topic Friday, 21 October 2022 · 5 replies
Author

Hello,
How can I compare two fields on import, if they have the same value?
I need similar funcionality like the conditional rule, but I dont want to compare to a given value, but rather to a value in another import field. If the values in the two fields match I want to empty the second field. The values are not numbers, they are string.

Thanks for help.

Support

Hello,

What you are asking is not possible as you noticed with the conditional rule. The only way to do this is by either extending the functionality in the conditional plugin or build your own rule plugin that can do the things you want.

Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Hi,
I resume this message to ask if you have thought of implementing the comparison function of two fields in "conditional Plugin".
The current plugin should evaluate comparison not only with a value but also with the data of 2 fields. (Field/Value)

It would be very useful to be used in the import phase of a list of articles.

In particular, I would need to compare if 2 fields are the same or not. Depending on the outcome of the comparison, I would go to activate a discount (override) on Virtuemart or not.

Many thanks.

Support

Hello,
Comparing two fields is not possible yet with RO CSVI Conditional rule plugin. You can write your own plugin and extend RO CSVI Conditional rule plugin to implement this feature.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Hi,
Thanks for the feedback.

I probably managed to implement this rule on the current Conditional rule plugin.

Is there a way to create an override of this plugin to submit to losing changes with future component updates?

If it exists, can you indicate how to do it?
Thank you

Best regards.

Support

Hello,
You can create a custom rule plugin which is an override of conditional rule plugin. Read the document Writing a rule plugin for creating this custom rule plugin.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Log in to reply to this topic.