Hello, guys.
When I'm executing that function i'm getting +2 in the Count field
for example i'm getting Product->items[0]->Count = 1
echo $count returns 2, but after $Product->add($add,array('Count' => $count)); I'm getting 3 in Basket_Products table, but
$Product->add($add,array('Count' => '2')); works well
What's wrong?
$Product = $basket->Products('ProductID = '.$add);
if(count($Product) > 0){
$count = $Product->items[0]->Count;
$count++;
echo $count;
$Product->add($add,array('Count' => $count));
} else {
$Products = $basket->Products();
$Products->add($add,array('Count' => '1'));
}