imnotinsane
11-01-06, 02:11 AM
I am having a little trouble getting it to display product quantities in my category listing. I created some custom fields one of them containing the price and the other containing the product code for the item with the quantity discount. For some reason nothing is showing up. As far as i can tell there are no errors in the miva script (at least nothing popped up telling me there is an error in the syntax) so it should show up. Here's the code i am using.
<mvt:foreach iterator="product" array="products">
<div class="mC_standardBox">
<div class="mC_Box_Title"><a href="&mvt:global:sessionurl;Screen=PROD&Store_Code=&mvta:store:code;&Product_Code=&mvta:product:code;&Category_Code=&mvta:category:code;">&mvt:product:name;</a></div>
<mvt:if expr="NOT ISNULL l.settings:product:thumbnail">
<a href="&mvt:global:sessionurl;Screen=PROD&Store_Code=&mvta:store:code;&Product_Code=&mvta:product:code;&Category_Code=&mvta:category:code;"><img src="&mvte:product:thumbnail;" border=0 class="mC_Image_Border" /></a>
<mvt:else>
</mvt:if>
<div class="mC_ProductBox_Price">
<ul>
<li>Our Price: &mvt:product:formatted_price;</li>
<li>
<form method="post" action="&mvt:global:secure_sessionurl;">
<input type="hidden" name="Action" value="ADPR">
<input type="hidden" name="Product_Code" value="&mvte:product:code;">
<input type="hidden" name="Quantity" value=1>
<input type="hidden" name="Screen" value="OINF">
<input type="hidden" name="Attributes" value="Yes">
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
<input type="image" src="http://www.rhdev.com/uni/img/addcart.gif" name="SRCH" alt="Start Searching" class="mC_ProductBox_img" /></form>
</li>
<li>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd1Code">
<table width="100%" border="0" cellpadding="0">
<tr>
<td colspan="2">Quantity Discount</td>
</tr>
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd1Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd1Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd2Code">
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd2Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd2Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
</mvt:if>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd3Code">
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd3Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd3Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
</mvt:if>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd4Code">
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd4Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd4Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
</mvt:if>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd5Code">
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd5Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd5Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
</mvt:if>
</table>
</mvt:if>
</li>
</ul>
</div>
<p>&mvt:product:descrip;</p>
</div>
</mvt:foreach>
The main part is the if statement that determines if there is a quantity discount on the product then displays it. Thanks for any help you can give
<mvt:foreach iterator="product" array="products">
<div class="mC_standardBox">
<div class="mC_Box_Title"><a href="&mvt:global:sessionurl;Screen=PROD&Store_Code=&mvta:store:code;&Product_Code=&mvta:product:code;&Category_Code=&mvta:category:code;">&mvt:product:name;</a></div>
<mvt:if expr="NOT ISNULL l.settings:product:thumbnail">
<a href="&mvt:global:sessionurl;Screen=PROD&Store_Code=&mvta:store:code;&Product_Code=&mvta:product:code;&Category_Code=&mvta:category:code;"><img src="&mvte:product:thumbnail;" border=0 class="mC_Image_Border" /></a>
<mvt:else>
</mvt:if>
<div class="mC_ProductBox_Price">
<ul>
<li>Our Price: &mvt:product:formatted_price;</li>
<li>
<form method="post" action="&mvt:global:secure_sessionurl;">
<input type="hidden" name="Action" value="ADPR">
<input type="hidden" name="Product_Code" value="&mvte:product:code;">
<input type="hidden" name="Quantity" value=1>
<input type="hidden" name="Screen" value="OINF">
<input type="hidden" name="Attributes" value="Yes">
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
<input type="image" src="http://www.rhdev.com/uni/img/addcart.gif" name="SRCH" alt="Start Searching" class="mC_ProductBox_img" /></form>
</li>
<li>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd1Code">
<table width="100%" border="0" cellpadding="0">
<tr>
<td colspan="2">Quantity Discount</td>
</tr>
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd1Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd1Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd2Code">
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd2Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd2Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
</mvt:if>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd3Code">
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd3Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd3Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
</mvt:if>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd4Code">
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd4Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd4Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
</mvt:if>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :qd5Code">
<tr>
<td width="76%">&mvt:product:customfield_values:customfields:qd5Des c;</td>
<td width="24%" valign="bottom"> <a href="merchant.mvc?Screen=BASK&Store_Code=&mvte:global:Store_Code;&Action=ADPR&Product_Code=&mvt:product:customfield_values:customfields:qd5Cod e;&Attributes=Yes&Quantity=1"><img src="http://www.rhdev.com/uni/img/cart.gif" /></a></td>
</tr>
</mvt:if>
</table>
</mvt:if>
</li>
</ul>
</div>
<p>&mvt:product:descrip;</p>
</div>
</mvt:foreach>
The main part is the if statement that determines if there is a quantity discount on the product then displays it. Thanks for any help you can give