normal Gelieve te helpen, categorieën ,

6 years 2 months ago - 6 years 2 months ago #4086 by poma
Gelieve te helpen, categorieën , was created 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..


  • Posts: 4
  • Thank you received: 0

  • Gender: Unknown
  • Birthdate: Unknown
  • Last edit: 6 years 2 months ago by poma.

    Please Log in or Create an account to join the conversation.

    6 years 2 months ago #4087 by bram
    Replied by bram on topic Gelieve te helpen, categorieën ,
    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


  • Posts: 1421
  • Thank you received: 234

  • Gender: Unknown
  • Birthdate: Unknown
  • Please Log in or Create an account to join the conversation.

    6 years 2 months ago #4088 by poma
    Replied by poma on topic Gelieve te helpen, categorieën ,
    Oh thanks! I shod try this..


  • Posts: 4
  • Thank you received: 0

  • Gender: Unknown
  • Birthdate: Unknown
  • Please Log in or Create an account to join the conversation.

    6 years 2 months ago - 6 years 2 months ago #4089 by poma
    Replied by poma on topic Gelieve te helpen, categorieën ,
    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.


  • Posts: 4
  • Thank you received: 0

  • Gender: Unknown
  • Birthdate: Unknown
  • Last edit: 6 years 2 months ago by poma.

    Please Log in or Create an account to join the conversation.

    6 years 2 months ago #4090 by bram
    Replied by bram on topic Gelieve te helpen, categorieën ,
    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
    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


  • Posts: 1421
  • Thank you received: 234

  • Gender: Unknown
  • Birthdate: Unknown
  • The following user(s) said Thank You: poma

    Please Log in or Create an account to join the conversation.

    6 years 2 months ago #4091 by poma
    Replied by poma on topic Gelieve te helpen, categorieën ,
    Thank you werry musch!!! :D Now it´s working!!!


  • Posts: 4
  • Thank you received: 0

  • Gender: Unknown
  • Birthdate: Unknown
  • Please Log in or Create an account to join the conversation.

    Time to create page: 0.140 seconds