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:
2026-02-18 02:05:39 +01:00
parent 22530df501
commit 69e78ca248
74 changed files with 2176 additions and 2669 deletions

View File

@@ -66,9 +66,9 @@ class Helpers
// Wyczyść cache produktu dla wszystkich języków i permutacji
$cacheHandler -> deletePattern( "shop\\product:$product_id:*" );
// Wyczyść cache związane z opcjami ilościowymi
$cacheHandler -> deletePattern( "\\shop\\Product::get_product_permutation_quantity_options:$product_id:*" );
$cacheHandler -> deletePattern( "ProductRepository::getProductPermutationQuantityOptions:v2:$product_id:*" );
// Wyczyść cache zestawów produktów
$cacheHandler -> deletePattern( "\\shop\\Product::product_sets_when_add_to_basket:$product_id" );
$cacheHandler -> deletePattern( "ProductRepository::productSetsWhenAddToBasket:$product_id" );
}
catch (\Exception $e)
{
@@ -956,5 +956,20 @@ class Helpers
}
return false;
}
public static function shortPrice( $price )
{
if ( self::isWholeNumber( $price ) )
$price = round( $price, 0 );
else
$price = self::decimal( $price );
return $price;
}
public static function isWholeNumber( $value )
{
return ( is_numeric( $value ) && ( round( $value, 3 ) == round( $value ) ) );
}
}