Skip to content
midngtpicklePublic

About

A sleek, lightweight Vanilla JS & CSS injection script for Squarespace event hire catalog websites. Replaces clunky shopping carts with an interactive heart-button wishlist, real-time floating badge, slide-out quote drawer with quantity steppers, and a client event inquiry form backed by webhooks. Mobile-first, responsive, and zero-dependency.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ Lofte Event Hire - Wishlist & Quote Request System

A seamless, high-converting "Add to Wishlist / Quote Request" experience for your Squarespace website (lofte.co.nz).

This script adds an elegant, heart-button quote collector to the hire catalog pages (plates, cutlery, glassware, holders).


πŸ”§ How It Works (Read This First)

lofte.co.nz does not use Squarespace Commerce. There is no Products collection, no product grid, and no product detail pages. Every hire item is hand-built on an ordinary page using Fluid Engine blocks, laid out like this:

[ image block ]   ← the product photo
[ html block  ]   ← the product name   e.g. "SIGNATURE DINNER PLATE"
[ html block  ]   ← the size / price / GST line

Because there is no wrapper element around each item, the script identifies products geometrically: for each photo inside the page content, it finds the nearest text block sitting directly below it in the same column. That name becomes the item title, and a slug of it becomes the item ID.

This approach:

  • works on desktop and mobile, where Fluid Engine reflows every block into its own row;
  • survives the grid being rearranged in the Squarespace editor;
  • ignores the header and footer, so the footer logo is never picked up as a product.

If you ever migrate to real Squarespace Products, this detection logic will need rewriting to use .grid-item / .ProductList-item selectors instead. See findProducts() in the script.

⚠️ Hearts only appear on catalog pages

The home page and About page are built from the same image-block-then-text-block pattern as the catalog. The home page hero, the four category tiles (PLATES, CUTLERY, GLASSWARE, HOLDERS) and the "HOW IT WORKS" panel are structurally identical to hire items, so the detector cannot tell them apart by shape alone.

Hearts are therefore restricted to an explicit list of catalog pages, set near the top of the script:

CATALOG_PATHS: ['/all-hire', '/plates', '/cutlery', '/glassware', '/holders'],

🚨 If you add a new category page (for example /linens), you must add its path to this list, or its items will not get heart icons.

As a second safeguard, any photo wrapped in a link is skipped, since that pattern means a navigation tile rather than a hire item. If you ever make a hire item's photo clickable, it will stop getting a heart.

Item IDs

An item's ID is a slug of its name (SIGNATURE DINNER PLATE β†’ signature-dinner-plate). The same item on /all-hire and on /plates therefore shares one ID, so hearting it in either place refers to the same entry in the quote list. Two different items must not share a name, or they will be treated as the same item.


✨ Features at a Glance

  • ❀️ Heart Icons on Products: Visitors can click the heart icon on any hire item photo to save it.
  • πŸ“± Real-Time Floating Badge: Displays total saved items at the bottom right corner of the screen.
  • πŸšͺ Slide-Out Quote Drawer: Click the floating badge to slide open a modern quote drawer showing selected items, thumbnail photos, item links, and quantity adjusters (- / +).
  • πŸ“ Event Details Inquiry Form: Collects the client's name, email, phone number, event date, event location/venue, approximate guest numbers, and custom notes.
  • πŸ’Ύ Automatic Save (Browser Storage): Items stay saved even if the visitor closes their browser or navigates between pages.
  • ⚑ Zero External Plugins Needed: Works directly inside Squarespace without monthly app subscription fees.

πŸš€ Step-by-Step Installation Guide (No Coding Required!)

Follow these simple steps to install the system on your Squarespace site in under 5 minutes:

Step 1: Open Squarespace Code Injection

  1. Log into your Squarespace Site Admin Panel.
  2. Depending on your Squarespace version:
    • Squarespace 7.1 (Most Common): Go to Website βž” Website Tools βž” Code Injection.
    • Squarespace 7.0: Go to Settings βž” Advanced βž” Code Injection.

Step 2: Paste the Code

  1. Open the lofte-wishlist-quote.html file included in this repository.
  2. Select and copy all the text inside that file.
  3. In your Squarespace Code Injection screen, scroll down to the FOOTER text box.
  4. Paste the copied code into the FOOTER box.

Step 3: Connect Your Quote Submission Form (Webhook)

When a customer submits a quote request, the form needs to send their event details and item list to your email or inbox.

By default, the script supports Formspree (a free & easy tool for receiving form submissions via email).

