Zaktualizuj logikę przypisywania etykiety 'bestseller' w klasie Cron, aby uwzględnić minimalny ROAS dla bestsellerów.

This commit is contained in:
2025-05-14 14:55:30 +02:00
parent aeb7599811
commit b237ad1fe7
2 changed files with 82 additions and 5 deletions

View File

@@ -15,10 +15,72 @@
}, },
"autoload": { "autoload": {
"controls": { "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": { "class.Products.php": {
"type": "-", "type": "-",
"size": 7477, "size": 8787,
"lmtime": 1741427168653, "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 "modified": false
} }
} }
@@ -80,7 +142,22 @@
"lmtime": 0, "lmtime": 0,
"modified": false "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": {}, "upload": {},
"xml": {} "xml": {}
} }

View File

@@ -67,9 +67,9 @@ class Cron
// update custom_label_4 only current is empty or is bestseller // 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' ); $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'; $new_custom_label_4 = 'bestseller';
} }