Skip to content

Store

Next releaseBeta

Manage the products, orders, customers, discounts, pages, blog posts and menus of the Shopify store behind a theme, from midcode and through your own Shopify CLI.

View as Markdown

This ships with the next release of midcode. The version you can download today (1.1.2) doesn’t have it yet.

When the project is a Shopify theme, the top bar has one more place beside Design, Code, CMS and Database: Store. It opens where the canvas is and shows the store the theme is worked on with: its orders, products, collections, customers, discounts, pages, blog posts, menus and themes.

Everything is read from the store and written to the store, through the Shopify CLI you’re signed in to. midcode keeps no copy of the data and no token. That makes Store different from the rest of midcode in one way that matters: nothing here is a file, so there is no ⌘Z and nothing to publish. What you save is in your store at once.

To open a theme and choose its store, see Shopify themes.

Open the Store

Click “Store” in the middle of the top bar. On the left are its parts: Overview, Orders, Products, Collections, Customers and Discounts, then Pages, Blog posts and Menus under “Content”, and Themes under “Online store”. The store’s address at the bottom opens Shopify’s admin in your browser.

Esc leaves the field you’re in, then closes what’s open, then goes back to the canvas. Going from Design to Code, or to another place of the top bar, closes Store too.

Store needs the same things the theme does, and asks for what’s missing with the same cards: the Shopify CLI, a sign-in and a store (see Open a theme). Then it needs one more.

Connect the store

Serving a theme doesn’t give access to a store’s data. For that the Shopify CLI needs your approval in the store’s admin, and the card “Connect the store” asks for it: “To show and change products, orders, customers and the rest, the Shopify CLI needs your go-ahead in the store’s admin. midcode keeps no key of its own.”

Click “Connect”. midcode runs:

Terminal
shopify store auth --store your-store.myshopify.com --scopes <the scopes below>

Your browser opens the store’s admin. Approve there what midcode asks for. midcode waits up to 5 minutes, and “Cancel” stops it.

These are the scopes, and they’re only what the Store view uses:

ForScopes
Products, stockread_products, write_products, read_inventory, write_inventory, read_locations
Orders, shippingread_orders, write_orders, read_fulfillments, write_fulfillments, read_merchant_managed_fulfillment_orders, write_merchant_managed_fulfillment_orders
Customersread_customers, write_customers
Contentread_content, write_content, read_online_store_pages, write_online_store_pages, read_online_store_navigation, write_online_store_navigation
Discountsread_discounts, write_discounts
Imagesread_files, write_files
Sales channelsread_publications, write_publications

The token belongs to the CLI and lasts about a day. When it runs out, the part you’re on shows the same card again. As the card says: “Shopify asks again after a day or so: one click each time.”

Themes is the one part that doesn’t need this step.

What each part does

PartWhat you can do
OverviewSee sales of the last 30 days and by day, orders still to ship, product and customer counts, and the latest orders
OrdersMark as shipped with tracking, mark as paid, archive, cancel; edit the note and tags
ProductsCreate, edit, duplicate, delete. Title, description, status, price, compare-at price, SKU, stock, images, type, vendor, tags, search engine listing
CollectionsCreate, edit, delete. Title, description, and its products picked by hand
CustomersCreate, edit, delete. Name, email, phone, note, tags. Shows their orders, what they spent and their addresses
DiscountsCreate, edit, delete, turn on and off: codes that take a percentage or an amount off the whole order
PagesCreate, edit, delete, make visible or hidden. Title and content
Blog postsThe same, plus excerpt, author and tags
MenusCreate, edit, delete. Links up to three levels, reordered and removed
ThemesPreview, customize, send this folder as a theme, publish: see Send the theme to your store

Each list shows 50 rows at a time, with “Show more” for the next ones. Every list but Menus has a search field, and Products, Orders, Pages, Blog posts and Discounts have a “Show” filter (products by status, orders “To ship” or “To be paid”, pages “Visible” or “Hidden”). “Read it again” asks the store for the list again.

Editing and saving

Click a row and it opens in a form beside the list. “New product”, “New page” and the others open an empty one.

  • What you type is a draft. Nothing goes to the store while you type.

  • “Save”, or ⌘S, sends only the fields you changed. A new thing has “Create” instead.

  • “Discard” drops the draft.

  • Some things are done at once and aren’t part of the draft: adding or removing a product’s image, putting a product in a collection or taking it out, turning a discount on or off, “Duplicate”, and the buttons of an order.

  • The “More” menu of a form has “Open in Shopify admin”, for whatever midcode doesn’t do, and “Delete”.

