Problemi personalizzazione mail

Topic summary

Problema nella personalizzazione delle email: aggiungendo il logo, nel messaggio veniva mostrato anche l’URL HTTP dell’immagine PNG invece del solo logo.

  • È stato richiesto di condividere il codice del template email per individuare l’errore.
  • Nel codice inviato compariva {{shop.email_logo_url}} da solo nella prima riga, oltre al corretto utilizzo dentro il tag <img src="{{shop.email_logo_url}}">.
  • {{shop.email_logo_url}} è una variabile Liquid che restituisce il link del logo: se lasciata come testo isolato, viene stampato l’URL nell’email.

Indicazione fornita:

  • rimuovere completamente la riga iniziale con {{shop.email_logo_url}};
  • lasciare soltanto il riferimento alla variabile dentro il tag immagine già presente nel template.

Esito:

  • la modifica ha risolto il problema;
  • nessuna ulteriore azione richiesta.

Discussione chiusa con soluzione confermata.

Summarized with AI on March 6. AI used: gpt-5.4.

Quando provo a personalizzare la mail e aggiungo il mio logo mi mostra l’http dell’immagine (png) come posso risolverlo

Ciao @Michele27 !

Puoi copiare qui tutto il codice di uno dei template che ti da questo problema così posso capire dov’è il problema?

{{shop.email_logo_url}}
{% capture email_title %}Grazie per il tuo acquisto! {% endcapture %}
{% capture email_body %}
{% if requires_shipping %}
{% case delivery_method %}
{% when ‘pick-up’ %}
Riceverai un’e-mail quando il tuo ordine sarà pronto per il ritiro.
{% when ‘local’ %}
CIao {{ customer.first_name }}, stiamo preparando il tuo ordine per la consegna.
{% else %}
Ciao {{ customer.first_name }}, stiamo preparando il tuo ordine per essere spedito. Ti avviseremo quando sarà stato inviato.
{% endcase %}
{% if delivery_instructions != blank %}

Delivery information: {{ delivery_instructions }}

{% endif %} {% endif %} {% endcapture %} {{ email_title }} .button__cell { background: {{ shop.email_accent_color }}; } a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
{%- if shop.email_logo_url %} {{ shop.name }} {%- else %}

{{ shop.name }}

{%- endif %}
Ordine {{ order_name }}

{{ email_title }}

{{ email_body }}

{% if order_status_url %}
Visualizza il tuo ordine
{% if shop.url %}
o Visita il nostro negozio
{% endif %}

{% else %}
{% if shop.url %}

Visita il nostro negozio
{% endif %}

{% endif %}

{% assign gift_card_line_item = line_items | where: “gift_card” %}
{% if gift_card_line_item.first %}

Gift card

You’ll receive separate emails for any gift cards.

{% endif %}

Riepilogo ordine

{% for line in subtotal_line_items %} {% endfor %}
{% if line.image %} {% endif %} {% if line.product.title %} {% assign line_title = line.product.title %} {% else %} {% assign line_title = line.title %} {% endif %}

{% if line.quantity < line.quantity %}
{% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}

{{ line_title }} × {{ line_display }}

{% if line.variant.title != ‘Default Title’ %}
{{ line.variant.title }}

{% endif %}

{% if line.selling_plan_allocation %}
{{ line.selling_plan_allocation.selling_plan.name }}

{% endif %}

{% if line.refunded_quantity > 0 %}
Refunded
{% endif %}

{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != ‘all’ %}



{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})


{% endif %}
{% endfor %}
{% endif %}

{% if line.original_line_price != line.final_line_price %} {{ line.original_line_price | money }} {% endif %}

{% if line.final_line_price > 0 %} {{ line.final_line_price | money }} {% else %} Gratis {% endif %}

{% for discount_application in discount_applications %} {% if discount_application.target_selection == 'all' %} {% capture discount_title %} {% if discount_application.title %} {{ discount_application.title | upcase }} {% else %} Discount {% endif %} {% endcapture %}

{% endif %}
{% endfor %}

{% if delivery_method == ‘pick-up’ %}

{% else %}

{% endif %}

{% if current_total_duties %}

{% endif %}

{% if total_tip and total_tip > 0 %}

{% endif %}

Sconto {{ discount_title }}

-{{ discount_application.total_allocated_amount | money }}

Prezzo

{{ subtotal_price | money }}

Pickup

{{ shipping_price | money }}

Spedizione

{{ shipping_price | money }}

Duties

{{ current_total_duties | money }}

Tasse

{{ tax_price | money }}

Tip

{{ total_tip | money }}

Totale

{{ total_price | money_with_currency }}

{% if total_discounts > 0 %}

Hai risparmiato {{ total_discounts | money }}

{% endif %}

{% assign transaction_size = 0 %}
{% assign transaction_amount = 0 %}
{% for transaction in transactions %}
{% unless transaction.kind == “capture” or transaction.kind == “void” %}
{% assign transaction_size = transaction_size | plus: 1 %}
{% assign transaction_amount = transaction_amount | plus: transaction.amount %}
{% endunless %}
{% endfor %}

{% if transaction_size > 1 or transaction_amount < total_price %}

{% for transaction in transactions %}
{% if transaction.status == “success” and transaction.kind == “authorization” or transaction.kind == “sale” %}
{% if transaction.payment_details.credit_card_company %}
{% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (ending in {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
{% else %}
{% capture transaction_name %}{{ transaction.gateway_display_name }}{% endcapture %}
{% endif %}

{% endif %}
{% if transaction.kind == ‘refund’ %}
{% if transaction.payment_details.credit_card_company %}
{% assign refund_method_title = transaction.payment_details.credit_card_company %}
{% else %}
{% assign refund_method_title = transaction.gateway %}
{% endif %}

{% endif %}
{% endfor %}

{{transaction_name}}

{{ transaction.amount | money }}

Refund
{{ refund_method_title | capitalize }}

- {{ transaction.amount | money }}
{% endif %}

Informazioni cliente

{% if requires_shipping and shipping_address %} {% endif %} {% if billing_address %} {% endif %}

Indirizzo di spedizione

{{ shipping_address | format_address }}

Indirizzo di fatturazione

{{ billing_address | format_address }}
{% if requires_shipping and shipping_address %} {% endif %} {% assign transaction_count = transactions | size %} {% if transaction_count > 0 %} {% endif %}

Spedizione

{{ shipping_method.title }}

Metodo di pagamento

{% for transaction in transactions %} {% if transaction.status == "success" or transaction.status == "pending" %} {% if transaction.kind == "authorization" or transaction.kind == "sale" %} {% if transaction.payment_details.credit_card_company %}

{{ transaction.payment_details.credit_card_company }} che finisce con {{ transaction.payment_details.credit_card_last_four_digits }} — {{ transaction.amount | money }}

{% elsif transaction.gateway_display_name == "Gift card" %}

che finisce con {{ transaction.payment_details.gift_card.last_four_characters | upcase }} — {{ transaction.amount | money }}
Gift card balance: {{ transaction.payment_details.gift_card.balance | money }}

{% else %}

{{ transaction.gateway_display_name }} — {{ transaction.amount | money }}

{% endif %} {% endif %} {% endif %} {% endfor %}

Se hai domande, rispondi a questa email o contattaci a {{ shop.email }}

Ciao @Michele27

Il problema è il {{shop.email_logo_url}} nella prima riga. Rimuovilo completamente dalla prima riga e vedrai che il link scomparirà e il logo invece rimarrà

Fammi sapere se il problema è risolto!

1 Like

Ha funzionato grazie mille @MarcoReleasit