View Full Version : quantity in basket
ddalki916
10-06-06, 11:13 PM
Please help!
When I add products to basket, 'quantity in basket' on the product display page shows whatever the number I added to basket. But after that, if I go to another product page, the 'quantity in basket' says none, while the basket page has the products I added. What's wrong?
Dan - Kemper Strategic
10-06-06, 11:41 PM
Can you provide us with a link?
ddalki916
10-06-06, 11:58 PM
I can't really show the link right now.. Is the following code enough for you to take a look at? Thanks!
PRODUCT DISPLAY LAYOUT:
<table width="210" border="0" align="left" cellpadding="0" cellspacing="0" bordercolor="#786e38">
<form method="post" action="&mvt:global:sessionurl;">
<input type="hidden" name="Action" value="ADPR">
<input type="hidden" name="Screen" value="BASK">
<input type="hidden" name="Store_Code" value="&mvte:store:code;">
<input type="hidden" name="Product_Code" value="&mvte:product:code;">
<input type="hidden" name="Category_Code" value="&mvte:global:category_code;">
<tr><td height="7" colspan="2" align="left" valign="top">
</td></tr>
<tr>
<td colspan="2" align="left" valign="top">
<mvt:item name="product_attributes" param="product:id" /></td>
</tr>
<tr><td height="15" colspan="2"></td>
</tr>
<tr><td width="125" height="25" align="left" valign="bottom">
<mvt:item name="fonts" param="body_font">
quantity:
<input type="text" name="Quantity" value=1 size=4>
</mvt:item></td>
<td width="85" align="right" valign="bottom"><mvt:item name="buttons" param="AddToBasket" /></td>
</tr>
<tr>
<td height="12" colspan="2" align="left" valign="bottom" class="style3"></td>
</tr>
<tr>
<td height="10" colspan="2" align="left" valign="bottom"></td>
</tr>
<tr> </tr>
<tr></tr>
<tr>
<td width="125" height="20" align="left" valign="top"><mvt:item name="fonts" param="ctgy_font"></mvt:item>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="20" height="20">
<param name="movie" value="graphics/00000001/cart.swf">
<param name="quality" value="high">
<embed src="graphics/00000001/cart.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="20" height="20"></embed>
</object>
<mvt:item name="fonts" param="body_font">
your cart:
<mvt:if expr="l.settings:product:quantity EQ 0">
<i>none</i>
<mvt:else>
<b>&mvt:product:quantity;</b>
</mvt:if>
<mvt:if expr="l.settings:product:inv_active"> &mvt:product:inv_short;</mvt:if>
</mvt:item></td>
<td width="85" height="20" align="right" valign="top"><a href="http://www.themandarinstearoom.com/browse/merchant.mvc?Screen=BASK&Store_Code=themandarins"><img src="graphics/00000001/checkoutnow.gif" width="78" height="23" border="0" align="right" /></a></td>
</tr>
</form>
</table>
PRODUCT DISPLAY PAGE:
<html>
<head>
<title>&mvt:store:name;: &mvt:product:name;</title>
<base href="&mvt:global:basehref;">
<mvt:item name="head" />
</head>
<mvt:item name="body">
<mvt:item name="hdft" param="global_header" />
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td align="left" valign="bottom" colspan=2 >
<mvt:item name="navbar" />
</td></tr>
<tr><td align="left" valign="bottom">
<mvt:item name="hdft" param="header" />
</td></tr>
<tr></tr>
</table>
</td><td align="left" valign="top" width="80%">
<br>
<blockquote>
<mvt:item name="prod_ctgy_hdft" param="prod_header" />
<mvt:item name="product_display" />
<mvt:if expr="l.settings:product_count NE 0">
<br><br>
<mvt:item name="fonts" param="hdr_font">
<b>Related Item(s)</b><br>
</mvt:item>
<mvt:item name="product_list" />
</mvt:if>
<mvt:item name="prod_ctgy_hdft" param="prod_footer" />
</blockquote>
</td></tr>
<tr><td align="left" valign="bottom">
<mvt:item name="hdft" param="footer" />
</td></tr>
</table>
<mvt:item name="hdft" param="global_footer" />
</mvt:item>
</html>
BASKET CONTENTS:
</style><mvt:if expr="l.settings:basket:empty">
<mvt:item name="fonts" param="body_font">
Your shopping basket is currently empty.<br>
</mvt:item>
<mvt:exit />
</mvt:if>
<table border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#D3E4DE" width="100%" colspan="5">
<tr>
<td align="left" valign="middle" bgcolor="#EBEDE0"> </td>
<td align="left" valign="middle" bgcolor="#EBEDE0">
<mvt:item name="fonts" param="lhdr_font">
<b>Code</b></mvt:item></td><td align="left" valign="middle" bgcolor="#EBEDE0">
<mvt:item name="fonts" param="lhdr_font">
<b>Product</b></mvt:item>
</td><td align="left" valign="middle" bgcolor="#EBEDE0">
<mvt:item name="fonts" param="lhdr_font">
<b>Quantity</b></mvt:item>
</td><td align="right" valign="middle" bgcolor="#EBEDE0">
<mvt:item name="fonts" param="lhdr_font">
<b>Price/Ea.</b></mvt:item>
</td><td align="right" valign="middle" bgcolor="#EBEDE0">
<mvt:item name="fonts" param="lhdr_font">
<b>Total</b></mvt:item>
</td></tr>
<mvt:foreach iterator="item" array="basket:items">
<tr>
<form method="post" action="&mvt:global:sessionurl;">
<input type="hidden" name="Screen" value="BASK">
<input type="hidden" name="Action" value="RPRD">
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
<input type="hidden" name="Basket_Line" value="&mvte:item:line_id;">
<td align="left" valign="middle">
<mvt:item name="fonts" param="body_font">
<mvt:item name="buttons" param="Remove" />
</mvt:item></td>
</form>
<td align="left" valign="middle" nowrap>
<mvt:item name="fonts" param="body_font">
<a href="&mvt:global:sessionurl;Screen=PROD&Store_Code=&mvta:global:Store_Code;&Product_Code=&mvta:item:code;">&mvt:item:code;</a></mvt:item> </td><td width="100%" align="left" valign="middle" nowrap>
<mvt:item name="fonts" param="body_font">
&mvt:item:name;
<mvt:if expr="l.settings:item:upsold">
(Special Offer)</mvt:if>
</mvt:item>
</td>
<mvt:if expr="l.settings:item:upsold">
<td align="right" valign="middle" nowrap>
<mvt:item name="fonts" param="body_font">
&mvt:item:quantity;</mvt:item></td>
<mvt:else>
<form method="post" action="&mvt:global:sessionurl;">
<input type="hidden" name="Screen" value="BASK">
<input type="hidden" name="Action" value="QNTY">
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
<input type="hidden" name="Basket_Line" value="&mvte:item:line_id;">
<td align="left" valign="middle" nowrap>
<mvt:item name="fonts" param="body_font">
<input type="text" name="Quantity" value="&mvte:item:quantity;" size=4>
<mvt:item name="buttons" param="Update" />
</mvt:item></td>
</form>
</mvt:if>
<td align="right" valign="middle" nowrap>
<mvt:item name="fonts" param="body_font">
&mvt:item:formatted_price;</mvt:item></td><td align="right" valign="middle" nowrap>
<mvt:item name="fonts" param="body_font">
&mvt:item:formatted_subtotal;</mvt:item>
</td></tr>
<mvt:foreach iterator="option" array="item:options">
<tr>
<td align="left"> </td>
<td align="left"> </td><td align="left">
<mvt:item name="fonts" param="body_font">
<mvt:if expr="l.settings:option:option_id">
&mvt:option:attr_code;: &mvt:option:opt_code;
<mvt:elseif expr="NOT ISNULL l.settings:option:data">
&mvt:option:attr_code;: &mvt:option:data;
<mvt:elseif expr="NOT ISNULL l.settings:option:data_logn">
&mvt:option:attr_code;: &mvt:option:data_logn;
<mvt:else>
&mvt:option:attr_code;</mvt:if>
</mvt:item>
</td><td align="left">
</td><td align="right" nowrap>
<mvt:item name="fonts" param="body_font">
<mvt:if expr="l.settings:option:price">
&mvt:option:formatted_price;
<mvt:else>
</mvt:if>
</mvt:item>
</td><td align="right" nowrap>
<mvt:item name="fonts" param="body_font">
<mvt:if expr="l.settings:option:price">
&mvt:option:formatted_subtotal;
<mvt:else>
</mvt:if>
</mvt:item>
</td></tr>
</mvt:foreach>
</mvt:foreach>
<mvt:foreach iterator="charge" array="basket:charges">
<tr>
<td align="right" valign="middle" colspan="3"> </td><td align="right" valign="middle" nowrap>
<mvt:item name="fonts" param="body_font">
<i>&mvt:charge:descrip;:</i></mvt:item>
</td><td align="right" valign="middle" nowrap>
<mvt:item name="fonts" param="body_font">
&mvt:charge:formatted_disp_amt;</mvt:item>
</td></tr>
</mvt:foreach>
<tr>
<td bgcolor="#EBEDE0"><span class="style1"></span></td>
<td colspan="3" align="right" valign="middle" bgcolor="#EBEDE0"><span class="style1"></span></td>
<td align="right" valign="middle" bgcolor="#EBEDE0">
<mvt:item name="fonts" param="lhdr_font">
<b>Total:</b></mvt:item> </td><td align="right" valign="middle" bgcolor="#EBEDE0" nowrap>
<mvt:item name="fonts" param="lhdr_font">
<b>&mvt:basket:formatted_total;</b></mvt:item>
</td><tr>
</table>
Pete McNamara
10-07-06, 12:15 AM
if I go to another product page, the 'quantity in basket' says none
That would be because you haven't added any of the new product to the basket?
ddalki916
10-07-06, 12:30 AM
isn't 'quantity in basket' supposed to be the total number of items in your basket? Not the number of the product whose page you are on.
Let's say.. I have product #1 and #2. I add #1 to basket and if I go to basket page, I see #1 in my basket. And then I go to #2 product display page. Then the 'quantity in basket' should say 1, since I have 1 item in my basket. But my page says None.
Dan - Kemper Strategic
10-07-06, 12:35 AM
Works fine on my end. (sorry, looked at your site :)) If you add a product to the basket then go around and look at it again, the qauntity shows just fine.
The Quantity in Basket is just for that product, not the total number of all products in your basket. If you want to display all the products in your basket, look into a mini-basket module.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.