Welcome Guest, Not a member yet? Register   Sign In
Cart class discount
#2

[eluser]BrainCatcher[/eluser]
Hi there,

I solved it msyself. I don't know of it's an proper solution but it works!

In the cart class i changed:
Code:
$items['price'] = trim(preg_replace('/([^0-9\.])/i', '', $items['price']));
to this:
Code:
$items['price'] = trim(preg_replace('/([^0-9\.\-])/i', '', $items['price']));

So the cart class is now accepting negative values as a discount.


Messages In This Thread
Cart class discount - by El Forum - 01-19-2011, 09:00 AM
Cart class discount - by El Forum - 01-20-2011, 03:49 AM
Cart class discount - by El Forum - 01-20-2011, 04:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB