Inhalte basierend auf einer Bestellung für ein bestimmtes Produkt anzeigen
Diese Seite wurde gedruckt um Jul 27, 2024. Die neueste Version findest du unter https://help.shopify.com/de/manual/orders/status-tracking/customize-order-status/show-content-based-on-products.
Erfahre hier, wie du durch checkout.line_items
iterierst, um zu überprüfen, ob ein spezielles Produkt in der Bestellung enthalten ist.
Schritte
- Navigiere in deinem Shopify-Adminbereich zu Einstellungen > Checkout.
- Scrolle nach unten zum Abschnitt Zusätzliche Skripte.
- Kopiere den folgenden Code in deine Zwischenablage (
command + c
auf einem Mac,ctrl + c
auf einem PC).
<script>
{% for line in checkout.line_items %}
// DEBUG looking at {{ line.title }}
{% if line.title == 'Downloadable product' %}
Shopify.Checkout.OrderStatus.addContentBox(
'<p>Download your product <a href="#">Here!</a></p>'
)
{% endif %}
{% endfor %}
</script>
- Füge den Code in das Feld Zusätzliche Skripte ein. (drücke
ctrl
+V
auf einem PC odercommand
+V
auf einem Mac) - Führe eine Testbestellung aus, um deine Bestellstatusseite anzuzeigen:
- Tippe in der Shopify-App auf die Schaltfläche ... und anschließend auf Einstellungen.
- Tippe im Abschnitt Shop-Einstellungen auf Checkout.
- Scrolle nach unten zum Abschnitt Zusätzliche Skripte.
- Kopiere den folgenden Code in deine Zwischenablage (
command + c
auf einem Mac,ctrl + c
auf einem PC).
<script>
{% for line in checkout.line_items %}
// DEBUG looking at {{ line.title }}
{% if line.title == 'Downloadable product' %}
Shopify.Checkout.OrderStatus.addContentBox(
'<p>Download your product <a href="#">Here!</a></p>'
)
{% endif %}
{% endfor %}
</script>
- Füge den Code in das Feld Zusätzliche Skripte ein. (drücke
ctrl
+V
auf einem PC odercommand
+V
auf einem Mac) - Führe eine Testbestellung aus, um deine Bestellstatusseite anzuzeigen:
- Tippe in der Shopify-App auf die Schaltfläche ... und anschließend auf Einstellungen.
- Tippe im Abschnitt Shop-Einstellungen auf Checkout.
- Scrolle nach unten zum Abschnitt Zusätzliche Skripte.
- Kopiere den folgenden Code in deine Zwischenablage (
command + c
auf einem Mac,ctrl + c
auf einem PC).
<script>
{% for line in checkout.line_items %}
// DEBUG looking at {{ line.title }}
{% if line.title == 'Downloadable product' %}
Shopify.Checkout.OrderStatus.addContentBox(
'<p>Download your product <a href="#">Here!</a></p>'
)
{% endif %}
{% endfor %}
</script>
- Füge den Code in das Feld Zusätzliche Skripte ein. (drücke
ctrl
+V
auf einem PC odercommand
+V
auf einem Mac) - Führe eine Testbestellung aus, um deine Bestellstatusseite anzuzeigen: