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:
@@ -227,7 +227,7 @@ if ( $settings[ 'piksel' ] )
|
||||
});';
|
||||
|
||||
if ( \Shared\Helpers\Helpers::get( 'product' ) )
|
||||
$piskel_code .= PHP_EOL . 'fbq( "track", "ViewContent", { content_category: "produkt", content_name: "' . htmlspecialchars( str_replace( '"', '', \front\factory\ShopProduct::product_name( \Shared\Helpers\Helpers::get( 'product' ) ) ) ) . '", content_ids: ["' . \Shared\Helpers\Helpers::get( 'product' ) . '"], content_type: "product" });';
|
||||
$piskel_code .= PHP_EOL . 'fbq( "track", "ViewContent", { content_category: "produkt", content_name: "' . htmlspecialchars( str_replace( '"', '', ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->getProductNameCached( (int)\Shared\Helpers\Helpers::get( 'product' ), $lang_id ) ) ) . '", content_ids: ["' . \Shared\Helpers\Helpers::get( 'product' ) . '"], content_type: "product" });';
|
||||
|
||||
$element -> nodeValue = $piskel_code;
|
||||
|
||||
@@ -243,7 +243,7 @@ if ( \Shared\Helpers\Helpers::get( 'product' ) )
|
||||
|
||||
$head = $dom -> getElementsByTagName( 'head' ) -> item( 0 );
|
||||
|
||||
$product = \front\factory\ShopProduct::product_details( \Shared\Helpers\Helpers::get( 'product' ), $lang_id );
|
||||
$product = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->productDetailsFrontCached( (int)\Shared\Helpers\Helpers::get( 'product' ), $lang_id );
|
||||
$product_image = $product[ 'images' ][ 0 ][ 'src' ];
|
||||
if ( $product_image and file_exists( substr( $product_image, 1, strlen( $product_image ) ) ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user