ver. 0.294: Remove all 12 legacy autoload/shop/ classes (~2363 lines)
Complete Domain-Driven Architecture migration: - Phase 1-4: Transport, ProductSet, Coupon, Shop, Search, Basket, ProductCustomField, Category, ProductAttribute, Promotion - Phase 5: Order (~562 lines) + Product (~952 lines) - ~20 Product methods migrated to ProductRepository - Apilo sync migrated to OrderAdminService - Production hotfixes: stale Redis cache (prices 0.00), unqualified Product:: refs in LayoutEngine, object->array template conversion - AttributeRepository::getAttributeValueById() Redis cache added Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -555,22 +555,22 @@ class IntegrationsRepository
|
||||
if ( !$accessToken )
|
||||
return [ 'success' => false, 'message' => 'Brak tokenu Apilo.' ];
|
||||
|
||||
$product = new \shop\Product( $productId );
|
||||
$product = ( new \Domain\Product\ProductRepository( $this->db ) )->findCached( $productId );
|
||||
|
||||
$params = [
|
||||
'sku' => $product->sku,
|
||||
'ean' => $product->ean,
|
||||
'name' => $product->language['name'],
|
||||
'tax' => (int) $product->vat,
|
||||
'sku' => $product['sku'],
|
||||
'ean' => $product['ean'],
|
||||
'name' => $product['language']['name'],
|
||||
'tax' => (int) $product['vat'],
|
||||
'status' => 1,
|
||||
'quantity' => (int) $product->quantity,
|
||||
'priceWithTax' => $product->price_brutto,
|
||||
'description' => $product->language['description'] . '<br>' . $product->language['short_description'],
|
||||
'quantity' => (int) $product['quantity'],
|
||||
'priceWithTax' => $product['price_brutto'],
|
||||
'description' => $product['language']['description'] . '<br>' . $product['language']['short_description'],
|
||||
'shortDescription' => '',
|
||||
'images' => [],
|
||||
];
|
||||
|
||||
foreach ( $product->images as $image )
|
||||
foreach ( $product['images'] as $image )
|
||||
$params['images'][] = "https://" . $_SERVER['HTTP_HOST'] . $image['src'];
|
||||
|
||||
$ch = curl_init( "https://projectpro.apilo.com/rest/api/warehouse/product/" );
|
||||
|
||||
Reference in New Issue
Block a user