ver. 0.283: Legacy class cleanup — S, Html, Email, Image, Log, Mobile_Detect → Shared namespace
- Migrate class.S → Shared\Helpers\Helpers (140+ files), remove 12 unused methods - Migrate class.Html → Shared\Html\Html - Migrate class.Email → Shared\Email\Email - Migrate class.Image → Shared\Image\ImageManipulator - Delete class.Log (unused), class.Mobile_Detect (outdated UA detection) - Remove grid library loading from admin (index.php, ajax.php) - Replace gridEdit usage in 10 admin templates with grid-edit-replacement.php - Fix grid-edit-replacement.php AJAX to send values as JSON (grid.js compat) - Remove mobile layout conditionals (m_html/m_css/m_js) from Site + LayoutsRepository - Remove \Log::save_log() calls from OrderAdminService, ShopOrder, Order Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<? global $client, $lang_id;?>
|
||||
<div class="basket-summary-container box">
|
||||
<h1 class="box-title"><?= ucfirst( \S::lang( 'podsumowanie-zamowienia' ) );?>:</h1>
|
||||
<h1 class="box-title"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'podsumowanie-zamowienia' ) );?>:</h1>
|
||||
<div id="basket-summary" class="content">
|
||||
<? if ( is_array( $this -> basket ) and count( $this -> basket ) ):?>
|
||||
<? foreach ( $this -> basket as $position_hash => $position ):?>
|
||||
@@ -15,10 +15,10 @@
|
||||
</div>
|
||||
<div class="details">
|
||||
<?
|
||||
$product[ 'language' ][ 'seo_link' ] ? $url = '/' . $product[ 'language' ][ 'seo_link' ] : $url = '/p-' . $product[ 'id' ] . '-' . \S::seo( $product[ 'language' ][ 'name' ] );
|
||||
$product[ 'language' ][ 'seo_link' ] ? $url = '/' . $product[ 'language' ][ 'seo_link' ] : $url = '/p-' . $product[ 'id' ] . '-' . \Shared\Helpers\Helpers::seo( $product[ 'language' ][ 'name' ] );
|
||||
|
||||
if ( \S::get_session( 'current-lang' ) != ( new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ) )->defaultLanguage() and $url != '#' )
|
||||
$url = '/' . \S::get_session( 'current-lang' ) . $url;
|
||||
if ( \Shared\Helpers\Helpers::get_session( 'current-lang' ) != ( new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ) )->defaultLanguage() and $url != '#' )
|
||||
$url = '/' . \Shared\Helpers\Helpers::get_session( 'current-lang' ) . $url;
|
||||
?>
|
||||
<div class="name">
|
||||
<a href="<?= $url;?>"><?= $product[ 'language' ][ 'name' ];?></a>
|
||||
@@ -53,20 +53,20 @@
|
||||
$price_product = \shop\Product::calculate_basket_product_price((float)$product['price_brutto_promo'], (float)$product['price_brutto'], $this -> coupon, $position);
|
||||
|
||||
if ($price_product['price_new'])
|
||||
echo \S::decimal($price_product['price_new']) . ' zł';
|
||||
echo \Shared\Helpers\Helpers::decimal($price_product['price_new']) . ' zł';
|
||||
|
||||
if ($price_product['price_new'] and $price_product['price_new'] < $price_product['price'])
|
||||
echo '<u>' . \S::decimal($price_product['price']) . ' zł</u>';
|
||||
echo '<u>' . \Shared\Helpers\Helpers::decimal($price_product['price']) . ' zł</u>';
|
||||
|
||||
if ($price_product['price_new'] and $price_product['price_new'] < $price_product['price'])
|
||||
$discount += \S::normalize_decimal(($price_product['price'] - $price_product['price_new']) * $position['quantity']);
|
||||
$discount += \Shared\Helpers\Helpers::normalize_decimal(($price_product['price'] - $price_product['price_new']) * $position['quantity']);
|
||||
?>
|
||||
<span>x <?= $position[ 'quantity' ];?> <?= \S::lang( 'szt' );?>.</span>
|
||||
<?= \S::decimal( \S::normalize_decimal( $price_product['price_new'] * $position[ 'quantity' ] ) );?> zł
|
||||
<span>x <?= $position[ 'quantity' ];?> <?= \Shared\Helpers\Helpers::lang( 'szt' );?>.</span>
|
||||
<?= \Shared\Helpers\Helpers::decimal( \Shared\Helpers\Helpers::normalize_decimal( $price_product['price_new'] * $position[ 'quantity' ] ) );?> zł
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? $summary += \S::normalize_decimal( $price_product['price'] * $position[ 'quantity' ] );?>
|
||||
<? $summary += \Shared\Helpers\Helpers::normalize_decimal( $price_product['price'] * $position[ 'quantity' ] );?>
|
||||
<?
|
||||
if ( $begin_checkout_items )
|
||||
$begin_checkout_items .= ',';
|
||||
@@ -74,7 +74,7 @@
|
||||
$begin_checkout_items .= '{';
|
||||
$begin_checkout_items .= '"id": "' . $product['id'] . '",';
|
||||
$begin_checkout_items .= '"name": "' . $product['language']['name'] . '",';
|
||||
$begin_checkout_items .= '"price": ' . \S::normalize_decimal( $price_product['price_new'] ) . ',';
|
||||
$begin_checkout_items .= '"price": ' . \Shared\Helpers\Helpers::normalize_decimal( $price_product['price_new'] ) . ',';
|
||||
$begin_checkout_items .= '"quantity": ' . $position['quantity'];
|
||||
$begin_checkout_items .= '}';
|
||||
?>
|
||||
@@ -83,13 +83,13 @@
|
||||
<div class="basket-summary">
|
||||
Wartość koszyka: 1
|
||||
<span>
|
||||
<?= \S::decimal( $summary );?> zł
|
||||
<?= \Shared\Helpers\Helpers::decimal( $summary );?> zł
|
||||
</span>
|
||||
</div>
|
||||
<? if ( $discount ):?>
|
||||
<div class="basket-summary">
|
||||
Rabat:
|
||||
<span class="text-danger">-<?= \S::decimal( $discount ); ?> zł</span>
|
||||
<span class="text-danger">-<?= \Shared\Helpers\Helpers::decimal( $discount ); ?> zł</span>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<div class="basket-summary">
|
||||
@@ -99,7 +99,7 @@
|
||||
<span>0,00 zł</span>
|
||||
<? else:?>
|
||||
<span>
|
||||
<?= \S::decimal( $this -> transport[ 'cost' ] );?> zł
|
||||
<?= \Shared\Helpers\Helpers::decimal( $this -> transport[ 'cost' ] );?> zł
|
||||
</span>
|
||||
<? endif;?>
|
||||
</div>
|
||||
@@ -109,7 +109,7 @@
|
||||
$summary -= $discount;
|
||||
?>
|
||||
<span id="order-summary">
|
||||
<?= $this -> transport[ 'delivery_free' ] == 1 ? \S::decimal( $summary ) : \S::decimal( $summary + $this -> transport[ 'cost' ] );?> zł
|
||||
<?= $this -> transport[ 'delivery_free' ] == 1 ? \Shared\Helpers\Helpers::decimal( $summary ) : \Shared\Helpers\Helpers::decimal( $summary + $this -> transport[ 'cost' ] );?> zł
|
||||
</span>
|
||||
</div>
|
||||
<div class="basket-summary">
|
||||
@@ -150,7 +150,7 @@
|
||||
] );?>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<a href="/koszyk" class="btn btn-dark"><?= \S::lang( 'wroc-do-koszyka' );?></span></a>
|
||||
<a href="/koszyk" class="btn btn-dark"><?= \Shared\Helpers\Helpers::lang( 'wroc-do-koszyka' );?></span></a>
|
||||
</div>
|
||||
<? endif;?>
|
||||
</div>
|
||||
@@ -172,7 +172,7 @@
|
||||
event: "begin_checkout",
|
||||
ecommerce: {
|
||||
currency: "PLN",
|
||||
value: <?= \S::normalize_decimal( \front\factory\ShopBasket::summary_price( $this -> basket, $this -> coupon ) );?>,
|
||||
value: <?= \Shared\Helpers\Helpers::normalize_decimal( \front\factory\ShopBasket::summary_price( $this -> basket, $this -> coupon ) );?>,
|
||||
items: [
|
||||
<?= $begin_checkout_items;?>
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user