<?php
// Redirect access through numerical ids to textual version
$strQuery = \Components\Website\Pages::currentPageQuery();
if($strQuery && is_numeric($strQuery))
{
$arrCategory = \Components\Commerce\Products\Categories::get($strQuery);
if($arrCategory && $arrCategory['product_category_uri'] && \Framework\HTTP\Request::getCurrentURIPath() != $arrCategory['product_category_uri'])
{
\Framework\HTTP\Redirection::redirect($arrCategory['product_category_uri']);
}
}
function orderProduct($iProductId)
{
\Components\Commerce\Carts\Current::orderProduct($iProductId);
// TODO: If statement - config
\Framework\HTTP\Redirection::redirect('/commerce/order/');
}
?>
<?php
// Redirect access through numerical ids to textual version
$strQuery = \Components\Website\Pages::currentPageQuery();
if($strQuery && is_numeric($strQuery))
{
$arrCategory = \Components\Commerce\Products\Categories::get($strQuery);
if($arrCategory && $arrCategory['product_category_uri'] && \Framework\HTTP\Request::getCurrentURIPath() != $arrCategory['product_category_uri'])
{
\Framework\HTTP\Redirection::redirect($arrCategory['product_category_uri']);
}
}
function orderProduct($iProductId)
{
\Components\Commerce\Carts\Current::orderProduct($iProductId);
// TODO: If statement - config
\Framework\HTTP\Redirection::redirect('/commerce/order/');
}
?>