Building a Grocery Store With Gromark: What Hel

Comments · 3 Views

A local grocery delivery business wanted an online store — weight-based produce pricing, re

Gromark for WooCommerce: Answering a Grocery Client's Three Real Worries


The Setup

A local grocery delivery business wanted an online store — weight-based produce pricing, repeat customers reordering weekly, and a checkout that wouldn't choke during a weekend rush. Before picking a theme, I sat down with the client and three questions came up more than once. I used those three questions to test Gromark - Grocery Store & Food WooCommerce Theme before committing to it.

Question 1: "Can it handle pricing by weight, not just by item?"

Grocery stores aren't like clothing stores where a size swatch is simple. A lot of produce sells by weight — 500g, 1kg, 2kg — with different prices per option, not just different variations of the same price.

Gromark's product variation swatches work fine for this out of the box using WooCommerce's native variable products. What it didn't handle automatically was showing the price-per-unit next to each swatch, which matters for grocery shoppers comparing options. Added a small snippet to show that inline:

add_filter( 'woocommerce_variation_option_name', function( $term_name, $term = null ) {    if ( $term && get_term_meta( $term->term_id, 'price_per_unit', true ) ) {        $unit_price = get_term_meta( $term->term_id, 'price_per_unit', true );        $term_name .= ' (' . esc_html( $unit_price ) . '/unit)';    }    return $term_name;}, 10, 2 );

Not a theme limitation exactly — this is a WooCommerce-level customization any grocery store needs regardless of theme — but worth knowing going in so it doesn't surprise you mid-build.

Question 2: "Will regular customers be able to reorder fast?"

Grocery shopping is repetitive. Same household buys milk, eggs, and bread every week. The client specifically wanted returning customers to reorder without hunting through categories again.

Gromark ships with wishlist and compare functionality built in, which covers part of this. For actual one-click reordering from order history, that's a WooCommerce order-management layer, not a theme feature, so I added a simple "Reorder" button on the My Account > Orders screen using WooCommerce's order actions hook:

add_action( 'woocommerce_my_account_my_orders_actions', function( $actions, $order ) {    $actions['reorder'] = [        'url'  => wp_nonce_url( add_query_arg( 'reorder', $order->get_id() ), 'woocommerce-reorder' ),        'name' => 'Reorder',    ];    return $actions;}, 10, 2 );

Combined with the theme's existing wishlist feature, returning customers had two fast paths back to their usual cart instead of one.

Question 3: "Will it slow down during a weekend sale?"

This was the one that actually caused a real hiccup during testing, not just a feature gap.

Gromark uses AJAX for cart updates and quick product previews, which is great for user experience — no full page reloads when adding to cart. But when I layered a full-page caching plugin on top for speed, cart counts started showing stale numbers to different visitors. Classic WooCommerce-plus-caching conflict: the page cache was serving the same cached fragment to everyone, cart icon included.

Fixed it by excluding cart-related AJAX endpoints from the page cache instead of turning caching off site-wide:

add_action( 'init', function() {    if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_GET['wc-ajax'] ) ) {        if ( ! defined( 'DONOTCACHEPAGE' ) ) {            define( 'DONOTCACHEPAGE', true );        }    }});

Ran a load test afterward simulating concurrent cart additions with a simple script hitting the wc-ajax=add_to_cart endpoint repeatedly, and cart counts stayed accurate per session. 

Pros & Cons

Good:

  • AJAX-driven shop and cart genuinely feel fast, not just "fast on paper"
  • Wishlist and compare built in, which most grocery-specific themes skip
  • Elementor compatibility made custom landing pages for weekly promos painless

Not perfect:

  • No native price-per-unit display for variable/weight-based products — plan to add it
  • AJAX cart plus page caching needs a deliberate exclusion rule, or you'll show stale cart data to shoppers

What I'd Tell the Next Dev

None of the three issues above are dealbreakers. They're the kind of thing every WooCommerce grocery build runs into regardless of theme, and Gromark's base features — AJAX shop, swatches, wishlist — cover more of the groundwork than most themes in this category. Just don't assume caching and AJAX cooperate by default; test that specifically before launch, not after a sale weekend exposes it.

If you want to try it: Gromark - Grocery Store & Food WooCommerce Theme.

 

Comments