1. theoxgr
  2. RO CSVI
  3. Tuesday, 20 March 2018
  4.  Subscribe via email
in my XML file i have many products that are missing the image. so i want to skip those lines. i want to add only the products that have an image.

i am attaching an example.
Accepted Answer Pending Moderation
Hello,
You need to use Skip rule plugin to create a rule to check for empty space and skip the record.

There are two ways of solving this
1. You create a skip rule and set Method to match to Regular expression and set a regex which checks for spaces. Apply this rule on file_url field in your template fields. I am not sure about the regex to be used but you can try something like
 /(\s)/

2. If the above solution does not work then you need to create two rules. The first rule is using Multi replace plugin, Find and Replace operation. Leave Find field to be empty and in Replace field set to a text like 'noimage'. Make sure that you set the ordering of this rule to 1. Save the rule. Now create another rule using Skip plugin, Method to match will be Regular text and in Values to match set 'noimage'.Set the ordering of this rule to 2 and save the rule. Apply both the rules on file_url field and run the import. The logic behind these rules is that with the first rule we are replacing empty values with noimage text and when with second rule where skip rules finds the matching text as noimage, it skips that record.

Let me know if it helps.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
the first method you suggested did not work. attaching screenshots

i will try the second one now...
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
OK the second suggestion worked. i would prefer to work with the first one but its ok. thanks for the help! you can mark this issue as solved! i hope this helps others too :)
  1. more than a month ago
  2. RO CSVI
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!