KahunaCart 1.5.0 is out, with 16 changes: 11 new features, 3 improvements and 2 fixes.
It started with a question from a store owner. Their shop lived at /shop inside a bigger Grav site, and they wanted it on its own site at its own address. The honest answer was "copy the files and the database, then delete everything that isn't the shop". That works. But it's clumsy, and I didn't like that it was the only answer. So 1.5.0 is about your store being yours to take wherever you want.
Export the whole store
There's a new Import & Export screen. The Export tab lists everything your store holds, and how many of each:
- your settings, plus the webhooks and notification settings that connect the store to other services
- customers, their addresses and customer groups
- products, categories, pictures and digital files
- coupons, sales, orders, store credit and reviews
- the data of any add-on that offers it
Everything is ticked to start with. Untick what you don't want, press Export, and you get one zip file. Inside is your data, plus copies you can read without KahunaCart: the catalog as a text file, and your customers and orders as CSV files that open in any spreadsheet. I like that part a lot. Even if you never restore a bundle, you have your customers and orders in a form you can use anywhere.
Customer passwords and the keys your store uses to talk to payment providers stay out unless you tick them. If you include the keys, along with saved cards and webhook secrets, they're locked with a passphrase you choose. Every export is kept in History, with who ran it and what it held.
Restore it on another site
A bundle restores in one of two ways.
Full restore puts the store into a fresh KahunaCart install with the same order numbers, the same customers and the same orders. If you included passwords, customers sign in with the ones they already have. If you included the keys, saved cards and payment providers keep working too. The one thing that never comes across is whether the store is open, so the new site keeps its own setting.
Merge brings a bundle into a store that is already running. It matches products by the last part of their web address, customers by email and orders by number. It never deletes anything, and running the same bundle twice changes nothing.
Both start with a dry run that shows what would happen, and both end with a report. And a restore sends nothing: no emails, no webhooks, no order events. Restored orders are history, not new sales.
bin/plugin kahunacart export --bundle store.zip and bin/plugin kahunacart import store.zip --full do the same from the command line, which is the way to go for a big store.
Pause the shop with one switch
Moving a shop needs a pause, and until now KahunaCart didn't really have one. Turning the cart off left buy buttons around that went nowhere.
1.5.0 adds a store status: Open, Coming soon or Paused, with a message of your own. While the shop isn't open, every page shows a banner with your message and nobody can start a new purchase. That goes for shoppers on the site and for apps and AI shopping agents connected to it. Product pages stay up, with "Coming soon" or "Paused" where the buy button was.
Everything else keeps working. Customers can sign in, see their orders, download what they bought and pay what they owe on an order that already exists. Subscriptions renew. Payments in progress still go through.
You can still buy, though. Signed-in staff see the store working, with a banner saying only staff can buy, so you can place a test order before you open. Coming soon also asks search engines not to list the shop's pages. Paused leaves your search listings alone.
Switch it from the dashboard, the General tab of the settings, or bin/plugin kahunacart store --status=paused. It's handy for more than moving, too. Holidays, a stocktake, or a launch that isn't ready yet.
Move your shop to its own site
This is the job that started it all. Pause the old shop, export everything, and restore it on the new site. The restore report then gives you a block of redirects to paste into the old site's settings. Every old shop address goes to the same page on the new site, because a restore keeps each product's address.
The docs walk through the whole move step by step, including the part people forget: stopping the old store right after the final export, so nothing lands on a site you're about to switch off. See Moving your shop to its own site.
The shop as your home page
In KahunaCart's settings, set Shop Base Route to / and the shop is your home page. The product listing is at /, the cart at /cart and products at addresses like /product/reef-runner-tee. Your blog, /about and the admin carry on as before.
If you already have a page at an address the shop uses, like /cart, the shop takes it. bin/plugin kahunacart check lists any of those, so run it before you switch. See Making the shop your home page.
Also in this release
- Export… on Products and Customers downloads a catalog file, a products CSV or a customers CSV that the importer reads back as it is.
- A catalog import's dry run names the pictures this store doesn't have, before anything is written.
- A catalog file with no products imports when it carries categories, attributes, manufacturers or custom fields.
Fixes
- A shop at the site root no longer doubles its slashes in links, redirects and emails.
- Back to shop on the set-password and payment pages works when Grav is installed in a folder.
Add-ons
- Bookings 1.1.8 takes no new bookings from shoppers while the store is coming soon or paused. Signed-in staff can still book.
- Subscriptions 1.1.8, Licenses 1.0.17, Rentals 1.0.7, Newsletters 1.1.11, Polar 1.1.11 and Bookings work with the shop as your home page.
- The Kahuna theme 1.0.15 shows the store status banner.
Update through the admin or with bin/gpm update, and come and tell me how it goes on Discord.