php js css php js css

Changes

Changes to Page: order

398676
Oct 4 8:21pm
System
Modified page
PART OF Find and Replace
398684
Oct 4 8:21pm
System
Modified page
Content:
Id:
/commerce/order/
/commerce/order/
Title:
Order
Order
Content Additional:

															

														
Css:

															

														
Js:

															

														
Php Source:
<?php

function updateItems()
{
foreach (\Components\Commerce\Carts\Current::getAll() as $iRow => $arrCartItem)
{
$iQty = false;
$iContactId = false;
$arrOrderOptions = false;

if (isset($_POST['product_quantity_' . $iRow]))
{
$iQty = $_POST['product_quantity_' . $iRow];
}

if (isset($_POST['product_order_options_' . $iRow]))
{
$arrOrderOptions = \Components\Commerce\Carts\Current::convertPostedProductOptionsToAssoc(\Components\Commerce\Carts\Current::getRowProductId($iRow), $_POST['product_order_options_' . $iRow]);
}

if (isset($_POST['bought_for_contact_id_' . $iRow]) && $_POST['bought_for_contact_id_' . $iRow] != 'someone else')
{
$iContactId = $_POST['bought_for_contact_id_' . $iRow];
}

\Components\Commerce\Carts\Current::updateRow($iRow, $iQty, $arrOrderOptions, $iContactId);
}
}

updateItems();

function handleChangeContactForRow($iRowId, $iContactId)
{
// Nullify if empty
if (!$iContactId)
{
$iContactId = null;
}

\Components\Commerce\Carts\Current::updateRow($iRowId, false, false, $iContactId);
}

function applyDiscount($pDiscountCode, $pValidationLabel, $bThrow)
{
try
{
\Components\Commerce\Discounts::activateCodeDiscountWithCode($pDiscountCode->getValue());
$pDiscountCode->setValueIgnore('ajax');
} catch (\Framework\Exceptions\Validation $pException)
{
$pValidationLabel->setValue('<small>' . $pException->getTitle() . '</small><br />');

if ($bThrow)
{
throw $pException;
}
}
}

function applyDiscountOnSubmit($pDiscountCode, $pValidationLabel)
{
if ($pDiscountCode && $pDiscountCode->getValue())
{
try
{
applyDiscount($pDiscountCode, $pValidationLabel, true);
} catch (\Framework\Exceptions\Validation $pException)
{
$pDiscountCode->setValueIgnore('client');
throw $pException;
}
}
}

?>
<?php

function updateItems()
{
foreach (\Components\Commerce\Carts\Current::getAll() as $iRow => $arrCartItem)
{
$iQty = false;
$iContactId = false;
$arrOrderOptions = false;

if (isset($_POST['product_quantity_' . $iRow]))
{
$iQty = $_POST['product_quantity_' . $iRow];
}

if (isset($_POST['product_order_options_' . $iRow]))
{
$arrOrderOptions = \Components\Commerce\Carts\Current::convertPostedProductOptionsToAssoc(\Components\Commerce\Carts\Current::getRowProductId($iRow), $_POST['product_order_options_' . $iRow]);
}

if (isset($_POST['bought_for_contact_id_' . $iRow]) && $_POST['bought_for_contact_id_' . $iRow] != 'someone else')
{
$iContactId = $_POST['bought_for_contact_id_' . $iRow];
}

\Components\Commerce\Carts\Current::updateRow($iRow, $iQty, $arrOrderOptions, $iContactId);
}
}

updateItems();

function handleChangeContactForRow($iRowId, $iContactId)
{
// Nullify if empty
if (!$iContactId)
{
$iContactId = null;
}

\Components\Commerce\Carts\Current::updateRow($iRowId, false, false, $iContactId);
}

function applyDiscount($pDiscountCode, $pValidationLabel, $bThrow)
{
try
{
\Components\Commerce\Discounts::activateCodeDiscountWithCode($pDiscountCode->getValue());
$pDiscountCode->setValueIgnore('ajax');
} catch (\Framework\Exceptions\Validation $pException)
{
$pValidationLabel->setValue('<small>' . $pException->getTitle() . '</small><br />');

if ($bThrow)
{
throw $pException;
}
}
}

function applyDiscountOnSubmit($pDiscountCode, $pValidationLabel)
{
if ($pDiscountCode && $pDiscountCode->getValue())
{
try
{
applyDiscount($pDiscountCode, $pValidationLabel, true);
} catch (\Framework\Exceptions\Validation $pException)
{
$pDiscountCode->setValueIgnore('client');
throw $pException;
}
}
}

?>
Accept Child 404:
0
0
Search Title:

															

														
Search Title Prefix:

															

														
Search Description:

															

														
Search Keywords:

															

														
Search Noindex:
0
0
Search Nofollow:
0
0
Search Change Frequency:

															

														
Search Priority:
0.5
0.5
Search Canonical Override:

															

														
Is Offline:
0
0
Is Hidden In Navigation:
0
0
Is Hidden In Sitemap:
0
0
Security New:
0
0
Security Contact Mode:

															

														
Security Contact Squeeze Viewlimit:

															

														
Security Contact Require Login:

															

														
Security Contact Groups:

															

														
Security Condition Id:

															

														
Security Heading:

															

														
Security Description:

															

														
Other Fields:

															

														
Order:
0
0
Parent Id:
/commerce/
/commerce/
Type Id:
0
0
Contact Id:
1
1
Design Id:
0
0
Header Functions:

															

														
Header Category:

															

														
Is Domain:
0
0