Guest Posted March 14, 2007 Posted March 14, 2007 I am a web designer and I have designed my layout in photoshop and im now cutting it up and trying to put it together with dreamweaver. I saw this example on templatemonster and wanted to have a shopping cart that worked excactly like this one See Example Please could someone help me to modify my includes/boxes/shopping_cart.php so that it works like this as i have tried but only messed it up. cheers Craig
Guest Posted March 14, 2007 Posted March 14, 2007 you don't put the shopping_cart box file there. You alter the header.php and you include just a link to the shopping cart main page along with some text that shows the number of items in the cart.
Guest Posted March 15, 2007 Posted March 15, 2007 you don't put the shopping_cart box file there. You alter the header.php and you include just a link to the shopping cart main page along with some text that shows the number of items in the cart. I thought as much but im not really up on my php i dont suppose you know the code i would use to get this link? also would the number of items function correctly with what the user is selecting in their cart?
Guest Posted March 15, 2007 Posted March 15, 2007 I thought as much but im not really up on my php i dont suppose you know the code i would use to get this link? also would the number of items function correctly with what the user is selecting in their cart? this php code $cart->count_contents(); returns the items in the cart. So possible link could be: <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . 'Your Cart contains ' . $cart->count_contents() . ' items</a>'
Guest Posted March 16, 2007 Posted March 16, 2007 this php code $cart->count_contents(); returns the items in the cart. So possible link could be: <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . 'Your Cart contains ' . $cart->count_contents() . ' items</a>' thanks for the help i really appreciate it. I tried the code you posted but should i wrap it in a tag???
Guest Posted March 16, 2007 Posted March 16, 2007 well I don't know this would be specific to your design. Whether you use a <td> or a a <div> etc along with the css. The example uses php so you need the php tags, like: <td><?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . 'Your Cart contains ' . $cart->count_contents() . ' items</a>'; ?></td> if you need to format the link itself differently you do as with regular html like inserting a class="my_class" in between the opening <a> tag.
Guest Posted March 19, 2007 Posted March 19, 2007 well I don't know this would be specific to your design. Whether you use a <td> or a a <div> etc along with the css. The example uses php so you need the php tags, like: <td><?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . 'Your Cart contains ' . $cart->count_contents() . ' items</a>'; ?></td> if you need to format the link itself differently you do as with regular html like inserting a class="my_class" in between the opening <a> tag. Cheers for all the help it looks excellent now, I dont suppose you know how to get my categorie and information listings to look like this do you? See this example would it be in the css file or in the categories box file?? thanks again
Guest Posted March 19, 2007 Posted March 19, 2007 Cheers for all the help it looks excellent now, I dont suppose you know how to get my categorie and information listings to look like this do you? See this example would it be in the css file or in the categories box file?? thanks again Ignore the last replay i have sorted it cheers
Recommended Posts
Archived
This topic is now archived and is closed to further replies.