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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user