Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

box shopping_cart


easybeau

Recommended Posts

Hello,

 

I put the shopping_cart box in header, like this:

 

basket.gif View my basket

1 article or empty

 

The problem is that the number of articles is not shown when a product is added?

 

Here is my code (shopping_cart.php)

 

<?php

$cart_contents = array();

$cart_contents[] = array('text' =>'<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'caddie.gif') . VIEW_BOX_SHOPPING . '</a><br>');

 

//new basketBox($info_box_contents, false, false, tep_href_link(FILENAME_SHOPPING_CART));

 

$cart_contents_string = '';

if ($cart->count_contents() > 0) {

$products = $cart->get_products();

{

 

$cart_string .= '<b>' . $cart->count_contents() . '</b>';

if ($cart->count_contents() > 1) {

$cart_contents_string .=' Aricles </span></td>';

 

} else {

 

$cart_contents_string .=' Aricle </span></td>';

}

}

$cart_contents_string .= '';

} else {

$cart_contents_string .= BOX_SHOPPING_CART_EMPTY;

}

 

new basketBox($cart_contents);

?>

 

And the result online: http://www.keepintouch-store.com

 

Somebody could help me...

 

Thanks,

 

Isabelle

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...