Saving and deleting need a license or a running trial, like every edit in midcode (see Install and license).

Products and stock

A new product is a draft unless you set its status, has one variant, and is made available in the Online Store sales channel. With several variants, the form lists each with its price, SKU and stock. Adding variants or options is done in Shopify’s admin.

“In stock” is the total you have. Typing a number for a variant that wasn’t counted (“Not counted”) starts counting it. When a product is kept at several locations, the difference goes to the first location it’s stocked at and the others keep theirs.

Images are JPG, PNG, WebP, GIF, AVIF or HEIC, up to 20 MB. Shopify takes a few seconds to process one, and midcode waits for it before showing the product again.

Orders

Orders come from the store’s checkout: they can’t be created or deleted here.

  • “Mark as shipped…” asks for a tracking number and a carrier (both optional) and whether to “Email the customer”. It ships everything in the order still waiting to ship.

  • “Mark as paid” shows when Shopify says the order can be.

  • “Archive” and “Unarchive”.

  • “Cancel order…” asks first. The items go back to stock and nothing is refunded: “Refunds and more in Shopify” opens the order in the admin.

Descriptions

A product’s or collection’s description and a page’s or post’s content open in a small editor: bold, italic, heading, lists, link. “Edit the HTML” switches to the code and “Edit as text” back.

HTML that comes from the store is made safe before midcode shows it: text, links, images and tables stay, scripts and event handlers don’t. If that would drop something the page needs (an embed, a video, a script, a style block), the editor opens on the HTML instead and says “It has code the editor would drop: edited as HTML”, so a save never removes it without you seeing it.

Discounts

midcode makes and edits one kind of discount: a code that takes a percentage or an amount off the whole order, with its start and end dates (typed as YYYY-MM-DD), “Times it can be used” and “Once per customer”. Any other kind (automatic, buy X get Y, free shipping, limited to some products) is listed and can be turned on or off, and is edited in Shopify’s admin.

Collections, posts and menus

A collection Shopify fills by rules shows its rules. They’re changed in Shopify’s admin, and its products can’t be picked by hand.

A new blog post goes in the store’s first blog. If the store has none, one named “News” is made.

In a menu, a link is an address of the store (/collections/all, /pages/about) or any other (https://…). A link tied to a product, a collection or a page stays tied to it until you click it to type an address instead.

How it talks to Shopify

Each read and each write is one operation on the store’s Admin API (GraphQL), run by your CLI:

Terminal
shopify store execute --store your-store.myshopify.com --version 2026-10 --query-file <file> --variable-file <file> --json
  • The API version is pinned to 2026-10. Every operation midcode sends was checked against that version’s schema.

  • A write adds --allow-mutations. Without it the CLI refuses to change anything.

  • Each operation is a run of the CLI, a few at a time, which is why a list takes a moment to show.

  • midcode holds no token. The session and the store’s approval are the CLI’s, and they’re what a terminal on your Mac would use. See Privacy and security.

Limits

  • Order actions were never tried against a live store. Mark as shipped, mark as paid, cancel and archive are written against the API’s schema, but the store used for testing had no orders. Try them first on an order you can afford to get wrong.

  • What was tried on a development store: every list and every form, and creating, editing and deleting a product (price, SKU, stock, an uploaded image, a duplicate), a collection (adding and removing a product), a customer, a discount (percentage to amount, on and off), a page, a blog post and a menu.

  • Not here, and done in Shopify’s admin: refunds, payments, shipping settings, variants and options, stock per location, a collection’s rules, other kinds of discount, choosing a post’s blog.

  • Overview adds up the latest 250 orders of the last 30 days. A store with more than that shows less than its real total.

  • Store shows only in a theme’s project.

  • Two midcode tabs on the same store share one development theme, because it belongs to the CLI.

Troubleshooting

The “Connect the store” card came back. The approval lasts about a day. Click “Connect” again.

A list shows a message and “Try again”. The message is what Shopify or the CLI answered. “Try again” asks once more. When what’s missing is something midcode can ask for (a sign-in, the store, the approval), its card shows instead.

“The Shopify CLI isn’t installed on this Mac.” Store uses the same CLI as the theme: see Install the Shopify CLI.