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:
@@ -344,7 +344,7 @@ class Product implements \ArrayAccess
|
||||
|
||||
foreach ( $products as $product_id )
|
||||
{
|
||||
if ( !\front\factory\ShopProduct::is_product_active( $product_id ) )
|
||||
if ( !( new \Domain\Product\ProductRepository( $mdb ) )->isProductActiveCached( (int)$product_id ) )
|
||||
$products = array_diff( $products, [ $product_id ] );
|
||||
}
|
||||
|
||||
@@ -739,14 +739,14 @@ class Product implements \ArrayAccess
|
||||
|
||||
if ( $quantity )
|
||||
{
|
||||
if ( $msg = \front\factory\ShopProduct::warehouse_message_nonzero( $id_product, $lang_id ) )
|
||||
if ( $msg = ( new \Domain\Product\ProductRepository( $mdb ) )->getWarehouseMessageNonzero( (int)$id_product, $lang_id ) )
|
||||
$result = [ 'msg' => $msg, 'quantity' => $quantity ];
|
||||
else if ( $settings[ 'warehouse_message_nonzero_' . $lang_id ] )
|
||||
$result = [ 'msg' => $settings[ 'warehouse_message_nonzero_' . $lang_id ], 'quantity' => $quantity ];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $msg = \front\factory\ShopProduct::warehouse_message_zero( $id_product, $lang_id ) )
|
||||
if ( $msg = ( new \Domain\Product\ProductRepository( $mdb ) )->getWarehouseMessageZero( (int)$id_product, $lang_id ) )
|
||||
$result = [ 'msg' => $msg, 'quantity' => $quantity ];
|
||||
else if ( $settings[ 'warehouse_message_zero_' . $lang_id ] )
|
||||
$result = [ 'msg' => $settings[ 'warehouse_message_zero_' . $lang_id ], 'quantity' => $quantity ];
|
||||
|
||||
Reference in New Issue
Block a user