Setting up seasonal pricing in 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Configuration of Seasonal Pricing in 1C-Bitrix

Seasonal pricing is changing prices by calendar schedule: winter jackets get expensive in October, cheaper in March; holiday sets come with markup in December; summer goods discounted in August. In Bitrix this is solved via discounts with date condition or via scheduled agents that change prices per schedule.

Catalog discounts with date limit

Standard mechanism — catalog rules in b_catalog_discount. Each rule has fields ACTIVE_FROM and ACTIVE_TO (DateTime type). Create rule with needed period and action "Reduce price by X%":

  • Rule "Winter markup": ACTIVE_FROM = 2024-10-01, ACTIVE_TO = 2025-02-28, discount -15% (negative = markup not supported directly — see below)
  • Rule "Summer sale": ACTIVE_FROM = 2024-07-01, ACTIVE_TO = 2024-08-31, discount 20%

Limitation: catalog discounts can only reduce price. For markups need different approach.

Markup via price types

For seasonal price increase create separate price type bl_season_price in b_catalog_group. Agent on needed date fills b_catalog_price for this type, and at end of season clears it. User groups switch to seasonal type via CGroup::Update() or stay on basic (seasonal type as additional).

Another option — agent directly updates base price in b_catalog_price:

\Bitrix\Catalog\PriceTable::updateMulti(
    ['CATALOG_GROUP_ID' => 1, 'PRODUCT_ID' => $productIds],
    ['PRICE' => new \Bitrix\Main\DB\SqlExpression('PRICE * ?f', 1.15)]
);

Save original prices before changing — in bl_price_backup table with fields product_id, original_price, backup_date. Agent for return at end of season restores prices from backup.

Season schedule

Store season periods in bl_seasonal_pricing table:

Field Description
name Season name ("Winter Collection")
active_from Start date
active_to End date
modifier Price coefficient (1.15 = +15%)
iblock_section_id Catalog section (NULL = all catalog)
applied Flag, whether change applied

Agent SeasonalPricingAgent runs once per day, checks records where active_from = TODAY and applied = 0, applies coefficient and sets applied = 1. Similarly — return agent on active_to < TODAY.

Cache integration

After mass price update need to clear catalog cache. Use \Bitrix\Main\Data\Cache::clearByTag('b_catalog') or call \Bitrix\Main\Data\TaggedCache::clearByTag('catalog_element_'.$productId) in loop. On large catalogs (10,000+ products) do it in batches of 500 products with pauses.

What to configure

  • Schedule table bl_seasonal_pricing and bl_price_backup
  • Agent for applying seasonal prices with backup of original values
  • Agent for price return after season end
  • Catalog rules in b_catalog_discount for discount seasons
  • Cache invalidation after mass price update