0

When I extend a module and write code like below the plp variable is null, any idea why?

If I replace by PDP instead of PLP, I get value in variable.

    return {
    mountToApp: function mountToApp (container)
    {
    var plp = container.getComponent('PLP');
    if(plp){
  
    plp.addChildViews(
    PLP.PLP_VIEW,
    {   
      'GlobalViews.StarRating': {
        'GlobalViews.StarRating': {
          childViewIndex: 10
        ,   childViewConstructor: function ()
          {
            return new FacetsExtension({
                  categoryInternalId: FacetsModel.get('category')? FacetsModel.get('category').get('internalid'):""
                    , application: this.application
            });
          }
        }
      }
    }
  );
Nimantha
  • 6,405
  • 6
  • 28
  • 69
user1482800
  • 83
  • 2
  • 12

1 Answers1

0

What SuiteCommerce Version you are using? Please take note that PLP component is not available from killimanjaro and below versions. It only works on that latest version right now which is Aconcagua.

Romeo
  • 149
  • 8
  • In kilimanjaro PDP component is the only one available. So if you are using killimanjaro then the only thing you can do is to extend the Facets.Browse.View. Like _.extend(FacetsBrowseView.prototype, { then there you can add or override an existing function. – Romeo Apr 06 '18 at 18:46
  • ok, thanks, i didnt understand the example you shared "_.extend(FacetsBrowseView.prototype, { " please share a more detailed example if you can ? thanks – user1482800 Apr 08 '18 at 12:10