Product Customization: JS Debugging

Product Customization Index

JS variables used by Product Customization

  1. aryCustomizable {product_id : boolean}
  2. aryLineDetails {product_id: array[line number: code describing line type]}
  3. aryLineCosts {product_id: array[line number: cost per line]}
  4. aryLineTitles {product_id: array[line number: string]}
  5. aryTagAlongID {product_id: product_id of the tagalong item}
  6. aryFreeCustomization {product_id: boolean}
  7. aryCustomizedFields {product_id: array[0: {line:‘customization value’'}]}

How to use these

When trouble shooting product customization it is handy to be able to see the values that you have passed up for a specific product. This can be done by going to a product page and opening your browser console. In the console you can type a javascript variable (the name in italics above) to see the values associated with the variables. This should match what you have entered in NSc Pam for the product in question.

Why these variables are arrays

Product customization supports matrix items. Matrix items are represented on our platform as separate items with their own ID.

aryCustomizable is an empty object {}

If product customization doesn’t display on your product page then check if aryCustomizable is empty. If aryCustomizable is empty then it might be that you haven’t stocked any of the tag along item in your store, see ‘Customization Item out of Stock’ below.

Product page Displays but Customization not displayed in the Basket

First revert the Basket Panel as well as the Basket Page.
If the line title is more than numbers, text and underscores the jquery that runs this functionality will have difficulty finding the input box and fail to add the customization to the basket.

##Customization Item out of stock
One of the more common reasons for the product customization not working as intended is that the customization item is out of stock

Ensure that the stock level of the customization item is nice and high (I enter as many 9 into the stock field as it will take). We’re not talking about the item to be customized, we’re talking about the tag along item that passes the customization information down to your POS.

1 Like