Keep shoppers on mozimo.in: internalize all marketing links
- gifting tab CTAs now point at our /collections pages (seed defaults + one-off PB migration rewriting shop.mozimo.in cta_urls, idempotent) - Hero/Footer/our-world/journal 'shop' links -> /chocolate; bespoke bulk-ordering -> /gifting#corporate-bulk - still on Shopify (deliberate, until Phase 2): PDP buy button, Header bag+account, footer policies
This commit is contained in:
+25
-5
@@ -48,7 +48,7 @@ const GIFTING_TABS = [
|
|||||||
product_handles: "mozimo-dark-chocolate-bar-85\n9-pralines-box\nbars-box",
|
product_handles: "mozimo-dark-chocolate-bar-85\n9-pralines-box\nbars-box",
|
||||||
collection_handle: "gift-collection",
|
collection_handle: "gift-collection",
|
||||||
cta_label: "View all Signature gifts",
|
cta_label: "View all Signature gifts",
|
||||||
cta_url: "https://shop.mozimo.in/collections/gift-collection",
|
cta_url: "/collections/gift-collection",
|
||||||
sort: 1,
|
sort: 1,
|
||||||
visible: true,
|
visible: true,
|
||||||
},
|
},
|
||||||
@@ -64,7 +64,7 @@ const GIFTING_TABS = [
|
|||||||
"pistachio-spread-60\nmozimo-almond-dragees-60\nkunafa-chocolate-bar\nspreads-box",
|
"pistachio-spread-60\nmozimo-almond-dragees-60\nkunafa-chocolate-bar\nspreads-box",
|
||||||
collection_handle: "best-sellers",
|
collection_handle: "best-sellers",
|
||||||
cta_label: "Shop Best Sellers",
|
cta_label: "Shop Best Sellers",
|
||||||
cta_url: "https://shop.mozimo.in/collections/best-sellers",
|
cta_url: "/collections/best-sellers",
|
||||||
sort: 2,
|
sort: 2,
|
||||||
visible: true,
|
visible: true,
|
||||||
},
|
},
|
||||||
@@ -80,7 +80,7 @@ const GIFTING_TABS = [
|
|||||||
"mozimo-carnival-celebration-s\nmozimo-carnival-celebration-m",
|
"mozimo-carnival-celebration-s\nmozimo-carnival-celebration-m",
|
||||||
collection_handle: "gift-collection",
|
collection_handle: "gift-collection",
|
||||||
cta_label: "View the full collection",
|
cta_label: "View the full collection",
|
||||||
cta_url: "https://shop.mozimo.in/collections/gift-collection",
|
cta_url: "/collections/gift-collection",
|
||||||
sort: 3,
|
sort: 3,
|
||||||
visible: true,
|
visible: true,
|
||||||
},
|
},
|
||||||
@@ -95,7 +95,7 @@ const GIFTING_TABS = [
|
|||||||
product_handles: "mozimo-carnival-celebration-l\nmozimo-celestial-s",
|
product_handles: "mozimo-carnival-celebration-l\nmozimo-celestial-s",
|
||||||
collection_handle: "gift-collection",
|
collection_handle: "gift-collection",
|
||||||
cta_label: "View the full collection",
|
cta_label: "View the full collection",
|
||||||
cta_url: "https://shop.mozimo.in/collections/gift-collection",
|
cta_url: "/collections/gift-collection",
|
||||||
sort: 4,
|
sort: 4,
|
||||||
visible: true,
|
visible: true,
|
||||||
},
|
},
|
||||||
@@ -109,7 +109,7 @@ const GIFTING_TABS = [
|
|||||||
tile_url: "/products/mozi-30.jpg",
|
tile_url: "/products/mozi-30.jpg",
|
||||||
collection_handle: "gift-collection",
|
collection_handle: "gift-collection",
|
||||||
cta_label: "Shop the Seasonal Edit",
|
cta_label: "Shop the Seasonal Edit",
|
||||||
cta_url: "https://shop.mozimo.in/collections/gift-collection",
|
cta_url: "/collections/gift-collection",
|
||||||
sort: 5,
|
sort: 5,
|
||||||
visible: true,
|
visible: true,
|
||||||
},
|
},
|
||||||
@@ -455,6 +455,26 @@ async function main() {
|
|||||||
console.log(
|
console.log(
|
||||||
`[pb-seed] "${name}" already has ${existing.body.totalItems} record(s) — leaving as is`,
|
`[pb-seed] "${name}" already has ${existing.body.totalItems} record(s) — leaving as is`,
|
||||||
);
|
);
|
||||||
|
// one-off migration: gifting tab CTAs must keep users on mozimo.in,
|
||||||
|
// never bounce them out to the shopify domain
|
||||||
|
if (name === "gifting_tabs") {
|
||||||
|
const all = await authed(`/api/collections/${name}/records?perPage=100`);
|
||||||
|
for (const rec of all.body.items ?? []) {
|
||||||
|
const url = rec.cta_url ?? "";
|
||||||
|
if (url.startsWith("https://shop.mozimo.in/")) {
|
||||||
|
const internal = url.replace("https://shop.mozimo.in", "");
|
||||||
|
const patched = await authed(`/api/collections/${name}/records/${rec.id}`, {
|
||||||
|
method: "PATCH",
|
||||||
|
body: JSON.stringify({ cta_url: internal }),
|
||||||
|
});
|
||||||
|
if (patched.ok) {
|
||||||
|
console.log(`[pb-seed] migrated cta_url for "${rec.name}" -> ${internal}`);
|
||||||
|
} else {
|
||||||
|
console.warn(`[pb-seed] cta migration failed for "${rec.name}":`, patched.status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (const record of SEEDS[name]) {
|
for (const record of SEEDS[name]) {
|
||||||
|
|||||||
+1
-1
@@ -197,7 +197,7 @@ function BespokePage() {
|
|||||||
<p className="mt-4 max-w-xs text-[0.85rem] leading-relaxed text-ink-500">
|
<p className="mt-4 max-w-xs text-[0.85rem] leading-relaxed text-ink-500">
|
||||||
For standard quantities, the{" "}
|
For standard quantities, the{" "}
|
||||||
<a
|
<a
|
||||||
href="https://shop.mozimo.in/pages/bulk-ordering"
|
href="/gifting#corporate-bulk"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="link-quiet font-medium text-orange-500"
|
className="link-quiet font-medium text-orange-500"
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ function JournalArticle() {
|
|||||||
</p>
|
</p>
|
||||||
<div className="mt-6 flex flex-wrap justify-center gap-4">
|
<div className="mt-6 flex flex-wrap justify-center gap-4">
|
||||||
<a
|
<a
|
||||||
href="https://shop.mozimo.in/"
|
href="/chocolate"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="btn btn-dark"
|
className="btn btn-dark"
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ function OurWorldPage() {
|
|||||||
<Reveal delay={0.18}>
|
<Reveal delay={0.18}>
|
||||||
<div className="flex flex-wrap justify-center gap-4">
|
<div className="flex flex-wrap justify-center gap-4">
|
||||||
<a
|
<a
|
||||||
href="https://shop.mozimo.in/"
|
href="/chocolate"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="btn btn-solid"
|
className="btn btn-solid"
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const EXPLORE = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const POLICIES = [
|
const POLICIES = [
|
||||||
{ label: "Shop Online", href: "https://shop.mozimo.in/" },
|
{ label: "Shop Chocolate", href: "/chocolate" },
|
||||||
{
|
{
|
||||||
label: "Privacy Policy",
|
label: "Privacy Policy",
|
||||||
href: "https://shop.mozimo.in/policies/privacy-policy",
|
href: "https://shop.mozimo.in/policies/privacy-policy",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export default function Hero() {
|
|||||||
Discover Mozimo
|
Discover Mozimo
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="https://shop.mozimo.in/"
|
href="/chocolate"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="btn btn-ghost"
|
className="btn btn-ghost"
|
||||||
|
|||||||
Reference in New Issue
Block a user