eZ Community » Forums » Extensions » SQLiimport and eZTags
expandshrink

SQLiimport and eZTags

SQLiimport and eZTags

Friday 17 May 2013 10:03:30 am - 1 reply

Hi,

I'd like import or insert eZTags as attribute using SQLiimmport.   
I've tried something like this:$tags_str = implode('|#',$ids). "|#" . implode('|#',$names) . "|#" . implode('|#',$parent_ids); where $ids, $names and $parent_ids are arrays of parameters (ids. names, and parent ids). $created_or_updated_object-> fields->tags = $tags_str; 
An I've xml exception.

How do I prepare eztags data to insert in this field?
Do tags need to be created  before?

Regards

Friday 17 May 2013 4:36:54 pm

Hi Rafal,

What kind of error do you get? Your $tags_str variable looks OK to me.

Tags do need to be created if your $ids array contains IDs that you manually defined You cannot create missing tags with the ID you want since those IDs are autogenerated.

If you wish to create the tags you are adding, you can replace the ID with zero in $ids array, this will make sure that tags that do not exist are created, and those that do exist will be used instead of duplicating the tag.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from