# Factorize Storefront — Quickstart

Get your real, physical store onto your home page in about five minutes: a storefront photo band, a visit block with a map and one-tap directions, and an optional hero photo your theme can fade with pure CSS.

## Prerequisites

- WordPress 6.2 or newer, PHP 7.4 or newer.
- WooCommerce is the natural habitat (the Factorize suite is a WooCommerce toolkit) but not a hard requirement — the shortcodes run on any WordPress site.
- A photo of your storefront (and optionally a second photo for the hero card).
- A way to set two options: WP-CLI, or anywhere you can run a line of PHP (a small must-use plugin, your theme's `functions.php`, a snippets plugin).

## Install

1. Copy the `factorize-storefront` folder into `wp-content/plugins/` (or upload the zip via **Plugins → Add New → Upload Plugin**).
2. Activate it. A **Factorize** admin menu appears with a Storefront status card — that's the whole admin footprint. There is no separate settings screen; everything below is options and shortcodes.

## First value in four steps

1. **Upload your photos** to the Media Library and note the attachment IDs (open an image and read the `post=` number in the URL, or use `wp post list --post_type=attachment`).
2. **Point the plugin at them:**

   ```bash
   wp option update et_storefront_image 123   # the photo band image
   wp option update et_hero_image 456         # optional: the hero card image
   ```

   Or in PHP: `update_option( 'et_storefront_image', 123 );`
3. **Drop the shortcodes onto your home page** — any block editor, widget, or page builder that renders shortcodes:

   ```
   [empire_storefront tagline="Come see it in person." sub="Thousands of name-brand tools in stock."]
   [empire_visit]
   ```

   Both attributes are optional; sensible defaults are built in.
4. **Load the page.** You should see the photo band with its tagline overlay and, below it, the visit block: map, address, hours, a Start Route button (opens Google Maps directions with only the destination set — Maps fills in the visitor's location and drive time, so your site never asks for geolocation), and a click-to-call button.

## Configuration

Config keys (defaults in `config.php`, no file edits needed to change them):

| Key | Default | Effect |
| --- | --- | --- |
| `maps_zoom` | `10` | The `z=` zoom level of the Google Maps embed inside `[empire_visit]`. |

Override by saving an array to the `factorize-storefront_options` option — `update_option( 'factorize-storefront_options', array( 'maps_zoom' => 12 ) );` — or filter the merged config at runtime with the `factorize-storefront_config` filter. The legacy `empire-storefront-sections_options` option name is still read as a fallback.

Related options (attachment IDs, not part of the config array):

| Option | Default | Effect |
| --- | --- | --- |
| `et_storefront_image` | `0` (unset) | Media Library attachment ID for the `[empire_storefront]` photo band. |
| `et_hero_image` | `0` (unset) | Attachment ID published as the `--et-hero-photo` CSS custom property on `wp_head`. |

## Troubleshooting

- **`[empire_storefront]` outputs nothing.** That is the deliberate empty state: `et_storefront_image` is unset or points to a deleted attachment. Set it to a valid attachment ID and the band renders.
- **The sections render but look unstyled, and the map is light, not dark.** The plugin ships no CSS on purpose — styling for `.et-storefront*`, `.et-visit*`, `.et-btn`, and the hero fade lives in the theme it was extracted from. On another theme, style those classes yourself. The dark map in particular is a CSS filter: Google's keyless embed only serves a light map (styled dark maps need the paid JS API).
- **The address, hours, or phone number are wrong for my store.** In 1.0.0 those are fixed in the `[empire_visit]` template — the plugin was extracted from a single-location store. Configurable and multiple locations are on the roadmap; until then, changing them means editing the shortcode markup.

## What's next

Planned (not yet in 1.0.0): multiple store locations, opening-hours schema.org rich results, holiday hours, a photo gallery band, and an announcement bar. See `readme.txt` for the full listing copy.
