How to Display Mini Cart in Custom Page

How to Display Mini Cart in Custom Page

This helpnote explains how to add the Mini Cart to a custom page.

Simply add the below code to your custom page:

<%option explicit%>
<%response.buffer=true%>
<!--#include file="shop$db.asp"-->
<%ShopOpenDatabase dbc%>
<table border="0" cellSpacing="0" cellPadding="0" width="140" style="border:1px solid #ccc;font:12px arial,sans-serif;padding:2px;">
<tr>
<td align="center" colspan="2" bgcolor="#CCCCCC" style="padding:3px;"><B>Cart Items</B></td>
</tr>
<tr>
<td>Qty</td>
<td><%=navigateproductquantity()%></td>
</tr>
<tr>
<td>Total</td>
<td><%=navigateproductTotal()%></td>
</tr>
</table>


Please make sure that the top 4 lines of the code:

<%option explicit%>
<%response.buffer=true%>
<!--#include file="shop$db.asp"-->
<%ShopOpenDatabase dbc%>

are placed at the very top of your custom file.

The rest of the code can be placed wherever you want the Mini Cart to display.

Please note your custom page must be a .asp file for the above code to work.

Please also ensure the VPASP files are in the same location as the custom page location.

Feel free to modify the HTML code to suit your liking.

Below is a screenshot of how the Mini Cart will look using the above code:


Times Viewed:
7045
Added By:
Wilson Keneshiro
Date Created:
4/9/2014
Last Updated:
4/10/2014