sunshop shopping cart

I have just purchased a shopping cart software named “Sunshop” I have been trying to modify some parts of the code but have been unsuccessful at the moment. Here is what I m trying to do:

Everytime I add a new product to the cart, it adds a new line in the cart contents table. Does anyone know how I would be able to display the total number of products in 1 line? Instead of having 1 x product title or 2 x product title, would it be possible to display the total number of items in one line for example “cart: 2 items”? This line would include the total number of products and the quantity of each product added to the cart.

Here is the PHP code for the cart contents table:

[code]
//////////////////////
// Cart Contents Table
//////////////////////

function cart_contents () {
global $settings, $cart, $lang;
if (count($cart->items) < 1)
$out = template(‘table_cart_contents_empty.html’, array(‘product’ => $product, ‘lang’ => $lang[‘cart_contents’]));
else {
foreach ($cart->items as $i => $v) {
$product = get(‘products’, $cart->id);
$product = calc_price($product, $cart->items[$i]->quantity);
$product[quantity] = $cart->items[$i]->quantity;
$product[short_title] = shortenit($product[title], 100);
$out .= template(‘table_cart_contents_item.html’, array(‘product’ => $product, ‘lang’ => $lang[‘cart_contents’]));
}
}
return $out;
}[/code]

Here is the html code of the cart contents table

[code]


$product[quantity] x
$product[short_title] [/code]

How can I attach an image to the post?

Thank you

you wont receive help in this section, it is for sharing already workng scripts, you need to post in the general help section, that is to receive help

Sponsor our Newsletter | Privacy Policy | Terms of Service