jonah Posted March 16, 2003 Share Posted March 16, 2003 I have searched and I cannot find how to add the shopping cart to the header. I am trying to do something similar to this: http://business-bali.com/test/catalog/cata...log/default.php (without the weight listing) Is there a contribution to help do this? or can someone point me to some code since this has to have been mentioned before in the forums. I searched the forums to no avail (the forums really need some more advanced searching features). Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Hi, That site does not have a working shopping cart that is the picture. Is this what you want or do you want the picture linked to the shopping cart or the shopping cart box that shows what's in the cart in the header? You can put a graphic in the header and just link it to the shopping_cart.php Link to comment Share on other sites More sharing options...
jonah Posted March 16, 2003 Author Share Posted March 16, 2003 I would like to get rid of the shopping cart box and move it to the header and have it displayed there. A working one though, not just a picture. With so many boxes that are of use, it would seem to make sense to utilize the space in the header. Can this be done? Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Follow these directions for the manufacturer box but use the shopping_cart.php page in includes: http://wiki.oscommerce.com/helpHowtoChange...BoxManufacturer Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Here's what I have been using in my header for quite a while. You'll probably need to change the CSS classes. It has the item count and merchandise total. Enjoy! <table align="right" class="infoBox" width="140" border="0" cellspacing="1" cellpadding="1"> <tr> <td class="accountCategory" align="right"> Items: </td> <td class="accountCategory" align="left"> <?php echo $cart-> count_contents(); ?> </td> <td class="accountCategory" align="right"> Total: </td> <td class="accountCategory" align="left"> <?php echo $currencies-> format($cart->show_total()); ?> </td> </tr> </table> Link to comment Share on other sites More sharing options...
jonah Posted March 16, 2003 Author Share Posted March 16, 2003 Is there a way to move the whole shopping cart box to the header? Link to comment Share on other sites More sharing options...
guanche Posted March 16, 2003 Share Posted March 16, 2003 Here's what I have been using in my header for quite a while. You'll probably need to change the CSS classes. It has the item count and merchandise total. Enjoy! <table align="right" class="infoBox" width="140" border="0" cellspacing="1" cellpadding="1"> <tr> <td class="accountCategory" align="right"> Items: </td> <td class="accountCategory" align="left"> <?php echo $cart-> count_contents(); ?> </td> <td class="accountCategory" align="right"> Total: </td> <td class="accountCategory" align="left"> <?php echo $currencies-> format($cart->show_total()); ?> </td> </tr> </table> Is this code the same as the "Add Shopping Cart Info to Your Header" contribution you made? http://www.oscommerce.com/community/contributions,1079 Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Yes it is the same code.. Did not work for me http://www.oscommerce.com/forums/viewtopic.php?t=37742 Regards The_Bear Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Thanks Kim! Works great! Link to comment Share on other sites More sharing options...
jonah Posted March 16, 2003 Author Share Posted March 16, 2003 I tried the code and got it to work somewhat, but the problem that I had is that it is hidden behind the navigation bar. I assume that it is because the "oscommerce.gif" is forcing it to be on the next lower line. Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Good morning everyone! Bear, Is it just not showing or it is not picking up the contents of your cart? Lonnie, You can take the "echos" out of the table or rearrange the HTML so that the echos are stacked etc. Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 It just does not show ... i slide it in between the 3 gif and the navbar http://www.thebear.qc.ca/coureur/catalog/ Regards The_Bear Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Bear, Find the </td> after the last .gif. Add a <br> between the and the </td>, so it looks like this: <br></td> . Now paste the cart <table> between the <br> and the </td>. Last, remove the class="infobox" from the <table>. Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Thank's ...worked like a Charm :P Now ...if i want the Total to be under the count ? Regards The_Bear Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Bear, To stack the item count and total add </tr><tr> in between the two columns. <td class="main" align="left"> <?php echo $cart-> count_contents(); ?> </td> </tr> <tr> <td class="main" align="right"> Total: </td> Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 Thank's again Kim Regards The_Bear Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 You're welcome! I'm glad we got it figured out...I knew it worked...... :D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.