Setting up Formspree (Free & Takes 2 Minutes):

  1. Go to Formspree.io and create a free account.
  2. Click "+ New Form", give it a name like "Lofte Quote Requests", and enter the email address where you want to receive quote notifications.
  3. Formspree will give you a Form Endpoint URL that looks like this: https://formspree.io/f/mqkvqjze
  4. Copy that URL.
  5. In your Squarespace FOOTER code box where you pasted the script, find WEBHOOK_URL:
    WEBHOOK_URL: 'https://formspree.io/f/mppaplyo',
  6. The script is configured with your Formspree endpoint (https://formspree.io/f/mppaplyo). You can update this string anytime if your endpoint changes.

Note for Advanced Users: You can also use a Zapier Webhook, Make.com Webhook, or HubSpot Endpoint URL here if you want quote requests to automatically go into your CRM or Google Sheets!


Step 4: Save & Test!

  1. Click Save in the top-left corner of Squarespace.
  2. Open your website in a new browser tab or on your phone.
  3. Browse your catalog items and click a Heart Icon.
  4. You will see the Saved Items (1) button appear at the bottom right!
  5. Click it, test adjusting quantities, fill out a sample quote form, and hit Submit Quote Request.

🎨 How to Customize Colors & Fonts

If you ever want to tweak the design to match your brand colors, you can easily change the styling variables at the very top of the script:

:root {
  --lofte-primary: #1a1a1a;       /* Main text and button background */
  --lofte-accent: #c86d51;        /* Terracotta heart color & badges */
  --lofte-accent-hover: #b05a40;  /* Hover shade for buttons */
  --lofte-bg-light: #fafafa;      /* Light gray background color */
  --lofte-card-bg: #ffffff;      /* Drawer white background */
}
  • Simply replace #c86d51 with your brand's hex code (e.g. #D4A373 or #000000).

❓ Frequently Asked Questions (FAQ)

Q: Do items stay saved if a customer refreshes or visits tomorrow?

Yes! All selected items are safely stored in the visitor's web browser (localStorage). When they return to your site, their saved items will automatically reappear.

Q: Does this work on mobile phones and tablets?

Yes! The floating badge and slide-out drawer are fully responsive and optimized for iPhone, Android, iPad, and desktop screens.

Q: Can I change the required fields in the quote form?

Yes. In the script, locate the <form id="lofte-quote-form"> section to add, edit, or remove fields (like Event Type, Delivery vs Pick-up, etc.).

To make a field optional, delete required from its <input> and drop the <span class="req">*</span> from its label. For example, Approx Number of Guests is required by default to match the wording on the /all-hire-2 form β€” remove required from #lofte-f-guests if you would rather not gate the enquiry on it.

When you add a new field, give the <input> a name, then add that name to the payload object in handleFormSubmit() so it reaches your inbox. A field that is not in the payload will not be sent.

Q: Will this interfere with the rest of the site?

No. All styling is scoped to .lofte-* class names, and the script only reads the page β€” it never modifies your content blocks. The one shared rule it sets is position: relative on image blocks, which Squarespace already applies anyway.


🩺 Troubleshooting

No hearts appear on the items

First check: is the page listed in CATALOG_PATHS? A new category page gets no hearts until you add its path. See the warning above.

Then open the site, press F12 to open the browser console, and run:

LofteQuote.products()
  • Returns a list of your items β†’ detection is working; the problem is styling. Check that the heart is not hidden behind another element.
  • Returns an empty list on a catalog page β†’ the page structure is not what the script expects. The most likely cause is that a product's name is not in a text block directly below its photo. Open the page in the Squarespace editor and check the block layout.
  • Returns an empty list on the home/About page β†’ this is correct and intentional.

Hearts appear on things that are not hire items

A hero banner or category tile is being matched. Either the page should not be in CATALOG_PATHS, or the decorative image needs to stop looking like a product β€” wrapping it in a link is enough to exclude it.

The heart looks too big or too small on a photo

Heart size is scaled to each photo's width and then clamped, so a small mobile thumbnail does not get swamped. Tune these in CONFIG:

HEART_SCALE: 0.16,  // fraction of the photo's width
HEART_MIN: 26,      // never smaller than this (keeps the tap target usable)
HEART_MAX: 38,      // never larger than this

Other useful console commands:

Command What it does
LofteQuote.products() Lists every item detected on the current page
LofteQuote.basket() Shows the saved quote list
LofteQuote.clear() Empties the quote list
LofteQuote.rescan() Forces a re-scan of the page
LofteQuote.open() Opens the quote drawer

For verbose logging, set DEBUG: true in the CONFIG block near the top of the script.

The "Saved Items" button is not showing

This is intentional β€” the floating button stays hidden until at least one item is saved. Click a heart and it will appear.

An item is missing its size/price line in the quote email

The script looks for the price text in a block directly beneath the item's name. If an item's price block is missing or positioned somewhere else in the Fluid Engine grid, the item still works β€” the quote email just shows the name and quantity without the price line.

Quote submissions are not arriving

The drawer now shows the actual reason inside the form when a send fails, rather than failing silently. Common causes:

  • The Formspree form has not been confirmed β€” check the inbox you registered for a confirmation email from Formspree.
  • The monthly free-tier submission limit has been reached.
  • WEBHOOK_URL does not match your current Formspree endpoint.

πŸ“ž Support & Help

If you have any questions or need help customizing your quote workflow, feel free to reach out to your web development team Blair and midnightpickle.app πŸŒ™πŸ₯’

About

A sleek, lightweight Vanilla JS & CSS injection script for Squarespace event hire catalog websites. Replaces clunky shopping carts with an interactive heart-button wishlist, real-time floating badge, slide-out quote drawer with quantity steppers, and a client event inquiry form backed by webhooks. Mobile-first, responsive, and zero-dependency.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages