php js css php js css

Changes

Changes to Page: products

393763
Oct 4 4:44pm
System
Modified page
PART OF Find and Replace
393767
Oct 4 4:44pm
System
Modified page
Content:
Id:
/products/
/products/
Title:
Products
Products
Content Additional:

															

														
Css:

															

														
Js:

															

														
Php Source:
<?php

if (!\Components\Website\Pages::currentPageQuery())
{
\Framework\HTTP\Redirection::redirect('/products/categories/', true);
}

if (!\Components\Settings\Components::isInstalled('\Components\Commerce\Products'))
{
exit();
}

// Redirect access through numerical ids to textual version
$strQuery = \Components\Website\Pages::currentPageQuery();

if($strQuery && is_numeric($strQuery))
{
$arrProduct = \Components\Commerce\Products::get($strQuery);

if($arrProduct && $arrProduct['product_uri'] && \Framework\HTTP\Request::getCurrentURIPath() != $arrProduct['product_uri'])
{
\Framework\HTTP\Redirection::redirect($arrProduct['product_uri']);
}
}

// AF - This is to allow a redirection to the course selector for courses without overriding /products/
if(\Components\Website\Pages::currentPageQuery())
{
$arrEventParams = array();
$arrEventParams[] = \Components\Website\Pages::currentPageQuery();

\Components\Commerce\Products::eventTrigger('viewProduct', $arrEventParams);
}

function orderProduct($iProductId, $iQty = null, $arrValues = null)
{
$arrProduct = \Components\Commerce\Products::get($iProductId);

if(!$arrProduct)
{
\Framework\HTTP\Redirection::redirect('/products/');
}

if($arrProduct['product_is_orderable_for_someone_else'])
{
\Framework\HTTP\Redirection::redirect('/commerce/order-for/' . $iProductId . '/');
} else
{
$arrOrderOptions = isset($arrValues['product_order_options']) ? $arrValues['product_order_options'] : null;
$arrOrderOptions = \Components\Commerce\Carts\Current::convertPostedProductOptionsToAssoc($iProductId, $arrOrderOptions);

if(isset($arrValues['bought_for_contact_id']))
{
foreach($arrValues['bought_for_contact_id'] as $iBoughtForContactId)
{
$iContactId = $iBoughtForContactId ? $iBoughtForContactId : null;
\Components\Commerce\Carts\Current::orderProduct($iProductId, $iQty, $arrOrderOptions, $iContactId);
}

} else
{
\Components\Commerce\Carts\Current::orderProduct($iProductId, $iQty, $arrOrderOptions, null);
}

// TODO: If statement - config
\Framework\HTTP\Redirection::redirect('/commerce/order/');
}
}

?>
<?php

if (!\Components\Website\Pages::currentPageQuery())
{
\Framework\HTTP\Redirection::redirect('/products/categories/', true);
}

if (!\Components\Settings\Components::isInstalled('\Components\Commerce\Products'))
{
exit();
}

// Redirect access through numerical ids to textual version
$strQuery = \Components\Website\Pages::currentPageQuery();

if($strQuery && is_numeric($strQuery))
{
$arrProduct = \Components\Commerce\Products::get($strQuery);

if($arrProduct && $arrProduct['product_uri'] && \Framework\HTTP\Request::getCurrentURIPath() != $arrProduct['product_uri'])
{
\Framework\HTTP\Redirection::redirect($arrProduct['product_uri']);
}
}

// AF - This is to allow a redirection to the course selector for courses without overriding /products/
if(\Components\Website\Pages::currentPageQuery())
{
$arrEventParams = array();
$arrEventParams[] = \Components\Website\Pages::currentPageQuery();

\Components\Commerce\Products::eventTrigger('viewProduct', $arrEventParams);
}

function orderProduct($iProductId, $iQty = null, $arrValues = null)
{
$arrProduct = \Components\Commerce\Products::get($iProductId);

if(!$arrProduct)
{
\Framework\HTTP\Redirection::redirect('/products/');
}

if($arrProduct['product_is_orderable_for_someone_else'])
{
\Framework\HTTP\Redirection::redirect('/commerce/order-for/' . $iProductId . '/');
} else
{
$arrOrderOptions = isset($arrValues['product_order_options']) ? $arrValues['product_order_options'] : null;
$arrOrderOptions = \Components\Commerce\Carts\Current::convertPostedProductOptionsToAssoc($iProductId, $arrOrderOptions);

if(isset($arrValues['bought_for_contact_id']))
{
foreach($arrValues['bought_for_contact_id'] as $iBoughtForContactId)
{
$iContactId = $iBoughtForContactId ? $iBoughtForContactId : null;
\Components\Commerce\Carts\Current::orderProduct($iProductId, $iQty, $arrOrderOptions, $iContactId);
}

} else
{
\Components\Commerce\Carts\Current::orderProduct($iProductId, $iQty, $arrOrderOptions, null);
}

// TODO: If statement - config
\Framework\HTTP\Redirection::redirect('/commerce/order/');
}
}

?>
Accept Child 404:
1
1
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:
2
2
Parent Id:
/
/
Type Id:
0
0
Contact Id:
-2
-2
Design Id:
0
0
Header Functions:

															

														
Header Category:

															

														
Is Domain:
0
0