Author Topic: How to copy value of vm2tags to keywords?  (Read 686 times)

LeTigre

  • Beginner
  • *
  • Posts: 1
  • A beginner
How to copy value of vm2tags to keywords?
« on: May 24, 2015, 14:17:47 pm »
Hello! Sorry for my English.

In the online shop running Virtuemart 2.0.22d  and Joomla 2.5.14 has more than 1200 products. Each of them has filled custom field - Tags. It uses components vm2tags ver 1.2.8.
I need to transfer these values to the "Meta keywords".

Thought to solve this problem with SQL query that will be able (considering virtuemart_product_id) to copy information from one place to another.
From the table virtuemart_product_customfields (field custom_param, considering custom_value: vm2tags) to the table virtuemart_products_ru_ru (field metakey).

But the problem is that the tags in virtuemart_product_customfields are in that format:
Code: [Select]
{"product_tags":"magnum,lorem,\u0442\u0443\u0444\u043b\u0438"}How in SQL query remove thre first part 
Code: [Select]
{"product_tags":" and 
Code: [Select]
}
and to recode in Cyrillic:
Code: [Select]
\u0442\u0443\...

Or there is some other way to solve this problem?

Popandos

  • Beginner
  • *
  • Posts: 7
  • VirtueMart Version: virtuemart 3
Re: How to copy value of vm2tags to keywords?
« Reply #1 on: May 24, 2015, 16:37:13 pm »
You could do such with csvi component http://www.csvimproved.com/en/. Just export data from tags table, modify it in the open office with regular expressions or just with find&replace function than import it to the meta keywords table.