ver. 0.292: ShopProduct + ShopPaymentMethod + ShopPromotion + ShopStatuses + ShopTransport frontend migration to Domain
Full migration of front\factory\ — entire directory removed (all 20 classes migrated). ProductRepository +20 frontend methods, PromotionRepository +5 applyType methods, TransportRepository +4 cached methods, PaymentMethodRepository +cached frontend methods. Fix: broken transports_list() in ajax.php replaced with forPaymentMethod(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,7 @@ class Site
|
||||
|
||||
$html = str_replace( $pattern,
|
||||
\Shared\Tpl\Tpl::view( 'shop-product/promoted-products', [
|
||||
'products' => \front\factory\ShopProduct::promoted_products( $limit )
|
||||
'products' => ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->promotedProductIdsCached( $limit )
|
||||
] ),
|
||||
$html
|
||||
);
|
||||
@@ -285,7 +285,7 @@ class Site
|
||||
|
||||
$products_top[1] ? $pattern = '[PRODUKTY_TOP:' . $products_top[1] . ']' : $pattern = '[PRODUKTY_TOP]';
|
||||
|
||||
$products_id_arr = \front\factory\ShopProduct::top_products( $limit );
|
||||
$products_id_arr = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->topProductIds( $limit );
|
||||
|
||||
foreach ( $products_id_arr as $product_id ){
|
||||
$top_products_arr[] = Product::getFromCache( (int)$product_id, $lang_id );
|
||||
@@ -313,7 +313,7 @@ class Site
|
||||
|
||||
$products_top[1] ? $pattern = '[PRODUKTY_NEW:' . $products_top[1] . ']' : $pattern = '[PRODUKTY_NEW]';
|
||||
|
||||
$products_id_arr = \front\factory\ShopProduct::new_products( $limit );
|
||||
$products_id_arr = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->newProductIds( $limit );
|
||||
|
||||
|
||||
foreach ( $products_id_arr as $product_id ){
|
||||
|
||||
Reference in New Issue
Block a user