RO CSVI

Watermark images on import

| RO CSVI

Requirements

  • CSVI 6.0+
  • Joomla 3.0+

This article will explain on how to set watermark for images during import. This option is available for Virtuemart product/media and Hikashop product imports.

While editing a import template, look for tab name Image in the edit template setting.

 

At the bottom of the page check for Watermark title. If you dont see this option, make sure that Process image is set to Yes in General options in the same Image tab.

 

Now setup information needed for watermarking.

 

  • Set Watermark option to Yes
  • Right and bottom margin as required
  • Select image used for watermarking

Now save the import template and your watermark settings are saved for the import template.

Run the import and you can see the product and category images has been watermarked in the given path.

 

Read more ...

I want to import articles with multiple languages

| RO CSVI

Read more ...

Multi replace plugin

| RO CSVI

Starting from RO CSVI 7.0 version, the RO CSVI replace plugin has been replaced by the much improved Multi replace plugin with more features. With this new rule plugin, it is possible to combine multiple conditions in a single rule. 

To start, create a new rule from RO CSVI Rules page >> New

Give a name to the rule, select if it is for import or export and make sure that RO CSVI Multi replace has been selected in Plugins drop down list. Save these settings before setting up the actual rule.

 csvi multi replace rule default page

Now there are various operations Multi replace rule plugin offers. We will go through them one by one.

1. Absolute Value

 This operation will return absolute value (positive value) of a number. This is used mostly on negative number field which need to be shown as a positive number on import or export. For example if the value in the field is -13, applying this operation will convert this value to 13.

 csvi multi replace absolute value

2. Find and Replace

This is one of the most used operation and has been inherited from old RO CSVI Replace rule plugin. As the name says it finds and replaces the text. The text to be replaced can be just a Regular text or could be a Regular expression. 

csvi multi replace rule find and replace

3. Find the position of the first occurrence of a substring in a string.

This operation helps you to find the position of a string inside another string. In the Find field set the string to search and in Start field set the position from where the string has to be searched. If you want to find the occurance of  'CSVI'  in 'My lovely CSVI team' and 'My lovely RO Team'. This operation will return position as 11 for first string and false for second string as there is no CSVI in second string.

csvi multi replace strpos

4. Lowercase

By setting this operation you can change the field value to all lowecase letters. For example for a string CSVI, this operation will convert it to csvi.

csvi multi replace lowercase

5. Uppercase

By setting this operation you can change the field value to all uppercase letters. For example for a string csvi, this operation will convert it to CSVI.

csvi multi replace uppercase 

6. Substring

You want to retrive a part of the string then use this operation. Set the start and end position from where the part of string to be extracted. For example if you want to extract love from the string iloveicecream, in the start field set 1 and end field as 5. Note that count of string starts at 0 and not 1.

csvi multi replace substring

7. Uppercase First letter

If you want to convert only the first character to uppercase and not the whole string, this operation will help with that. Say if you have a string netherlands, this operation will convert it to Netherlands.

csvi multi replace uppercase first letter

8. Add before value

You want to add some text before a value in import or export then use this operation. Say if the value is happy and you want to add I am before this value, set I am in Value field, save the rule and apply the rule on the field this value to be applied. It will output as I am happy.

csvi multi replace add before value

9. Add after value

Use this operation to append a string to the value. For example if the value is Bad and you want it to be exported or imported as Bad guy. In the value field set guy, save the rule and apply the rule on the field the value to be applied. Your output will be Bad guy.

csvi multi replace add after value

10. Date

Get the current date and time in the format you want. More about date formats can be found at the PHP date manual. If the Date format field is set as Y-m-d, the output will be 2019-02-08.

csvi multi replace date

11. Custom date format

The previous operation will output the current date and time whereas this operation is used to convert the format of date stored in database. The best example will be Orders created date. You can change this order created date to the format you want in export.

csvi multi replace custom date

12. Unique ID

Most of the times, you would need to generate a random string automatically. This operation will help with that. Setting this operation will generate random value like 4b3403665fea6.

csvi multi replace unique id

13. Uppercase words.

Use this operation to uppercase all the starting letter in words in a sentence. If the sentence is like i love to eat icecream, this operation will change this to I Love To Eat Icecream.

csvi multi replace uppercase all words

Multiple Operations

The best of Multi replace plugin is that you can add multiple operations as one rule. Here are few examples which explains on how to use multiple rules.

1. For example you have text 'My CSVI Support' and it needs to be changed to 'My CSVI Team', Find 'Support' and Replace with 'Team'. Also add ' from Netherlands' text at the end so the full text is 'My CSVI Team from Netherlands'. Here we need two operations one using Find and Replace and other using Add after value. The rule for this will look like

csvi multiple replace multiple operations1

2. Say if you want to convert all the letters to lowercase in the string 'MY CSVI TEAM'  and then select only team from the string and then finally need to add a text at front as Super so the final text changes to 'Super team'

csvi multiple replace multiple operations2

More articles on this subject

Read more ...

The use and non-use of ID fields

| RO CSVI

The use of ID fields in import files often gives many users problems, whether this is due to not reading the documentation or expecting different behaviour from CSV Improved is not the question I want to answer here. What I do want to hightlight is the problems that might occur using ID fields.

What is an ID field?

An ID field is a field that holds a unique reference number for data in the database. Examples of ID fields are:

  • product_id: Holds the ID for a product
  • manufacturer_id: Holds the ID for a manufacturer
  • category_id: Holds the ID for a category
  • etc.
In the Available Fields list, these are all the fields that end with _id.

What is the life expectancy of an ID field?

The life expectancy of an ID field can range from days to years. As long as the data does not get deleted from the database the ID stays the same. Regularly deleting and importing new data makes the ID change as often as this process is repeated.

How important is the ID field?

As mentioned earlier, the ID field is unique. This makes it important however not as important as other fields that are more consistent than the ID field. Some examples of more important fields:

  • product_sku: The Stock Keeping Unit will almost never change as it identifies a specific product
  • manufacturer_name: The name of a manufacturer is also unlikely to change
  • category_path: The name of a category is unlikely to change

Even though the ID field is important to the shop, other fields are more important for import.

Which field should I use?

It is advised not to use ID fields for import. CSV Improved will find the correct ID based on the other fields you import. If an ID is ever changed and you don't know about it, the import will go wrong.

Another example is when you are importing new data, the ID field does not exist and nothing will be imported as the database cannot find the ID and your shop will remain empty.

Final words

Be cautious using ID fields in your import file, imports are more likely to succeed not using these fields.

Read more ...

Run an RO CSVI cron job using a URL on the frontend

| RO CSVI

In the document Setting up a cron job we explain how to run import and export jobs using the command line in RO CSVI. This is the preferred way of running cron jobs because this is generally not limited by the limitations imposed by running an import or export through the browser. However in some cases you may need to run a cron job using a URL on the frontend, in this document we explain how to set this up.

Read more ...