Skip to content

Instantly share code, notes, and snippets.

@vpkopylov
Created July 28, 2016 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vpkopylov/fdee1412edc420a2063d159cd1103fe4 to your computer and use it in GitHub Desktop.
Save vpkopylov/fdee1412edc420a2063d159cd1103fe4 to your computer and use it in GitHub Desktop.
diff --git a/app/functions/fn.cart.php b/app/functions/fn.cart.php
index d1c1535..42e640e 100644
--- a/app/functions/fn.cart.php
+++ b/app/functions/fn.cart.php
@@ -1532,6 +1532,11 @@ function fn_save_cart_content(&$cart, $user_id, $type = 'C', $user_type = 'R')
if (!empty($cart['products']) && is_array($cart['products'])) {
$_cart_prods = $cart['products'];
foreach ($_cart_prods as $_item_id => $_prod) {
+ //FIXME This is a workaround. See @1-17222 for details.
+ if (empty($_cart_prods[$_item_id]['order_id'])) {
+ unset($_cart_prods[$_item_id]['order_id']);
+ }
+
$_cart_prods[$_item_id]['user_id'] = $user_id;
$_cart_prods[$_item_id]['timestamp'] = TIME;
$_cart_prods[$_item_id]['type'] = $type;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment