This commit is contained in:
2026-02-04 14:50:08 +03:00
parent 9c6adf8b73
commit 3f8bac0cb1
21 changed files with 1016 additions and 72 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace Bx\Discount\Handlers;
use Bitrix\Main\Page\Asset;
use Bitrix\Main\Page\AssetLocation;
use Bx\Discount\Tools;
use Wt\Core\Templater\Shell;
class SaleDiscountEditPage
{
public static function onPageStartHandler()
{
if(!Tools::isEnable()){
return;
}
$isSaleDiscountEditPage = Tools::isSaleDiscountEditPage();
if(!$isSaleDiscountEditPage){
return;
}
$discountID = 0;
$copy = false;
if (isset($_REQUEST['ID']))
{
$discountID = (int)$_REQUEST['ID'];
if ($discountID < 0)
$discountID = 0;
}
if ($discountID > 0)
{
$copy = (isset($_REQUEST['action']) && (string)$_REQUEST['action'] == 'copy');
}
}
}