How to display Quick Ship option for products in PDP matrix table.

We can display Quick Ship option for products in PDP matrix table. Here we set the quick ship checkbox option for products from the NetSuite.

Step 1: Create a checkbox in Item fields for Quickship method.

Step 2: extend the extension from pdp.

getContext: function getContext() {
            //@class JJ.PDP_MatrixTable.pdpMatrixTable.View.Context
            var profile = ProfileModel.getInstance();
            var imgPath= Utils.getAbsoluteUrl(getExtensionAssetsPath("img/QuickShip.jpg"))    
            var itemInfo = this.model.attributes;
            var quickImg='';
            var quickShip='';
            quickShip = itemInfo.custitem_jj_itemquick_ship;
            if(quickShip === true){
                quickImg=imgPath;
            }
            else{
                quickImg=''
            }}
return{
quickImg:quickImg,
                quickShip:quickShip}

Step 3: Display the icon for quickship in template

{{#if quickShip}}
<td class="display-Quick subimage">
    <img class="Image-modal-content" id="defaultimg" src="{{quickImg}}">
</td>
{{else}}
<td class="display-Quick subimage">
</td>
{{/if}}

Leave a comment

Your email address will not be published. Required fields are marked *