Example #1
0
 public function setTempCartAfterCurrencyChange()
 {
     $cart = Session::getActiveCart();
     Session::setActiveCart(NULL);
     if (is_array($cart)) {
         foreach ($cart as $product) {
             $productid = $product['idproduct'];
             if ($productid > 0) {
                 if (isset($product['standard']) && $product['standard'] == 1) {
                     $this->cartAddStandardProduct($productid, $product['qty']);
                 }
                 if (isset($product['attributes']) || !empty($product['attributes'])) {
                     foreach ($product['attributes'] as $attributes) {
                         $attr = $attributes['attr'];
                         $this->cartAddProductWithAttr($productid, $attributes['qty'], $attributes['attr']);
                     }
                 }
             }
         }
     }
 }