speed2 Posted December 17, 2003 Posted December 17, 2003 Hi, I am using STS 1.8 and I am thinking of adding a code to show content of shopping card at the top. Is any one know how to do that? This is the code i am thinking of adding <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td valign="top" width="21"><img src="images/cart.gif" alt="cart" width="21" height="16"></td> <?php if ($cart->count_contents() == 0) { ?> <td valign="top" class="smallText">Your cart is empty.</td> <?php } else { ?> <td valign="top" class="smallText"><?php echo '(' . $cart->count_contents() . ')' . ($cart->count_contents() == "1" ? " Item" : " Items "); ?> / <?php echo $currencies->format($cart->show_total()); ?></td> <?php } ?> Please some one advise me! very urgent
speed2 Posted December 17, 2003 Author Posted December 17, 2003 basically I see the code in browser. (Its not executing)
Chad Posted December 17, 2003 Posted December 17, 2003 I pm'd you this code yesterday when you asked. It's in the 2nd pm because what you just pasted got cut off in the 1st pm. Here it is again.. <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td valign="top" width="21"><img src="images/cart.gif" alt="cart" width="21" height="16"></td> <?php if ($cart->count_contents() == 0) { ?> <td valign="top" class="smallText">Your cart is empty.</td> <?php } else { ?> <td valign="top" class="smallText"><?php echo '(' . $cart->count_contents() . ')' . ($cart->count_contents() == "1" ? " Item" : " Items "); ?> / <?php echo $currencies->format($cart->show_total()); ?></td> <?php } ?> </tr> </table></td> </tr> </table>
jello1 Posted December 17, 2003 Posted December 17, 2003 STS does NOT parse php code... notice the html extension.. if you want to pars PHP in a template try BTS.. <span style='font-family:Courier'>If you can't fix it Perl it!!!...</span> ******************************
speed2 Posted December 18, 2003 Author Posted December 18, 2003 Thanks guys for your prompt reply, DO you guys perfer BTS over STS? I installed a new version of OSC and BTS and BTS seems little complicated than STS. Where STS is stright foward. what do you guys think? give me some advise!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.