Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping_cart.php Problems


Guest

Recommended Posts

Posted

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

 

cartexample.gif

 

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

Posted

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.

Posted
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?

Posted
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>'

Posted
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???

Posted

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.

Posted
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

Posted
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...