Pay nothing for your order >>> problem: item in Dutch Media

freeSbee

Hi Ronald

Quote from: ronald32 on March 27, 2012, 02:15:14 PM
And the line: if ($quantity < 0) $quantity = 0; (suggestion from Ruud)
Should must that be erased?

Yes, either
if ($quantity < 0) $quantity = 0;
or
$quantity = abs(strip_tags($quantity));

Regards Christoph

ronald32

And the line: if ($quantity < 0) $quantity = 0; (suggestion from Ruud)
Should must that be erased?

Ronald

dbs

[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

freeSbee

Hi Ronald

Thank you for giving this hint.

Another fix than suggested by Ruud - thanks Ruud for the quick fix! - would be to use the php function abs(). This way the quantity is retained and the item in cart will not be deleted, in other words it will remain in cart.

Search line 315 in view.php
$quantity =strip_tags($quantity);
and replace it by
$quantity = abs(strip_tags($quantity));

Regards Christoph

dbs

thanks ruud!

but it is/was not really a problem for the shop-owner.
only more emails to write. *g*
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

ronald32


Ruud

I can confirm that putting a negative amount in the overview (and refresh the cart) can lower the amount to pay, or even set it negative.
A check on view.php after line 315 on negative values should be good to prevent this.

A quickfix would be to put on line 316
Code (untested) Select
if ($quantity < 0) $quantity = 0;

Ruud
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

ronald32

today in the Dutch media:
http://www.melf.nl/algemeen/9393/cda-blameert-zich-met-webshop-andere-partijen-ook-vatbaar/

The problem:
order some products en change the number of items in a negative number.
order some other products of the same amount. And you wil pay nothing (except from the handling costs)
The "positive" number - the "negative" number = 0
This problem seems also to occur in Bakery...

It would be nice if this can be solved

Tested in version: 1.59

greetings
Ronald