Hi,
On solution would be to create an unpublished category "discount". Then, create a custom product field of the type "text" where you would enter the date of publication in the unix timestamp format.
Then, you could create a mass action with :
- a filter on the column of this custom field with a condition like this: < {time}-15778476
- a second condition on the category column category_name being different than the unpublished discount category's name
- an action "add category" with that unpublished discount category selected
This way, when running this mass action, the system will add the products with a publication date older than 6 months to that discount category.
And then, in your discounts and coupons meant to apply for any product on your shop, you can select that discount category so that products not linked to it won't be taken into account.
That's a bit of stretching of the capabilities of HikaShop though. A cleaner solution would be to develop a plugin implementing the discount API and coupon API (
www.hikashop.com/support/documentation/6...entation.html#coupon
) to check the date of publication on the fly when the discounts / coupons are being loaded. The advantage of this method is that instead of a custom text field with the unix timestamp (which is necessary so that you can use a mass action filter on it), you can use a custom field of the type "advanced date picker" which will be more convenient to set the publication date. The drawback is that it requires some development.