This commit is contained in:
2025-03-21 20:24:43 +01:00
parent 224398df90
commit f34c9162d4
12427 changed files with 5329941 additions and 373384 deletions

View File

@@ -67,7 +67,6 @@ class CronJobsHandler
break;
case self::ACTION_EXPORT_OFFERS:
$this->exportOfferProcessor->process();
file_put_contents('logs/empik.log', date( 'Y-m-d H:i:s' ) . ' - export offers' . PHP_EOL, FILE_APPEND );
break;
case self::ACTION_IMPORT_ORDERS:
$this->orderProcessor->process();

View File

@@ -143,13 +143,11 @@ class ExportOfferHandler
$quantity = \StockAvailable::getQuantityAvailableByProduct($product['id_product'], $product['id_product_attribute']);
$calculatedQuantity = $this->offerQuantityCalculator->calculate($quantity);
if ( $calculatedQuantity < 1 )
$calculatedQuantity = 1;
$offer['product-id-type'] = $this->identifierExtractor->getIdentifierType();
$offer['product-id'] = $this->identifierExtractor->extract($product);
$offer['sku'] = $this->skuExtractor->extract($product);
$offer['state'] = $product['condition'] === 'new' ? self::STATE_CODE_USED : self::STATE_CODE_NEW;
$offer['state'] = !empty($product['empik_condition']) ? $product['empik_condition'] : self::STATE_CODE_NEW;
if ($product['offer_price'] > 0) {
$offer['price'] = $product['offer_price'];
@@ -164,8 +162,6 @@ class ExportOfferHandler
}
$offer['quantity'] = $calculatedQuantity;
if ( $offer['quantity'] < 1 )
$offer['quantity'] = 1;
if ($leadTimeToShip && $leadTimeToShip >= 0) {
$offer['leadtime-to-ship'] = $leadTimeToShip;