C
C
cyberlain2021-02-23 10:34:30
1C-Bitrix
cyberlain, 2021-02-23 10:34:30

Is there a solution for automatic discounts to appear at the right time?

Is there a solution for discounts to automatically appear at the right time, for example, from 18:00 to 8:00. This is necessary, since every evening I set discounts manually ... Or do I need to write php?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael Kim, 2021-02-24
@devjob

For editors Business / Small business module "Marketing".
Commodity marketing.

screenshot
603621a186f9d200396927.jpeg

Next - add an agent, to run daily at the right time - it will update the activity period of this rule by itself, adding the required amount of time.

A
Anton, 2021-02-24
@anton99zel

Hang on crowns by switching ACTIVE => "Y" and ACTIVE => "N", indicating the number of the rule

require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
use Bitrix\Sale\Internals; 
CModule::IncludeModule("catalog");
CModule::IncludeModule("iblock");
CModule::IncludeModule("sale");
CSaleDiscount::Update(5, array("ACTIVE" => "Y"));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question