PDA

View Full Version : Show mini shopping cart in your pages.


Ashish
03-30-06, 11:32 PM
Well, I figured out how to show mini cart in my pages.
So it's one of my series to share code with other mivaians..

notes:
1. don't copy paste in ur template, it mayn't work due to missing styles and gifs.
2. you need to add 'basket' item on almost all pages, so that basket item is available for this code
3. You can see it working at my website --> http://www.fragranceocean.com

==============================================
<TABLE class="bestseller" BORDER="0" CELLPADDING = "0" CELLSPACING = "0" WIDTH = "100%">
<tr>
<td height="19" align="center" valign="middle" bgcolor="#999999">
<font color="#FFFFFF" size="2"><strong>BASKET CONTENTS</strong></font>
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="1" width="100%" bgcolor="#FFFFFF" class="styleForLink3">
<mvt:if expr="l.settings:basket:empty">
<tr>
<td>
<font size="1" color="#000000" face="Verdana"> Your shopping basket is currently empty.<br>
</font>
</td>
</tr>
<mvt:else>
<tr bgcolor="#CCCCCC">
<td align = "center"><font size="1" color="#000000" face="Verdana">Qty</font></td>
<td align = "center"><font size="1" color="#000000" face="Verdana">Product</font></td>
<td align = "center"><font size="1" color="#000000" face="Verdana">Price</font></td>
<td><font size="1" face="Verdana"></font></td>
</tr>
<mvt:foreach iterator="item" array="basket:items">
<tr>
<td valign="middle" align="center"><font size="-4" color="#000000" face="Verdana">&mvt:item:quantity;</font></td>
<td valign="top"><font size="-4" color="#000000" face="Verdana">
<a href="&mvt:global:sessionurl;Screen=PROD&Product_Code=&mvta:item:code;">&mvt:item:name;</a>
</font></td>
<td align="right" valign="middle"><font size="-4" color="#000000" face="Verdana">
&mvt:item:formatted_subtotal;</font></td>
<td align="center" valign="middle">
<font size="-4" face="Verdana">
<a href="&mvt:global:sessionurl;Screen=SFNT&Action=RPRD&Basket_Line=&mvte:item:line_id;">
<img src="graphics/website/trashcan.gif" border="0" alt="Remove" />
</a>
</font>
</td>
</tr>
</mvt:foreach>
<tr>
<td><font size="1" face="Verdana">
</font></td>
<td align="right"><font size="1" color="#000000" face="Verdana"><b>Total</b></font></td>
<td align="center" colspan="2"><font size="1" color="#000000" face="Verdana"><b>&mvt:basket:formatted_total;</b></font></td>
</tr>
<tr>
<td colspan=4 align="center"><font size="1" color="#000000" face="Verdana">
<a href = "/shoppingcart">View Details of Basket</a>
</font>
</td>
</tr>
<tr>
<td colspan="4" align="center">
<font size="1" color="#000000" face="Verdana">
<a href = "&mvt:global:secure_sessionurl;Screen=OINF" target="_top">Checkout</a>
</font>
</td>
</tr>
</mvt:if>
</table>
</td>
</tr>
</table>
==============================================

Hampton Fillingame
04-03-06, 05:51 PM
www.medcooler.com

I placed it right under the product.

Red Flare
04-04-06, 08:10 AM
www.medcooler.com

I placed it right under the product.
Did you use code similar to Ashish? Or is this a module?
thanks
alex

Hampton Fillingame
04-04-06, 03:46 PM
Not a module....I simple cut much of the basket page code and pasted it on to the product dispplay section on the product page.

Regards,H

I will isolate the code and paste it tonoght.

Ashish
04-04-06, 04:11 PM
www.medcooler.com

I placed it right under the product.

i went your website. cool audio though.

i personally won't recommend putting it under product page.

1. Customer has to scroll down to see mini-basket and it's not customary to put there. If not in side bar, atleast put in top navigation bar.

2. After adding to cart, I selected certail category and then it doesn't show mini-cart. So it shows mini-cart ONLY when u r on product page?

Hampton Fillingame
04-04-06, 04:25 PM
Thanks...Im am far from completing the site...I may put it in both places.
There are many types of viewers including those who have nerver even shopped on line. Thanks. H

webdec
04-07-06, 06:39 PM
I'm fairly new to miva so I'm wondering where you would put this code. Would I need to create a new item and then call that item in other pages?

Ashish
04-08-06, 02:14 AM
it;s not new item. U need to put this code in existing item or on every html.

existing item like global bar or navbar or bottombar etc.

Red Flare
04-10-06, 02:23 PM
it;s not new item. U need to put this code in existing item or on every html.

existing item like global bar or navbar or bottombar etc.
I am sort of new to this as well.

Where would I paste this code again?

I turned on the item called basket on my CTGY page and pasted the code into the page, but I don't see any mini basket being displayd.

thanks for any help

Ashish
04-10-06, 03:41 PM
get latu.net store helper module. It will tell you, whether you got basket item in your page or not?

Red Flare
04-13-06, 12:48 PM
Ashis you are the coolest :D . Your code works marvelous

mph_vin
06-02-06, 10:16 PM
I noticed a little glitch with this cart. If you are in a category or product page and you remove something from your mini basket it sends you back to the storefront page. Is there any way to stop this from happening?

wcw
06-02-06, 10:44 PM
If you are using my minibasket module it should be taking you to the product page of the item you deleted if you are clicking the product delete link.

mph_vin
06-03-06, 12:02 AM
I'm actually using the code Ashish posted.

Red Flare
06-04-06, 01:37 AM
I'm actually using the code Ashish posted.
<a href="&mvt:global:sessionurl;Screen=SFNT&Action=RPRD&Basket_Line=&mvte:item:line_id;">
<img src="graphics/website/trashcan.gif" border="0" alt="Remove" />
Edit the code above to put whatever page you like in there, i.e. remove SFNT and put in, for example CTGY.