Answer the question
In order to leave comments, you need to log in
Why can't the block with pictures be deleted in card catalog.item so that adding to cart would still work?
I made my layout, added a title, a preview image, a price.
When you try to delete the old code, adding to cart stops working.
<div class="product-item">
<span class="product-item-image-slider-slide-container slide" id="<?= $itemIds['PICT_SLIDER'] ?>"
<?= ($showSlider ? '' : 'style="display: none;"') ?>
data-slider-interval="<?= $arParams['SLIDER_INTERVAL'] ?>" data-slider-wrap="true">
<?
if ($showSlider) {
foreach ($morePhoto as $key => $photo) {
?>
<span class="product-item-image-slide item <?= ($key == 0 ? 'active' : '') ?>"
style="background-image: display: none"></span>
<?
}
}
?>
</span>
<?
if ($item['SECOND_PICT']) {
$bgImage = !empty($item['PREVIEW_PICTURE_SECOND']) ? $item['PREVIEW_PICTURE_SECOND']['SRC'] : $item['PREVIEW_PICTURE']['SRC'];
?>
<span class="" id="<?= $itemIds['SECOND_PICT'] ?>"
style="background-image: display: none"></span>
<?
}
?>
</div>
Answer the question
In order to leave comments, you need to log in
Because js says
init: function()
{
// ................
if (!this.obPict)
{
this.errorCode = -2;
}
// ................
if (!this.obPictSlider)
{
this.errorCode = -4;
}
// ................
if (this.errorCode === 0)
{
// здесь все инициализируется, добавление в корзину в том числе
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question