Bug in Basket Summary

turha71

No avatar

2007-02-08 00:44

Hi,

I noticed a bug in the basket summary. When I add to basket se same product several times, the total value is updated with the total of all the itens of the same product, but the number of itens shows only one product. How can I make it to show all the itens, including the several entries of the same product?

Regards

» Quick.Cart v1.x

Claps

Avatar: Claps

2007-02-08 09:44

It's not a bug, it's how it's supposed to work. Products in basket is referring to what it says - products in cart eg. number of distinct products in cart. You cannot add quantities of two distinct products.

turha71

No avatar

2007-02-08 15:08

Ok... But I think that a future version of the plug in should have a config option to allow us to chose from "number of itens" or "number of products".

I'm selling books, and if some one byes 5 books of the same, it will show only one item, but that person is bying five books and not one. It becames a bit confusing, because if eatch book custs 10 euros it will show one item with a total of 50 euros. It seams that the customer is bying one book that custs 50 euros, when in reallity they are bying five book.

How can I code that? the file where the calculations are made is basketSummary.php, but I'm not a programmer.

Any onde can help me with that?

Best regards




But is there a way to show the number of itens in the basket insted of the number of products? I realy need to make it work width

Claps

Avatar: Claps

2007-02-08 16:30

well, you have to make some modifications

step 1. Edit plugins/basketSummary/basketSummary.php
In function throwBasketSummary() you have to add a new variable to globals, like

global $iBasketItems ;

Step 2. In same function find line containing

$sBasketSummaryAmount += tPrice( $quantity * $price );

Below that line add

$iBasketItems += $quantity;

Step 3. Edit templates/basketSummary.tpl. Replace $iCount with $iBasketItems.



Claps

Avatar: Claps

2007-02-08 17:59

Oh, I forgot the initialization of variable :)!!

Find
$sBasketSummaryAmount = 0;

add below

$iBasketItems =0;

turha71

No avatar

2007-02-08 23:11

Thanks, Claps... it's working fine!

5py

No avatar

2007-02-09 18:41

Thanks here too!!!

i modified my site according to your instructions...
much useful now not just showing the types of product but the total too.

i hope u are fully recovered...
cheers

5py

riva

No avatar

2007-02-16 13:42

> Dobry den, jak to jde odstranit? Pleas help, how\'s it going repair?
> It writte on the my sites krbybeskydy.cz
> Notice: A session had already been started - ignoring session_start() in
> /home/krbybeskydy.cz/razitka-reklama.krbybeskydy.cz/plugins/basketSummary/basketSummary.php
> on line 15

ri.va@seznam.cz

gilgalad

No avatar

2007-02-16 20:19

I think a message after adding the item would be nice.

like "item is in your cart now!"

how can we do this?

Thankies.

jara

No avatar

2007-02-16 21:54

Claps ->
Thank you too.
It´s fine, now.

Hi all

Back to top
about us | contact