Dot Walking from sc_cat_item to pc_product_cat_item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 10:55 PM
Hello Community,
I'm trying to modify the Search Widget "SC Category Page", I have cloned the said Widget. I'm trying to dot walk from the sc_cat_item table to pc_product_cat_item using the following script:
var catalog = $sp.getValue('sc_catalog');
var scRecord = new sn_sc.CatalogSearch().search(catalog, categoryId, false, options.show_items_from_child != 'true');
if (categoryId == '3d1cf808dbd763c4d2cbf2f9af9619cd') {
scRecord.addEncodedQuery('ref_pc_product_cat_item.u_publisher=e0ea486ddba23d90a9fca4781396191c');
}
scRecord.addEncodedQuery('hide_sp=false^ORhide_spISEMPTY');
scRecord.orderBy('order');
scRecord.orderBy('name');
scRecord.query();
Using Condition Builder, I was able to get what I need via 'category=3d1cf808dbd763c4d2cbf2f9af9619cd^ref_pc_product_cat_item.u_publisher=e0ea486ddba23d90a9fca4781396191c'
It doesn't seem to working, is this possible?
Thank you!