Carousel based on partial department name or department code?

The current UI prevents this since it’s populating the expected value from a select list of departments. Even when switching to the regex option the input is still using the select option.

Is there are workaround?

Can I add a custom item mapping that populates either of these department values (name or code) into a customtext field?

Thanks.
Andy.

Andy

I’m not 100% sure what you’re looking for, is it that you want to be able to populate the department listing using a regex so that you can select products from multiple departments at once in the same rule? (ie turn the drop down turn into a text box when the regex option is selected then the back end run the regex against department names/ codes.)

If you are looking to select a range of products from across your store to put into a carousel then this is the nearest option we have at the moment [ linkie ] .

James

Hi James,

I only plan to use the links they generate to group our sale items into smaller subsections relevant to a particular department group. i.e. dog, cat etc.

Each carousel will have 2 rules and there will be a carousel for each department group.

For instance (dog);

department name starts with dog (this cannot be done with the current ui as it expects a department id)
specialoffer is true

I could use other methods like theme and keywords to achieve something similar. The downside is though that we need these fields for other uses like coupons. Also, there’s a manual overhead which wouldn’t be required with these carousels since they’re dynamically generated based on rules (you’ve done well here :slight_smile:).

Andy

you are correct, the interface actually uses department IDs behind the scene, not department names - it makes for a much more efficient query behind the scenes and more importantly, allows users to rename their departments without causing headaches all round.

I am thinking that one way to handle what you are looking for is to add a new field Item Department Name which would allow REGEX to run against it. The issue that arises is that the query on the back end would end up using LIKE %DEPARTMENT_NAME_FRAGMENT%, the man behind the curtain might not be best pleased.

This would be a custom dev. [ Of course a smart person like you could also map their department names into a custom text field using a NscSync mapping and then run a REGEX against that custom text field in the carousel builder interface :wink: ]

EDIT: I had a quick look at your mapping to make sure you had a free custom text field. You appear to be only using 4 custom text fields. You know there are 20 of them available in the product table?

Regards
James

Hi James,

Mapping via Sync was my initial thought as I had noted that those custom fields were linked to an input field which is obviously what’s required.

Initially I thought I might be able to map through the item table but the same issue arises there since the department doesn’t appear to be a joined table, I can only reference the department id much like you’re doing on the front end of the carousel creator.

I then tried to add a custom field into the department table. Once I had done this I kept getting an error when I tried to sync that was relating to the department table. The exact error escapes me but something like error 80 from memory.

Do you know if it’s possible to add mappings to the department table?

thanks.
Andy.

Hi Andy,

You can map the department name or code (whichever is easier for you) to a custom text field

(select department.name from department where department.id=item.departmentid)

Regards,
Brendan

That’s interesting. I didn’t realise I can do sub select queries from within a mapping. Thanks very much Brendan.