Answer the question
In order to leave comments, you need to log in
[[+content_image]]
The product is not displayed using "msProduct". What is the problem here and how to solve it?
In the online store there is a catalog of goods with products displayed there
, it looks like this
<!-- store products -->
<div class="row">
<!-- product -->
[[!pdoPage?
&element=`msProducts`
&tpl=`gridProductTpl`
&limit=`12`
]]
<!-- /product -->
</div>
<div class="col-md-12">
<div class="row">
<div class="products-tabs">
<!-- tab -->
<div id="tab1" class="tab-pane active">
<div class="products-slick" data-nav="#slick-nav-1">
<!-- product -->
[[!msProducts?
&tpl=`productInSlider`
&limit=`5`
&sortdir=`DESC`
]]
<!-- /product -->
</div>
<div id="slick-nav-1" class="products-slick-nav"></div>
</div>
<!-- /tab -->
</div>
</div>
</div>
<div class="col-md-4 col-xs-6">
<div class="product">
<form method="post" class="ms2_form d-flex flex-column flex-md-row align-items-center no-gutters">
<input type="hidden" name="id" value="{$id}">
<input type="hidden" name="count" value="1">
<input type="hidden" name="options" value="[]">
<div class="product-img">
<a href="{$id | url}">
{if $image?}
<img src="{$image}" alt="{$pagetitle}" title="{$pagetitle}" data-echo="{$image}" alt="{$pagetitle}" title="{$pagetitle}" style="height:100%;width:100%;"/>
{else}
<img src="{'assets_url' | option}components/minishop2/img/web/ms2_small.png"
srcset="{'assets_url' | option}components/minishop2/img/web/[email protected] 2x"
class="mw-100" alt="{$pagetitle}" title="{$pagetitle}"/>
{/if}
</a>
<div class="product-label">
<span class="sale">-30%</span>
{if $new?}
<span class="new">NEW</span>
{/if}
</div>
</div>
<div class="product-body">
<p class="product-category">[[#[[+parent]].pagetitle]]</p>
<h3 class="product-name"><a href="{$id | url}" class="font-weight-bold">{$pagetitle}</a></h3>
<h4 class="product-price">{$price}<i class="fa fa-btc" id="icon-btc"></i><del class="product-old-price">{if $old_price?}{$old_price}<i class="fa fa-btc" style="margin-left:3px;"></i>{/if}</del></h4>
<div class="product-rating">
<i class="fa fa-star"></i>
<i class="fa fa-star"></i>
<i class="fa fa-star"></i>
<i class="fa fa-star"></i>
<i class="fa fa-star"></i>
</div>
<div class="product-btns">
<button class="add-to-wishlist"><i class="fa fa-heart-o"></i><span class="tooltipp">add to wishlist</span></button>
<button class="add-to-compare"><i class="fa fa-exchange"></i><span class="tooltipp">add to compare</span></button>
<button class="quick-view"><i class="fa fa-eye"></i><span class="tooltipp">quick view</span></button>
</div>
</div>
<div class="add-to-cart">
<button type="submit" class="ms2_product add-to-cart-btn" id="btnAdd2Crt" name="ms2_action" value="cart/add" style="margin-left:10px; position:relative;"><i class="fa fa-shopping-cart" aria-hidden="true"></i>В корзину</button>
</div>
</form>
</div>
</div>
<div class="product">
<form method="post" class="ms2_form d-flex flex-column flex-md-row align-items-center no-gutters">
<input type="hidden" name="id" value="{$id}">
<input type="hidden" name="count" value="1">
<input type="hidden" name="options" value="[]">
<div class="product-img">
<a href="{$id | url}">
{if $image?}
<img src="{$image}" alt="{$pagetitle}" title="{$pagetitle}" data-echo="{$image}" alt="{$pagetitle}" title="{$pagetitle}" style="height:100%;width:100%;"/>
{else}
<img src="{'assets_url' | option}components/minishop2/img/web/ms2_small.png"
srcset="{'assets_url' | option}components/minishop2/img/web/[email protected] 2x"
class="mw-100" alt="{$pagetitle}" title="{$pagetitle}"/>
{/if}
</a>
<div class="product-label">
<span class="sale">-30%</span>
{if $new?}
<span class="new">NEW</span>
{/if}
</div>
</div>
<div class="product-body">
<p class="product-category">[[#[[+parent]].pagetitle]]</p>
<h3 class="product-name"><a href="#">{$pagetitle}</a></h3>
<h4 class="product-price">{$price} <del class="product-old-price">{if $old_price?}{$old_price}<i class="fa fa-btc" style="margin-left:3px;"></i>{/if}</del></h4>
<div class="product-rating">
<i class="fa fa-star"></i>
<i class="fa fa-star"></i>
<i class="fa fa-star"></i>
<i class="fa fa-star"></i>
<i class="fa fa-star"></i>
</div>
<div class="product-btns">
<button class="add-to-wishlist"><i class="fa fa-heart-o"></i><span class="tooltipp">add to wishlist</span></button>
<button class="add-to-compare"><i class="fa fa-exchange"></i><span class="tooltipp">add to compare</span></button>
<button class="quick-view"><i class="fa fa-eye"></i><span class="tooltipp">quick view</span></button>
</div>
</div>
<div class="add-to-cart">
<button type="submit" class="ms2_product add-to-cart-btn" name="ms2_action" value="cart/add" style="margin-left:10px; position:relative;"><i class="fa fa-shopping-cart" aria-hidden="true"></i>В корзину</button>
</div>
</form>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question