My question is how to code an array and if statement using Cataloger to display 20 user-defined attribute fields as follows: option01 - option10 and option01price - option10price.
Here's the code I have so far.
Code: Select all
<div class="catalog_item">
</div>
<table class="product_text_table" border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2" class="product_text_small">Model Number: {$modelnumber}</td></tr>
<tr><td colspan="2" class="product_text_large">{$title}</td></tr>
<tr><td colspan="2" class="product_price_wide">${$price}</td></tr>
{section name=at loop=$attrlist} (array code with if statement to display only option attributes with data)
<tr>
<td class="product_label">{option[?]}:</td>
<td class="product_price">$[option[?]price</td>
</tr>
{/section}
<tr><td colspan="2" class="product_footnote">{$footnote}</td></tr>
</table>There's plenty of documentation on php arrays and if statements but I'm not sure how that works with CMSms's Smarty Tags and the fact that this project is well overdue, I don't have time to try to learn it right now.
Any help would be appreciated.


