⬆️ Top πŸ“Š Summary πŸ“¦ Shipping 🌍 Countries πŸ“‹ Trade Terms πŸ’¬ Contact πŸ’° Discounts πŸ›’ Default Cart πŸ”„ Workflow

πŸ› οΈ Cart Config Entry Points

Every part of the cart is editable. No code changes needed for most adjustments.

πŸ“ Structure: All config in config/cart/*.json files. cart.html reads these on page load. Edit JSON β†’ refresh page β†’ new behavior.

⚠️ Will change: All values below are starting points. Update as your business evolves.

πŸ“Š Summary: 6 Config Files

What to changeFileWhen
πŸ“¦ Shipping methods, prices, carriersconfig/cart/shipping.jsonAdd/remove methods, change rates
🌍 Countries, currenciesconfig/cart/countries.jsonAdd country, change currency
πŸ“‹ DDP / DAP detailsconfig/cart/trade_terms.jsonChange trade terms, add EXW/FOB
πŸ’¬ WhatsApp / WeChat / Email / Phoneconfig/cart/contact.jsonUpdate real contact info
πŸ’° Bulk discount tiersconfig/cart/discounts.jsonChange 5/10/15/20/25%
πŸ›’ Default cart (demo)config/cart/default_cart.jsonChange demo items

πŸ“¦ Shipping Methods & Prices

πŸ“¦ Shipping methods list JSON

config/cart/shipping.json β†’ shipping_methods[]
Add, remove, or rename shipping options. Each has id, name, carrier, delivery time, weight range.
{ "id": "standard", "name": "Standard Shipping", "carrier": "DHL / FedEx", "delivery": "3-7 days", "weight_range": "0.5-21 kg", "icon": "⚑", "recommended": true, "show_when": "weight_under_21kg" }
To add a new method: Copy an entry, change id/name/carrier.
To remove: Delete the entry.
show_when options: always / weight_under_21kg / weight_21kg_or_more

πŸ’° Shipping prices (per weight) JSON

config/cart/shipping.json β†’ price_tiers[]
How much shipping costs at each weight range. 8 tiers from 0 to 100+ kg.
{"min_kg": 5, "max_kg": 11, "price_usd": 25.00}
To change a price: Edit the price_usd for that tier.
To add a tier: Insert a new entry with min_kg / max_kg / price_usd.
For 100+ kg: Set price_usd: null and note: "Quote required".

🌍 Countries

🌍 Country list + currencies JSON

config/cart/countries.json β†’ countries[]
Which countries customers can ship to. Currency, WeChat availability.
{ "code": "US", "flag": "πŸ‡ΊπŸ‡Έ", "name": "United States", "currency": "USD", "wechat_ok": false }
To add a country: Add a new entry with all 5 fields.
To disable a country: Remove the entry (or add an enabled: false field).
wechat_ok: false = US/EU (where WeChat is restricted), true = Asia/Africa.

πŸ“‹ Trade Terms (DDP / DAP)

πŸ“‹ Trade terms options JSON

config/cart/trade_terms.json β†’ trade_terms[]
What trade terms customers can choose (DDP, DAP, EXW, FOB, etc.)
{ "code": "DDP", "name": "DDP (all included)", "description": "βœ“ Price includes shipping + duties + taxes.", "color": "#2E7D32", "default": true }
To add EXW/FOB/CIF: Add new entries (Incoterms 2020 list).
To change default: Set default: true on one term, false on others.
To remove a term: Delete the entry (but keep at least one).

πŸ“Š DDP vs DAP comparison table JSON

config/cart/trade_terms.json β†’ guide.comparison_table[]
The comparison table shown in the "DDP vs DAP" tab.
{"aspect": "Customs duties", "DDP": "Included", "DAP": "You pay"}
Edit any row to change what customers see. Add rows for more aspects.

πŸ’¬ Contact Info

πŸ’¬ Contact channels (WhatsApp/WeChat/Email/Phone) JSON

config/cart/contact.json β†’ channels[]
Contact buttons shown in the "Contact Us Directly" section.
{ "id": "whatsapp", "name": "WhatsApp", "icon": "πŸ’¬", "phone": "+8613800000000", "enabled": true }
πŸ”΄ CRITICAL β€” Replace placeholders:
β€’ "phone": "+8613800000000" β†’ your real WhatsApp number
β€’ "wechat_id": "your_store_id" β†’ your real WeChat ID
β€’ "address": "sales@yourstore.com" β†’ your real email
β€’ "phone": "+86-571-XXXX-XXXX" β†’ your real phone

To add Telegram: Add a new entry with id: "telegram".
To disable a channel: Set enabled: false.

πŸ“ Auto-message template JSON

config/cart/contact.json β†’ auto_message_template
What message gets pre-filled when customer clicks WhatsApp/WeChat/Email.
"Hi! I'd like to order: {items} Ship to: {country} ..."
Available placeholders: {items}, {country}, {trade_term}, {shipping_method}, {weight}, {total}.

πŸ’° Discounts

πŸ’° Bulk discount tiers JSON

config/cart/discounts.json β†’ tier_discounts[]
Volume discount: buy more get lower price per piece.
{"min_qty": 100, "max_qty": 499, "discount": 0.15, "label": "Bulk"}
To change 5% to 7%: Change "discount": 0.05 to 0.07.
To add a tier (e.g. 2000+): Add a new entry.
For "Contact for quote": Set max_qty: null.

πŸ’‘ Bulk discount tip text JSON

config/cart/discounts.json β†’ bulk_tip
The yellow tip text shown in the cart.
"πŸ’‘ Bulk Discount: 10+ 5% off | 50+ 10% off | ..."
Edit the text. Use HTML tags like <strong> for bold.

πŸ›’ Default Cart (Demo)

πŸ›’ Items in default cart JSON

config/cart/default_cart.json β†’ default_cart[]
The 3 items shown when a new visitor opens the cart (for demo purposes).
[{"sku": "LM8UU-POM", "qty": 100}]
Change SKUs and quantities. Use real SKUs from your product catalog.

πŸ”„ How It Works

1. User opens cart.html
   ↓
2. Browser fetches all config/cart/*.json files
   ↓
3. JS reads: shipping methods, countries, contact info, etc.
   ↓
4. Cart renders with current config
   ↓
5. User interacts (changes country, selects shipping, etc.)
   ↓
6. When user clicks "Email Invoice":
   - Lead saved to localStorage (or POST to backend)
   - Invoice opens in new tab
   ↓
7. To change behavior: edit JSON β†’ refresh page
βœ… Key principle: Most day-to-day changes = edit JSON, no code.