Qwackmaster Posted November 23, 2002 Posted November 23, 2002 Just stumbled across this fantastic OSCommerce site... http://www.shokdeals.com/ My question is how can I configure the cart information as is displayed in his minicart at the top of the page? I love this functionality and would like to put it to work in a similar fashion. I looked through the contributions and searched the forums and cannot find the necessary info. Thanks guys! You've tried to philosophize your pain but the hurt's in your heart and not in your brain
Ajeh Posted November 23, 2002 Posted November 23, 2002 Take this line of information and format it the way you want it and add to your header.php <?php echo '[ ' . $cart->count_contents() . ($cart->count_contents() == "1" ? " Item" : " Items "); ?> <?php echo $currencies->format($cart->show_total()); ?> <?php echo $cart->show_weight() . ($cart->show_weight() == "1" ? " lb" : " lbs ")?>
Qwackmaster Posted November 23, 2002 Author Posted November 23, 2002 WOW ! Thank you ! That's awesome. Works like a charm! I genuinely appreciate the help! :D You've tried to philosophize your pain but the hurt's in your heart and not in your brain
Guest Posted November 24, 2002 Posted November 24, 2002 Linda, Can you tell me how to format it on the right top side like on www. shokdeals.com = Kim
Ajeh Posted November 24, 2002 Posted November 24, 2002 You need to edit the layout of the header.php file so that the resulting table has the cart info in the format you want. Sometimes, if you view source code you can see this a little better when first starting to work with the tables.
Qwackmaster Posted November 25, 2002 Author Posted November 25, 2002 Here's the code I used. Of course, you'll want to rework it for your own look & feel, but this works splendidly for me. <table width="156" border="0" cellspacing="0" cellpadding="1" bgcolor="646F96" align="center"> <tr> <td> <table width="156" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="21"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="/~qwacky/catalog/images/cart_view.gif" width="65" height="21"></td> <td> <div align="right"><img src="/~qwacky/catalog/images/cart_checkout.gif" width="65" height="21"></div> </td> </tr> </table> </td> </tr> <tr bgcolor="#000065"> <td> <table width="100%" border="0" cellspacing="0" cellpadding="3" bgcolor="#000000"> <tr> <td class="minicart" width="60%">Items in Cart:</td> <td class="minicart" width="40%"><?php echo '' . $cart->count_contents() . ($cart->count_contents() == "1" ? " Item" : " "); ?></td> </tr> <tr> <td class="minicart" width="60%">Total:</td> <td class="minicart" width="40%"><?php echo $currencies->format($cart->show_total()); ?></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> You've tried to philosophize your pain but the hurt's in your heart and not in your brain
Recommended Posts
Archived
This topic is now archived and is closed to further replies.