Discussions
Display "Add To Cart" Buttons with prices for matrix items
I have a set of matrix items and I am trying to display an add to cart button for each matrix item and then price above each button, however I am having issues getting the array of itemid numbers given the parent itemid number.
The goal is to hide prices of certain matrix items, while showing others. Here's my imagining of the code that would work, but isn't written in suitescript (it's a conglomeration of javascript & php) The code I'm having trouble with is highlighted
matrixList = Array();
matrixList = <%=getCurrentAttribute('item','matrixitemlist')%>
//echo matrixList; red, green, blue
item = <%=getCurrentAttribute('item',matrixItem[0],'pricelevel1')%>