Hide preview of a specific composite product - xmpie-users/uStore-js GitHub Wiki

A customer had a upload product that had an unusual folding requirement. He was happy to have the upload product page and section view, but didn't want the customer to use the "preview" view of the document builder.

Alt

This JavaScript will hide the Preview button of a specific product.

Change the name "Upload Office" in the sample code to the product you want to hide the button for.

<script type="text/javascript">
$(document).ready(function() 
{
  var pathname = window.location.pathname.toLowerCase();
  if (pathname.indexOf("filesubmission.aspx") > 0) {
    if ($("#ctl00_containerPageProductName").html().indexOf("Upload Office") >= 0) {
      $("#imgCompositeProofView").hide();
    }
  }
});           
</script>

If you prefer, you can hide the preview button for all upload products in your store by adding the following to your store's CSS file:

#imgCompositeProofView{display:none;}

For information on how to add JavaScript to your store: How to add JavaScript to a storefront.

⚠️ **GitHub.com Fallback** ⚠️