• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Marek
  • Private: No
  • Open Date: 28.01.19, 10:39
  • Opened by: Claudio Noxia
  • Closed by: Marek
  • Closed on: 28.01.19, 12:53
  • Reason: Closed
  • Comment: Glad to help!

Ticket #13625 - Category not displayed in AMP site

The categories are not displayed in the AMP site. All permissions are set correctly and ssl and https are ok.
As you can see in the attached file, it seems that the AMP template is not parsed by the proper engine as the following slice of code appears in the resulting HTML output:
<template type=”amp-mustache”>

  
<article class="product-miniature relative m40 {{has_discount}}" data-id="{{id_product}}">
  <a href="{{amp_link}}" title="{{name}}">
    <amp-img src="{{cover.medium.url}}" width="{{cover.medium.width}}" height="{{cover.medium.height}}" layout="responsive" class="product-image-amp" alt="{{name}}"></amp-img>
    <ul class="product-labels">
              {{#discount_amount_to_display}}
      <li class="discount-amount discount-product">{{discount_amount_to_display}}
      </li>
      {{/discount_amount_to_display}}
      
      <li>{{flags.new.label}}</li>
              {{#quantity_all_versions}}
        <li>Out of Stock</li>
      {{/quantity_all_versions}}
            </ul>
  </a>
      <div class="product-price-amp price m15 flex-container">
    {{#has_discount}}
    <span class="discount-price">
      <span class="regular-price">{{regular_price}}</span>
    </span>
    {{/has_discount}}
    <span>{{price}}</span>
  </div>
  
  <div class="width-float ellipsis product-title m15">
    <a href="{{amp_link}}" title="{{name}}">{{name}}</a>
  </div>
      <form method="POST" action-xhr="//www.relaxstore.it/module/pk_amp/ajaxCart?who=category-add_to_cart" target="_top" class="flex-container align-items-center" on="submit-success: AMP.setState({ cartList: { items: event.response.items, info: event.response.info } });">
    <input type="hidden" name="act" value="up">
    <input type="hidden" name="do" value="cartUpdate">
    <input type="hidden" name="id_product" value="{{id_product}}">
    <input type="hidden" name="id_product_attribute" value="{{id_product_attribute}}">
    <button type="submit" class="add-to-cart big-btn">Aggiungi al carrello</button>
    <div submit-success><div class="flex-container align-items-center"><span>Successo&nbsp;</span><amp-bodymovin-animation layout="flex-item" width="34" height="34" src="https://www.relaxstore.it/themes/alysum/templates/mobile/assets/json/success.json" loop="false"></amp-bodymovin-animation></div></div>
    <div submit-error>Impossibile aggiungere al carrello</div>
    <div submitting>In attesa...</div>
  </form>
  
</article>

</template>

Comments

Marek 28 Jan 2019, 11:36

Hi, Claudio.
Please give me a link to your store

Marek 28 Jan 2019, 11:41

As I can see you have disabled AMP, could you please enable it to let me see the issue

Claudio Noxia 28 Jan 2019, 11:43

now I have enabled the AMP

Marek 28 Jan 2019, 11:46

Please enable “debug Mode” in your back office

Claudio Noxia 28 Jan 2019, 11:49

I enabled it

Marek 28 Jan 2019, 11:58

Please fill out all necessary fields in your profile https://support.promokit.eu/index.php?do=myprofile to access to your server through FTP

Claudio Noxia 28 Jan 2019, 12:05

ok, I have fill all fileds

Marek 28 Jan 2019, 12:18

The issue has been fixed. Please check it out

Claudio Noxia 28 Jan 2019, 12:30

there are still problems:
1) All the products appears “out of stock” (see attachment)
2) If you click a product you get an exception

Marek 28 Jan 2019, 12:46

Now it should be ok

Claudio Noxia 28 Jan 2019, 12:50

OK, thanks!

Marek 28 Jan 2019, 12:53

You are welcome