How to display uploaded image in the quick view scenario for liquid pixel item.

To display an uploaded image in the quick view scenario for a Liquid pixel item, here is the example of code snippet

First we have to fetching the uploaded image file from the model’s attributes and storing it in uploadedImage

  var uploadedImage = this.options.model.attributes.uploaded_nonprview_file;

Second we need to add condition,if statement that checks whether the uploadedImage variable is truthy . If uploadedImage is true, it means an image has been uploaded.

if (uploadedImage) {
                                    pdp.setOption('custcol_ag_personlizationimgurl', uploadedImage);
                                    }

‘custcol_ag_personlizationimgurl’, is a string representing the name or identifier of an option in the pdp object.

uploadedImage, is the value of the uploaded image. It is assigned to the ‘custcol_ag_personlizationimgurl’ option.

Leave a comment

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