Skip to main content

Items in Mutiple categories?

More
11 years 5 months ago #1483 by webpilot
Hi again
I was wondering whether feeds could be placed in multiple menu/categories without having to use a filter? Perhaps adding something to the Select 0 field in the feed?

Example: I have a feed for shoes which I want to put in search category 'All Shoe Gifts' and I would also like to include this in 'All Fashion Gifts' when using the dropdown in the ajax search function (mod_datamenu) or the menu item.

It also appears as though any & symbols added to the Select 0 are stripped. I this normal?

Any advice appreciated.

Mike

Please Log in to join the conversation.

More
11 years 5 months ago #1485 by redactie

webpilot wrote: Hi again
I was wondering whether feeds could be placed in multiple menu/categories without having to use a filter? Perhaps adding something to the Select 0 field in the feed?

Example: I have a feed for shoes which I want to put in search category 'All Shoe Gifts' and I would also like to include this in 'All Fashion Gifts' when using the dropdown in the ajax search function (mod_datamenu) or the menu item.

all values for an item are unique, so you will have to import the feed twice with different Select0 value ( and you will get the item in the database twice)

another solution is to use Select1, if this field is a comma seperated value it will create an item for each value.


webpilot wrote: It also appears as though any & symbols added to the Select 0 are stripped. I this normal?


Yep that's normal, it's a design choice to simple remove all problematic ( sql/url) symbols
The following user(s) said Thank You: webpilot

Please Log in to join the conversation.

More
11 years 5 months ago #1490 by webpilot
Thank you Bram
If I use the Select 1 option that would mean that all merchants would need to have a select one entry to work with the search and menu item?

Regards
Mike

Please Log in to join the conversation.

More
11 years 5 months ago #1491 by redactie
Sorry, can't follow your question

the feed configuration maps the fields from the feed to the database fields.

that' regardless what you use it for.

using a callback you can change the value ( or add a value if none is available in the feed)
Code:
function gift_cb(&$item) { generic_cb($item); if ( ! $item['menu_1'] ) { $item['menu_1']='Gifts'; } elseif ( stripos ( $item['menu_1','shoe') !== false ) { $item['menu_1']='All Shoe Gifts,All Fashion Gifts'; } }



}
The following user(s) said Thank You: webpilot

Please Log in to join the conversation.

More
11 years 5 months ago #1492 by webpilot
LOL I really need to learn more PHP!

OK I think I am getting it now.

If I add that code to the CB it will take any items that I import that have 'shoe' it will be added to list one as 'All Shoe Gifts and All Fashion Gifts?

I am really sorry about this because I know I didn't pay you very much for your support.

Regards
Mike
P.S. Do you know any good sites that can explain PHP terminology in plain English? :-)

Please Log in to join the conversation.

More
11 years 5 months ago #1493 by redactie
The following user(s) said Thank You: webpilot

Please Log in to join the conversation.

Time to create page: 0.397 seconds