From b237ad1fe7962e5586b9859243f01f25dbeaa3f1 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Wed, 14 May 2025 14:55:30 +0200 Subject: [PATCH] =?UTF-8?q?Zaktualizuj=20logik=C4=99=20przypisywania=20ety?= =?UTF-8?q?kiety=20'bestseller'=20w=20klasie=20Cron,=20aby=20uwzgl=C4=99dn?= =?UTF-8?q?i=C4=87=20minimalny=20ROAS=20dla=20bestseller=C3=B3w.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/ftp-kr.sync.cache.json | 83 ++++++++++++++++++++++++++++++-- autoload/controls/class.Cron.php | 4 +- 2 files changed, 82 insertions(+), 5 deletions(-) diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index 6711d43..4072044 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -15,10 +15,72 @@ }, "autoload": { "controls": { + "class.Allegro.php": { + "type": "-", + "size": 6456, + "lmtime": 0, + "modified": false + }, + "class.Api.php": { + "type": "-", + "size": 11018, + "lmtime": 0, + "modified": false + }, + "class.Campaigns.php": { + "type": "-", + "size": 2817, + "lmtime": 0, + "modified": false + }, + "class.Cron.php": { + "type": "-", + "size": 20273, + "lmtime": 1744063175514, + "modified": false + }, "class.Products.php": { "type": "-", - "size": 7477, - "lmtime": 1741427168653, + "size": 8787, + "lmtime": 1744064045288, + "modified": false + }, + "class.Site.php": { + "type": "-", + "size": 494, + "lmtime": 0, + "modified": false + }, + "class.Users.php": { + "type": "-", + "size": 3091, + "lmtime": 0, + "modified": false + } + }, + "factory": { + "class.Campaigns.php": { + "type": "-", + "size": 1089, + "lmtime": 0, + "modified": false + }, + "class.Cron.php": { + "type": "-", + "size": 26120, + "lmtime": 0, + "modified": false + }, + "class.Products.php": { + "type": "-", + "size": 4561, + "lmtime": 1744062307424, + "modified": false + }, + "class.Users.php": { + "type": "-", + "size": 1709, + "lmtime": 0, "modified": false } } @@ -80,7 +142,22 @@ "lmtime": 0, "modified": false }, - "templates": {}, + "templates": { + "products": { + "main_view.php": { + "type": "-", + "size": 9119, + "lmtime": 1744063449814, + "modified": false + }, + "product_history.php": { + "type": "-", + "size": 5117, + "lmtime": 0, + "modified": false + } + } + }, "upload": {}, "xml": {} } diff --git a/autoload/controls/class.Cron.php b/autoload/controls/class.Cron.php index e7798d8..efd33b6 100644 --- a/autoload/controls/class.Cron.php +++ b/autoload/controls/class.Cron.php @@ -67,9 +67,9 @@ class Cron // update custom_label_4 only current is empty or is bestseller $custom_label_4 = \factory\Products::get_product_data( $offer_data['product_id'], 'custom_label_4' ); - if ( $custom_label_4 == null || $custom_label_4 == 'bestseller' ) + if ( $custom_label_4 == null || $custom_label_4 == 'bestseller' and (int)$client_bestseller_min_roas > 0 ) { - if ( $roas > $client_bestseller_min_roas and (int)$client_bestseller_min_roas > 0 and $offer_data['conversions'] > 10 ) + if ( $roas > $client_bestseller_min_roas and $offer_data['conversions'] > 10 ) { $new_custom_label_4 = 'bestseller'; }