Beispiel #1
0
		$paySystemId = intval($paySystemId);
		$buyerTypeId = intval($buyerTypeId);
		$location = intval($location);
		$locationID = intval($locationID);
		$locationZip = intval($locationZip);
		$locationZipID = intval($locationZipID);
		$WEIGHT_UNIT = htmlspecialcharsbx(COption::GetOptionString('sale', 'weight_unit', "", $LID));
		$WEIGHT_KOEF = htmlspecialcharsbx(COption::GetOptionString('sale', 'weight_koef', 1, $LID));
		$arDelivery = array();
		$recomMore = ($recomMore == "Y") ? "Y" : "N";
		$recalcOrder = ($recalcOrder == "Y") ? "Y" : "N";
		$cartFix = ('Y' == $cartFix ? 'Y' : 'N');

		$arOrderProduct = CUtil::JsObjectToPhp($product);

		$arCoupon = fGetCoupon($coupon);

		$arOrderOptions = array(
			'CART_FIX' => $cartFix
		);

		$arOrderProductPrice = fGetUserShoppingCart($arOrderProduct, $LID, $recalcOrder);

		foreach ($arOrderProductPrice as &$arItem) // tmp hack not to update basket quantity data from catalog
		{
			$arItem["ID_TMP"] = $arItem["ID"];
			unset($arItem["ID"]);
		}
		unset($arItem);

		$tmpOrderId = ($id == 0) ? 0 : $id;
Beispiel #2
0
		$recomMore = ($recomMore == "Y") ? "Y" : "N";
		$recalcOrder = ($recalcOrder == "Y") ? "Y" : "N";
		$cartFix = ('Y' == $cartFix ? 'Y' : 'N');
		$currency = CSaleLang::GetLangCurrency($LID);

		$couponManagerMode = ($id > 0 ? DiscountCouponsManager::MODE_ORDER : DiscountCouponsManager::MODE_MANAGER);
		$couponManagerParams = array(
			'userId' => $user_id
		);
		if ($id > 0)
			$couponManagerParams['orderId'] = $id;
		DiscountCouponsManager::init($couponManagerMode, $couponManagerParams, false);
		unset($couponManagerParams, $couponManagerMode);
		$newCoupons = array();
		if (!empty($_REQUEST['coupon']))
			$newCoupons = fGetCoupon($_REQUEST['coupon']);
		if (!empty($newCoupons))
		{
			foreach ($newCoupons as &$oneCoupon)
			{
				$resultCoupon = DiscountCouponsManager::add($oneCoupon);
			}
			unset($resultCoupon, $oneCoupon);
		}
		unset($newCoupons);
		if (!empty($_REQUEST['deleteCoupon']))
		{
			$resultCoupon = DiscountCouponsManager::delete($_REQUEST['deleteCoupon']);
			unset($resultCoupon);
		}
		$arOrderProduct = CUtil::JsObjectToPhp($product);