Developer forum

Forum » PIM » Product auto-assign to groups

Product auto-assign to groups

Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hello.

I added a new product field (not category field), called "Category", as part of an implementation of moving products to their correct groups. I have refreshed all service caches, but the category field does not appear in the auto-assign rules selector, or in the pim. I find it in data integration though (if I hit check schema first)

I have also run the updated integration jobs which set this value on existing products.

Please dont say I have to re-import all products just cos I added one field?


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

No, it should be there... If you can see it on the ecomproducts table, it should be available.

You can try to reset the service caches: https://doc.dynamicweb.com/documentation-9/platform/platform-tools/cache

Are you 9 or 10?

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hi Nicolai. I had to recycle the app-pool in the end. That did the trick.

As i mentioned in the post, i had reset all service caches, and that didnt help.

Before I recycled the pool, the new field would appear briefly in the "Visible Fields" selector, on the left. But when I clicked the arrow to move it into the visible list, it disappeared again, and on page reload didnt appear on the left again.

I feel there is very aggresive caching in DynamicWeb 9 (dunno if its the same in 10), but it makes it very hard to know if you've made a mistake with something or not, and you waste a lot of time triple checking stuff.

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

But anyway. Now the field is there, and I have a bunch of products which have "ProductCategory: Engine", and "Manufacturer: Scania"

I have set the auto-assign properties on a folder called Scania in the PIM (Under a parent folder, Engines).

These I Have set to Field Manufacturer, Value: Scania, and Field ProductCategory: Engine

I created an auto assign rule for "Group rules", and chose the PIM as the shop, and set it to active

I then created a scheduled task to run that rule.

Nothing happens. No products are attached to that folder.

 
Viktor Letavin Dynamicweb Employee
Viktor Letavin
Reply
This post has been marked as an answer

Hello Stephen,

It may be not really clear. but when you use the manufacturer standard field as an ssign rule, it will expect to match on manufacturer id, because it is unique reference to maufacturer. Try to do that instead, as I shown here https://app.screencast.com/ZzPSeD2Sy34cj.


Best regards, Viktor.

Votes for this answer: 1
 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hei Viktor. I actually thought about that for a second, and then thought "nahhh it couldnt possibly be that limited"... so I guess I will now try it.

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Thanks Viktor, that immediately fixed the issue!

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

There's surely nothing dodgy about changing the ID's in the db to the manufacturer name though, I assume? To make it more readable, and quicker to administrate in pim. There will never be a situation in this PIM where two different manufacturers will have the same name (even if they are different manufacturers), so I have no need for an independent unique key per manufacturer

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

As long as the ID is unique - and also be careful about names. Having IDs like "#stphn's cod*rs" could become an issue because IDs are used in JS, urls and other places where some of these characters can become a problem.

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

True enough

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Maybe someone should update the documentation https://doc.dynamicweb.com/documentation-9/pim/other/auto-assign-products-to-groups  so it says that the key is used in case of List types?

 

You must be logged in to post in the forum