267 lines
8.4 KiB
Plaintext

[2026-01-10 16:49:41] DiscountRulesService initialized
Array
(
[tablePrefix] => wp_
[db_connected] => 1
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] buildProductBogoMap() called
Array
(
[productIds_count] => 39
[productIds_sample] => Array
(
[0] => 2483
[1] => 2376
[2] => 1903
[3] => 1831
[4] => 1794
)
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] fetchActiveBogoRules() called
Array
(
[table] => wp_wdr_rules
[currentTime] => 1768060181
[tablePrefix] => wp_
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Table wp_wdr_rules exists
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Executing query
SELECT
id,
title,
filters,
buy_x_get_x_adjustments,
buy_x_get_y_adjustments
FROM wp_wdr_rules
WHERE enabled = 1
AND deleted = 0
AND (date_from <= ? OR date_from IS NULL)
AND (date_to >= ? OR date_to IS NULL)
AND (usage_limits > used_limits OR used_limits IS NULL OR usage_limits = 0)
AND (
(buy_x_get_x_adjustments IS NOT NULL AND buy_x_get_x_adjustments != '{}' AND buy_x_get_x_adjustments != '[]')
OR (buy_x_get_y_adjustments IS NOT NULL AND buy_x_get_y_adjustments != '{}' AND buy_x_get_y_adjustments != '[]')
)
ORDER BY priority ASC
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Found 3 BOGO rules
Array
(
[0] => Array
(
[id] => 4
[title] => 1 + 1 GRATIS
[filters] => {"1":{"type":"products","method":"in_list","value":["1117","450","439","461","1110","406"],"product_variants":[],"product_variants_for_sale_badge":[]}}
[buy_x_get_x_adjustments] => {"ranges":{"1":{"from":"1","to":"1","free_qty":"1","free_type":"free_product","free_value":"100","recursive":"1"}}}
[buy_x_get_y_adjustments] => []
)
[1] => Array
(
[id] => 6
[title] => 2e voor 19,95
[filters] => {"1":{"type":"products","method":"in_list","value":["1831"],"product_variants":[],"product_variants_for_sale_badge":[]}}
[buy_x_get_x_adjustments] => {"ranges":{"1":{"from":"2","to":"","free_qty":"1","free_type":"flat","free_value":"10"}}}
[buy_x_get_y_adjustments] => []
)
[2] => Array
(
[id] => 7
[title] => Invictus One Prestige
[filters] => {"1":{"type":"products","method":"in_list","value":["1139","1466","1467"],"product_variants":[1467,1466],"product_variants_for_sale_badge":[1139]}}
[buy_x_get_x_adjustments] => []
[buy_x_get_y_adjustments] => {"type":"bxgy_product","operator":"product_cumulative","mode":"auto_add","ranges":{"1":{"from":"1","to":"1","products":["2376"],"free_qty":"1","free_type":"free_product","free_value":"","recursive":"1","product_varients":[],"product_variants_for_sale_badge":[]}}}
)
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Fetched rules
Array
(
[count] => 3
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Processing rule
Array
(
[id] => 4
[title] => 1 + 1 GRATIS
[filters] => {"1":{"type":"products","method":"in_list","value":["1117","450","439","461","1110","406"],"product_variants":[],"product_variants_for_sale_badge":[]}}
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Extracted filter product IDs
Array
(
[0] => 1117
[1] => 450
[2] => 439
[3] => 461
[4] => 1110
[5] => 406
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Parsed BOGO data
Array
(
[rule_id] => 4
[rule_title] => 1 + 1 GRATIS
[type] => buy_x_get_x
[label] => 1+1 Gratis
[buy_qty] => 1
[get_qty] => 1
[discount_type] => free_product
[discount_value] => 100
[recursive] => 1
[get_product_ids] =>
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Processing rule
Array
(
[id] => 6
[title] => 2e voor 19,95
[filters] => {"1":{"type":"products","method":"in_list","value":["1831"],"product_variants":[],"product_variants_for_sale_badge":[]}}
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Extracted filter product IDs
Array
(
[0] => 1831
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Parsed BOGO data
Array
(
[rule_id] => 6
[rule_title] => 2e voor 19,95
[type] => buy_x_get_x
[label] => Koop 2, krijg 1 met €10,00 korting
[buy_qty] => 2
[get_qty] => 1
[discount_type] => flat
[discount_value] => 10
[recursive] =>
[get_product_ids] =>
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Processing rule
Array
(
[id] => 7
[title] => Invictus One Prestige
[filters] => {"1":{"type":"products","method":"in_list","value":["1139","1466","1467"],"product_variants":[1467,1466],"product_variants_for_sale_badge":[1139]}}
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Extracted filter product IDs
Array
(
[0] => 1139
[1] => 1466
[2] => 1467
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Parsed BOGO data
Array
(
[rule_id] => 7
[rule_title] => Invictus One Prestige
[type] => buy_x_get_y
[label] => Koop 1, krijg 1 ander gratis
[buy_qty] => 1
[get_qty] => 1
[discount_type] => free_product
[discount_value] => 0
[recursive] => 1
[get_product_ids] => Array
(
[0] => 2376
)
)
--------------------------------------------------------------------------------
[2026-01-10 16:49:41] Final product map
Array
(
[products_with_bogo] => 10
[sample] => Array
(
[1117] => Array
(
[0] => Array
(
[rule_id] => 4
[rule_title] => 1 + 1 GRATIS
[type] => buy_x_get_x
[label] => 1+1 Gratis
[buy_qty] => 1
[get_qty] => 1
[discount_type] => free_product
[discount_value] => 100
[recursive] => 1
[get_product_ids] =>
)
)
[450] => Array
(
[0] => Array
(
[rule_id] => 4
[rule_title] => 1 + 1 GRATIS
[type] => buy_x_get_x
[label] => 1+1 Gratis
[buy_qty] => 1
[get_qty] => 1
[discount_type] => free_product
[discount_value] => 100
[recursive] => 1
[get_product_ids] =>
)
)
[439] => Array
(
[0] => Array
(
[rule_id] => 4
[rule_title] => 1 + 1 GRATIS
[type] => buy_x_get_x
[label] => 1+1 Gratis
[buy_qty] => 1
[get_qty] => 1
[discount_type] => free_product
[discount_value] => 100
[recursive] => 1
[get_product_ids] =>
)
)
)
)
--------------------------------------------------------------------------------