Support is online

extract part of a filed to add it as manufacturer #81813

Resolved Locked soura123 opened this topic Wednesday, 06 November 2024 · 5 replies
Author

hello i have a field on my vendor xml send this way
<description>VEMAT: ΜΟΝΟΦΑΣΙΚΟΣ ΗΛΕΚΤΡΟΚΙΝΗΤΡΑΣ 2Hp</description>
the xml has no manufacturer fieldand i want to extract it from the field above is the first word until the :
for this example is VEMAT
is there any way to achieve this with rules?
thanks in advanced

Support

Hello,
You need to use two rules here. First rule is to copy description to manufacturer_name using RO CSVI field copy rule and the second rule is using RO CSVI Multi replace rule and regular expression extract manufacturer_name. See attached screenshot.

  • Screenshot 2024-11-07 at 2.51.30 PM.png

Kind regards,

Tharuna

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

Author

hello
ok that is done beautifully
is there any way because on some products there is no the brand with the : on the start just a name like this
<description>ΣΕΤ ΜΠΕΚ ΓΙΑ ΑΥΛΟ ΨΕΚΑΣΤΗΡΩΝ FIBERGLASS</description>
so in this condition i want to skip to add the manufacturer or add a default of main
any ideas?

Support

Hello,
You need to create another Find and Replace rule in RO CSVI Multireplace rule with below regex. This will check if the character : exists and replaces with text Main. This rule should run before previous Multireplace rule created to extract manufacturer_name. You can add both in one Multireplace rule with this rule as first operation. Try and let me know.

  • Screenshot 2024-11-08 at 1.26.20 PM.png

Kind regards,

Tharuna

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

Author

this is ok done

Support

Hello,
Glad to know issue is solved. I am closing this topic. You can create a new topic for any new issue.

Kind regards,

Tharuna

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

This topic is locked. New replies are not possible.

Log in to reply to this topic.