Как скрыть столбец в файле .tpl? - PullRequest
0 голосов
/ 19 июня 2020

enter image description here

Мой клиент не хочет отображать 3-й столбец: SKU. Как я могу это сделать? Вот код:

{foreach from=$customization.fields item="field"}
     <div class="product-customization-line row">
            <div class="col-sm-3 col-xs-4 label">
               {**$field.label*}
            </div>
                <div class="col-sm-9 col-xs-8 value">
                    {if $field.type == 'text'}
                      {if (int)$field.id_module}

                          {$field.text nofilter}

                      {else}

                          {$field.text}

                      {/if}
                    {elseif $field.type == 'image'}
                      <img src="{$field.image.small.url}">
                    {/if}
                  </div>
            </div>
       {/foreach}

Это на языке, который я не понимаю.

Ответы [ 2 ]

0 голосов
/ 19 июня 2020

Я так делал:

<style>

.page-cart table tr th:nth-child(3) {
display: none;
}

.page-cart table tr td:nth-child(3) {
display: none;
}

</style>
0 голосов
/ 19 июня 2020

Может попробовать:

{foreach from=$customization.fields item="field"}
    <div class="product-customization-line row" {if $field.label == 'SKU'}style="display: none"{/if}>
      <div class="col-sm-3 col-xs-4 label">
         {**$field.label*}
      </div>
          <div class="col-sm-9 col-xs-8 value">
              {if $field.type == 'text'}
                {if (int)$field.id_module}

                    {$field.text nofilter}

                {else}

                    {$field.text}

                {/if}
              {elseif $field.type == 'image'}
                <img src="{$field.image.small.url}">
              {/if}
            </div>
    </div>
{/foreach}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...