on ‎2018 Mar 02 6:17 AM - last edited on ‎2024 Feb 04 4:41 AM by postmig_api_4
Hi All,
I am filtering CanonicalProductSales i.e. if distribution channel is 10 then only CanonicalProductSales will get create else CanonicalProductSales will not get created.
After this I want to check in publication level if canonical item :- CanonicalProductSales is not present no other canonical item should get publish. like canonicalproduct should not get publish.
How to use publication grouping handler to filter or block all canonical item publication?
It would be use full if anyone can provide sample code
Regards, Rasika
Request clarification before answering.
Hi
Did you tried with the composition Handler for not creating the CanonicalProductSales canonical Item?
if ("CanonicalProductSales".equals(t.getType())) {
final String pos = ((String) (t.getField("distributionChannel")));
if (pos != null && pos.equals("30"))
{
t.setStatus(CompositionStatusType.ERROR);
return null;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A PublicationGroupingHandler will filter all items when isApplicable always returns true and group always returns am empty List.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
More details here: https://help.hybris.com/6.6.0/hcd/4bd499404ed04d879ee2a4b90e5411b3.html
,
I have created Publication Handler which contains method doesAttributeValueMatches to check value of attribute distributionChannel is 30 but it always returns Null value , please find attached code and no any target item is getting created.Is their any thing missing? Note: I am trying to check attribute distributionChannel is 30 of canonical item CanonicalProductSales then all the canonical item should get publish . link text
Regards, Rasikalink text
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.