Post by nicefirework » Sat Nov 18, 2006 11:47 am

I try the demo, it look great, but when i update the item on the cart to -1 the total price also minus. The item can't negative , it should always positive.

Newbie

Posts

Joined
Sat Nov 18, 2006 11:21 am

Post by Daniel » Mon Nov 20, 2006 4:40 pm

I will fix this soon!

Thanks for letting me know of this problem.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Mon Nov 20, 2006 5:04 pm

I just fixed it!

In the include/cart.php

change:

Code: Select all

  function update($products) {
    foreach ($products as $key => $value) {
        $this->products[$key] = $value;
	}

    $_SESSION['products'] = $this->products;
  }
to:

Code: Select all

  function update($products) {
    foreach ($products as $key => $value) {
	  if ($value > 0) { 
        $this->products[$key] = $value;
      }
	}

    $_SESSION['products'] = $this->products;
  }
I will include this code in the next release.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 10 guests