Skip to content

Commit

Permalink
Check if Cart is initalized
Browse files Browse the repository at this point in the history
  • Loading branch information
Casper-O committed Oct 16, 2018
1 parent 69f9f6c commit 063d301
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gshoppingflux/gshoppingflux.php
Original file line number Diff line number Diff line change
Expand Up @@ -2576,7 +2576,10 @@ private function getItemXML($product, $lang, $id_curr, $id_shop, $combination =
$cart = $this->context->cart;
$cart->id_currency = $this->context->currency->id;
$cart->id_lang = $this->context->language->id;
//$cart->add();
if (!Validate::isLoadedObject($cart)) {
$cart->add();
}

$cart->updateQty(1, $product['id_product'], $combination);

$countries = [];
Expand Down

0 comments on commit 063d301

Please sign in to comment.