• Closed by: Fred
  • Closed on: 21.06.20, 23:24
  • Reason: Closed
  • Comment: Glad to help!

Ticket #17914 - Product features in AMP product list page

I want to show a specific feature in both product and product list page on mobile.

For detail product page I managed to show it by adding in /templates/mobile/catalog/product.tpl the following code

{if $product.grouped_features}
  {foreach from=$product.grouped_features item=feature}
    {if $feature.name == "Exclusive"}
      <div class="xclusives"><span>EXCLUSIVE</span></div>
    {/if}
  {/foreach}
{/if}

but in /templates/mobile/catalog/_partials/miniatures/product-miniature.tpl it’s not working correctly. Can you help?

Comments

Fred 15 May 2020, 16:11

that’s because there is no “$product” variable available in product listing page. that requires additional development to get that data

Yiannis Koutsoumpidis 15 May 2020, 16:12

Although I did manage to work with the same code in product listing page on desktop.

In file /templates/catalog/_partials/miniatures/product.tpl

Fred 15 May 2020, 16:17

In any case that requires some development. We have too much tickets now and don’t have time to help you with this customization