<%- header %>
<% var _bcCat = (product.categories && product.categories.length > 0) ? product.categories[Math.floor(Math.random() * product.categories.length)] : null; %>
<% // ----- Variasi produk (kalau ada): pilihan awal = pilihan pertama yang belum habis ----- function _esc(s) { return String(s == null ? '' : s).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, '''); } const _hasV = !!(product.has_variants && product.variants && product.variants.options && product.variants.options.length); const _opts = _hasV ? product.variants.options : []; let _selIdx = _opts.findIndex(function (o) { return !o.sold_out; }); const _allSold = _hasV && _selIdx === -1; if (_selIdx === -1) _selIdx = 0; const _sel = _hasV ? _opts[_selIdx] : null; const _curPrice = _sel ? Number(_sel.eff_price) || 0 : Number(product.price) || 0; const _curOrig = _sel ? Number(_sel.eff_original) || 0 : Number(product.original_price) || 0; const _curImage = (_sel && _sel.image) || product.images[0] || ''; // Atribut tombol "Tambah ke Keranjang" (dibaca assets/js/cart.js); diperbarui JS saat variasi dipilih const _cartAttrs = 'data-add-cart data-slug="' + _esc(product.slug) + '" data-name="' + _esc(product.name) + '" data-price="' + _curPrice + '" data-image="' + _esc(_curImage) + '"' + (_sel ? ' data-variant="' + _esc(_sel.label) + '" data-variant-name="' + _esc(product.variants.name) + '"' : '') + (_allSold ? ' disabled' : ''); // Link WhatsApp tombol bawah: pesan standar + variasi yang dipilih const _waHref = _sel ? waBase + encodeURIComponent(waMessage + ' (' + product.variants.name + ': ' + _sel.label + ')') : waLink; const _origP = _curOrig; const _priceP = _curPrice; const discountPct = _origP > _priceP ? Math.round(((_origP - _priceP) / _origP) * 100) : 0; %>

<%= product.name %>

<% if (product.sold_count > 0) { %>
<%= product.sold_count %> terjual
<% } %>
<%= formatRupiah(_priceP) %> <% if (discountPct > 0 || _hasV) { %> 0 ? '' : ' hidden' %>><%= discountPct > 0 ? formatRupiah(_origP) : '' %> <% } %>

Dikirim dari Rajapolah

Ongkir dihitung admin lewat WhatsApp. Lihat info pengiriman.

<% if (product.categories && product.categories.length > 0) { %>

Kategori: <% product.categories.forEach(function (cat, i) { %> <%= cat.name %><%= i < product.categories.length - 1 ? ", " : "" %> <% }); %>

<% } %> <% if (_hasV) { %>

<%= product.variants.name %>: <%= _sel.label %>

<% _opts.forEach(function (o, i) { %> <% }); %>
<% if (_allSold) { %>

Semua pilihan sedang habis. Hubungi admin untuk info stok.

<% } %>
<% } %>

Detail Produk

<% // Teks Indonesia + English ditulis dua-duanya; yang tampil ditentukan CSS dari // (diatur assets/js/i18n.js) supaya tidak ada kedipan. Kalau versi // English kosong, teks Indonesia dipakai di kedua bahasa. Nama produk tidak diterjemahkan. var _enShort = (product.short_description_en || '').trim(); var _enDesc = (product.description_en || '').trim(); %> <% if (product.short_description) { %>

><%= product.short_description %>

<% } %> <% if (_enShort) { %>

<%= _enShort %>

<% } %>
> <%- product.description %>
<% if (_enDesc) { %>
<%- _enDesc %>
<% } %>

Kenapa Halona Craft

Bahan Alami, Dianyam Tangan

Dikerjakan pengrajin Rajapolah. Karena dibuat manual, pola dan ukuran bisa berbeda tipis dari foto, itulah karakternya.

Bisa Pesan Custom

Butuh ukuran, motif, atau warna khusus, atau mau pesan dalam jumlah banyak? Chat admin, kami kabari kemungkinannya.

Tanya Dulu, Tanpa Ribet

Masih ragu soal produk atau cara pesan? Chat admin lewat WhatsApp, kami bantu jelaskan.

<% if (related.length > 0) { %>

Produk Pilihan Lainnya

<% related.forEach(function (r) { %> <%- include('partials/product-card', { p: r, formatRupiah: formatRupiah }) %> <% }); %>
<% } %> <% if (bestSellers.length > 0) { %>

Lihat Juga

<% bestSellers.forEach(function (b) { %> <%- include('partials/product-card', { p: b, formatRupiah: formatRupiah }) %> <% }); %>
<% } %>
<%- footer %>
Pesan via WhatsApp
Pesan via WhatsApp