Files
shopPRO/templates/shop-product/product-mini.php
Jacek Pyziak 431add234c 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>
2026-02-16 23:06:06 +01:00

69 lines
3.5 KiB
PHP

<? global $lang_id;?>
<?
$this -> product -> language['seo_link'] ? $url = '/' . $this -> product -> language['seo_link'] : $url = '/p-' . $this -> product['id'] . '-' . \Shared\Helpers\Helpers::seo( $this -> product -> language['name'] );
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="product-mini <?= $this -> product_mini_class;?>">
<? if ( $this -> product -> new_to_date and $this -> product -> new_to_date >= date( 'Y-m-d' ) ):?>
<div class="new"><?= \Shared\Helpers\Helpers::lang( 'nowosc' );?></div>
<? endif;?>
<a href="<?= $url;?>">
<div class="img">
<? if ( file_exists( substr( $this -> product -> images[0]['src'], 1 ) ) ):?>
<? if ( $this -> class == 'item' ):?>
<img class="<?= $this -> product_mini_class == 'swiper-slide' ? '' : 'owl-lazy';?>" src="/thumb/500/0/<?= substr( $this -> product -> images[0]['src'], 1, strlen( $this -> product -> images[0]['src'] ) );?>" alt="<?= $this -> product -> images[0]['alt'];?>">
<? else:?>
<img class="first" src="/thumb/500/0/<?= substr( $this -> product -> images[0]['src'], 1, strlen( $this -> product -> images[0]['src'] ) );?>" alt="<?= $this -> product -> images[0]['alt'];?>">
<? if ( file_exists( substr( $this -> product -> images[1]['src'], 1 ) ) ):?>
<img class="second" src="/thumb/1000/0/<?= substr( $this -> product -> images[1]['src'], 1, strlen( $this -> product -> images[1]['src'] ) );?>" alt="<?= $this -> product -> images[1]['alt'];?>">
<? else:?>
<img class="second" src="/thumb/1000/0/<?= substr( $this -> product -> images[0]['src'], 1, strlen( $this -> product -> images[0]['src'] ) );?>" alt="<?= $this -> product -> images[0]['alt'];?>">
<? endif;?>
<? endif;?>
<? else:?>
<? endif;?>
</div>
<div class="product-details">
<h2 class="name">
<?= $this -> product -> language['name'];?>
</h2>
<div class="prices">
<?
$prices = $this -> product -> getDefaultCombinationPrices();
if ( $prices )
{
if ( $prices['price_brutto_promo'] ):?>
<div class="price-old">
<?= \shop\Shop::shortPrice( $prices['price_brutto'] );?> <span class="small">zł</span>
</div>
<div class="price">
<?= \shop\Shop::shortPrice( $prices['price_brutto_promo'] );?> <span class="small">zł</span>
</div>
<? else:?>
<div class="price">
<?= \shop\Shop::shortPrice( $prices['price_brutto'] );?> <span class="small">zł</span>
</div>
<? endif;
}
else
{
if ( $this -> product -> price_brutto_promo ):?>
<div class="price-old">
<?= \shop\Shop::shortPrice( $this -> product -> price_brutto );?> <span class="small">zł</span>
</div>
<div class="price">
<?= \shop\Shop::shortPrice( $this -> product -> price_brutto_promo );?> <span class="small">zł</span>
</div>
<? else:?>
<div class="price">
<?= \shop\Shop::shortPrice( $this -> product -> price_brutto );?> <span class="small">zł</span>
</div>
<? endif;
};?>
</div>
</div>
</a>
</div>