Add product thumbnail to back-in-stock email, left-align notify button text

renderBackInStockHtml() (and sendBackInStockEmails.ts on the backend)
now show a small product image above the product name, when the
product has one. Also left-aligns NotifyMeForm's button text to match
the email input's own left-aligned placeholder — was centered, read
as inconsistent next to it.

Also adds the klaro dependency, ahead of swapping the custom cookie
banner for it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Marco
2026-08-01 20:19:59 +00:00
parent 87388479de
commit 259002f5c0
5 changed files with 174 additions and 102 deletions
+8 -1
View File
@@ -368,9 +368,16 @@ export function renderOrderStatusHtml(
// Payload backend, which is where the real send actually happens (see
// this file's own top-of-file comment on why the two aren't literally
// shared code).
export function renderBackInStockHtml(template: EmailTemplateContent, productLabel: string, productUrl: string, seller: CompanySettings | null): string {
export function renderBackInStockHtml(
template: EmailTemplateContent,
productLabel: string,
productUrl: string,
seller: CompanySettings | null,
productImageUrl: string | null = null,
): string {
const body = `
${paragraphs(template.bodyText, "center")}
${productImageUrl ? `<p style="text-align:center;margin:0 0 12px;"><img src="${productImageUrl}" width="64" height="64" alt="" style="display:inline-block;width:64px;height:64px;border-radius:8px;object-fit:cover;border:1px solid ${BORDER};" /></p>` : ""}
<p style="text-align:center;font-size:13px;color:${TEXT_MUTED};margin:0 0 12px;">${escapeHtml(productLabel)}</p>
<table role="presentation" cellpadding="0" cellspacing="0" style="margin:20px auto 8px;">
<tr>