FROM CACHE - de_header

Payment Icons auf der Produktseite unter dem Warenkorbbutton einfügen

Hinüber
Neues Mitglied
5 0 0

Hallo,

 

ich würde gerne die Payment buttons auf meiner Produktseite einfügen. Habe da Bereits ein Video gesehen und wollte nach der Anleitung einen Code einbinden. Leider bekomme ich ein Fehlermeldung. Könnt ihr mir vielleicht sagen was das Problem ist?

 

Hier der Code:

 

</div>

    {%- comment -%}
  --------------------------------------------------------------------------------------------------------------------
  PAYMENT OPTION BUTTONS
  --------------------------------------------------------------------------------------------------------------------
  {%- endcomment -%}

  <div style= "margin-top: 16px; padding-top: 24px"> 
  {%- for type in shop.enabled_payment_types -%}
            <li class="HorizontalList__Item">{{ type | payment_type_svg_tag }}</li>
          {%- endfor -%}
          <li class="HorizontalList__Item deposit"><img src="https://cdn.shopify.com/s/files/1/0610/6146/4281/files/Vorkasse_400.jpg"/></li>
        {%- endcapture -%}

        {%- if payment_methods != blank -%}
          <ul class="Footer__PaymentList HorizontalList">
            {{ payment_methods }}
          </ul>
  </div>

 

Bildschirmfoto 2022-08-04 um 13.35.34.png

8 ANTWORTEN 8
Finer
Shopify Expert
1902 390 676

@Hinüber auf den ersten Blick würde ich sage, dass dem {% endcaputure %} ein vorangestelltes {% capture %} fehlt. Insofern ist der Code unvollständig. Hast du einen Link zum Video?

- Did my answer help? Mark my post with a like
- Did I solve your problem? Mark my post as an accepted solution.
- You need professional help? Contact our Shopify Partner Agency
Hinüber
Neues Mitglied
5 0 0

@Finer Hey, danke für deine Antwort. Habe gerade nochmal geschaut. Ich habe wohl vergessen die erste Zeile vom Code zu kopieren. Ich probiere es gleich mal aus. Hier der Link zu dem Video. Ist gut verständlich gemacht, auch für mich als Ahnungslosen.

 

https://www.youtube.com/watch?v=HNKm5mlILAY&t=189s 

Hinüber
Neues Mitglied
5 0 0

@Finer hat leider nicht geklappt 🙁

Finer
Shopify Expert
1902 390 676

@Hinüber ich hab mit nochmal deinen Screenshot angeschaut:

1) Du solltest die Payment Icons nicht in der product-form.liquid einbauen. Diese Snippet ist für die Varianten- und Mengenauswahl sowie die "Add To Cart" Button.

 

2) Wenn du dir den Code aus dem Video übernimmst, musst du auch die {% capture %}-Elemente übernehmen. Aktuell hast du nur {% endcapture %} übernommen.

 

Hier der Code aus dem Video

<div style="margin-top:16px;padding-top:24px; border-top:0px solid #e3e3e3;">
  {%- capture payment_methods -%}
    {%- for type in shop.enable_payment_types -%}
      <li class="HorizontalList__Item">{{ type | payment_type_svg_tag }}</li>
    {%- endfor -%}
  {%- endcapture -%}

  {%- if payment_methods != blank -%}
    <ul style="display:flex;justify-conten:flex-start;flex-wrap:wrap;">
      {{ payment_methods }}
    </ul>
  {%- endif -%}
</div>
- Did my answer help? Mark my post with a like
- Did I solve your problem? Mark my post as an accepted solution.
- You need professional help? Contact our Shopify Partner Agency
Hinüber
Neues Mitglied
5 0 0
Hey, danke für die Antwort. Wo sollte ich den Code denn idealerweise einfügen?

Finer
Shopify Expert
1902 390 676

In die product-template.liquid

- Did my answer help? Mark my post with a like
- Did I solve your problem? Mark my post as an accepted solution.
- You need professional help? Contact our Shopify Partner Agency
Hinüber
Neues Mitglied
5 0 0

@Finer danke Dir. Werde ich später direkt ausprobieren.

Quaxi
Tourist
4 0 0

In dem product-template snippet finde ich aber keinen Payment Button. Was ist der Nachteil wenn man es in die product-form packt?