• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 08.05.20, 00:17
  • Opened by: Marco Montanari
  • Closed by: Fred
  • Closed on: 21.06.20, 23:05
  • Reason: Closed
  • Comment: Glad to help!

Ticket #17740 - AMP - Feature tr class (already adopted on desktop version) + multi features display grouped

as we did on dektop version see ticket: https://support.promokit.eu/index.php?do=details&task_id=17516

youi must implement a class to the table > tr to hide a specific feature by css:

https://gyazo.com/aeaa2e5ad618ad4267729c6680d1b00a https://gyazo.com/f15e53694218065670698e47e3a2f120

PLus in Desktop version multiple parameter of the same feature aer displayed like:

https://gyazo.com/747d71c6edd44e3e62f05759480cf2e5

and not like this in AMP

https://gyazo.com/0dc838e952d446247c8d35b561cdc2c8

is possible to not replay 2 times the same label feature name?

thanks

Comments

Marco Montanari 08 May 2020, 00:48

This is a patch you need to apply inside: templates/mobile/catalog/product.tpl

        {if !empty($product.features)}
        <div class="product-features m15">
          <strong class="h6">{l s='Data sheet' d='Shop.Theme.Catalog'}</strong>
          <table>
          {foreach from=$product.grouped_features item=feature}
          <tr class="feat{$feature.id_feature}">
            <td class="name">{$feature.name}</td>
            <td class="value">{$feature.value|escape:'htmlall'|nl2br nofilter}</td>
          </tr>
          {/foreach}
          </table>
        </div>
        {/if}

for good styling this is a CSS:

div.product-features > table > tbody > tr > td.name { font-weight: 500;}
div.product-features > table { font-size: 80%; }
.tabContent { padding: 10px; }

Please add to next update!

Fred 08 May 2020, 12:52

Done
Thank you for sharing the code