Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Two weeks from what date?
See https://dev.1c-bitrix.ru/learning/course/index.php...
If the logic of new products is like this, then why the hell is a check mark at all, its installation and removal? Some kind of crazy overhead.
Well, mark as new products for which two weeks have not yet passed from the date recorded somewhere in the date-time field, or if this is the date of addition to the site (or the start of activity), then from it.
And to invent a daw with such logic, and then fool around with its removal ...
In general, there is a regular mechanism.
If the product is new, then when you add it, the element has date create
. You just need to make the usual condition under which the current date will be compared with the creation date. Then filter by this condition or if in the list of products, you can display the corresponding icon.
We need to look at what he could not do in the post-installation script. Try to run with your hands, look at what falls off.
The script itself can be found by package name in the directory: /var/lib/dpkg/info .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question