Skip to main content

Gelieve te helpen, categorieën ,

More
8 years 2 weeks ago - 8 years 2 weeks ago #4086 by poma
Hallo, en bedankt voor een volledig soeverein component. Mijn tekst kan een beetje moeilijk voor mij vertaalt van Zweeds naar Google. Ik heb een groot probleem dat ik er niet in slagen om uit te zoeken, ik heb een feed die is in het Zweeds en alles werkt goed, behalve wanneer ik filteren op categorieën, want in mijn inporterade feed is de komma "," tussen de woorden. Bijvoorbeeld: "elektrisch gereedschap, machines en gereedschappen". Hoe kan ik doen om een categorie met een komma "," filteren? Zou zeer dankbaar voor antwoorden zo spoedig mogelijk .. Dank bij voorbaat zijn.

Hmm.. I think the translation from Swedish to Netherlands is little strange hehe..
My problem is: I Have a Swedish feed, and in the categories of the feed have they put some commas "," example: "electronic-tools,tools & mecanicans" and i can´t figure out how to filter out that categoris? All other categories whithout comma shows up.. Can someone please help me..
Last edit: 8 years 2 weeks ago by poma.

Please Log in to join the conversation.

More
8 years 2 weeks ago #4087 by redactie
Is english a better option?

You can proces the items during import.

See affiliatefeeds.nl/callbacks.html


and in your case the 'splitting stuff' chapter on that page

Please Log in to join the conversation.

More
8 years 2 weeks ago #4088 by poma
Oh thanks! I shod try this..

Please Log in to join the conversation.

More
8 years 2 weeks ago - 8 years 2 weeks ago #4089 by poma
Thanks for the answear, but i don´t realy understund how i shod filter the , from the callback.. Do you think you can write that for me? Thanks agin! :) I have difficult to understand the translated english to.. sorry.. And the feed ar splitred in categorys, but the categoryname include that , From the feed menu i can se the category, but i can´t filter out that category because the , in the name of the category.
Last edit: 8 years 2 weeks ago by poma.

Please Log in to join the conversation.

More
8 years 2 weeks ago #4090 by redactie
Put the code below into the file feeds.php ( in administrator/components/com_datafeeds/cron) using ftp and your favorit text editor. Somewhere are the bottom should be fine
Code:
function generic_comma_cb(&$item) { generic_cb($item); list($item['menu_1'],$item['menu_2'],$item['menu_3'])= explode(",",$item['menu_1'],3); }


in the feed configuration use the generic_comma_cb as you import filter, ensure the category is in the Select1 field and that Select2 and Select3 are unused. In case you want to use different fields adjust the numbers in the code.

now re-import the feed(s) and the category should be splitted
The following user(s) said Thank You: poma

Please Log in to join the conversation.

More
8 years 2 weeks ago #4091 by poma
Thank you werry musch!!! :D Now it´s working!!!

Please Log in to join the conversation.

Time to create page: 0.399 seconds