Skip to main content

ArtinTech Solution

WooCommerce quick view before and after: seven sizes reduced to the four sizes the product page offers

A WooCommerce quick view should show exactly the same sizes as the product page. On Firefly, a women’s denim store in Bangladesh, it did not. The quick view for the Off White High-Rise Bootcut Jeans offered seven sizes, from 24 to 36. The product page offered four: 24, 26, 28 and 30. A shopper could pick size 34 in the quick view, a size the store did not sell on the product page. We found the cause, fixed it in one shared template and checked every product in the shop. This case study explains what went wrong, how we fixed it without touching a single product, and what the store gained.

The short answer: why did the quick view show more sizes?

The two screens read their sizes from two different places. The product page lists only the sizes that are selected on the product’s Size attribute, and only when a variation exists for them. The custom quick view listed every size that appears in any variation. The product had 28 variations, seven sizes times four lengths, but only four sizes were selected on the product. The variations for 32, 34 and 36 were left over in the database, so the quick view showed them and the product page did not.

Project facts
Store Firefly Shop BD, women’s denim, Bangladesh
Platform WordPress, WooCommerce, Elementor, a custom storefront plugin
Problem Quick view showed sizes the product page did not offer
Cause Quick view read sizes from the variations, not from the product’s attributes
Fix One filter in the shared quick view template, sorted like the product page
Product data changed None
Checked All 12 products in the shop, value by value and in the same order

The problem, as a shopper saw it

Firefly’s shop grid has a Quick view button on every product card. It opens a modal with the photo, the price and size and length buttons, so shoppers can choose without leaving the grid. The store owner noticed that the same jeans looked different in two places.

WooCommerce quick view showing seven sizes, 24 to 36, for Off White High-Rise Bootcut Jeans
Before: the quick view offered seven sizes, 24 to 36.
WooCommerce product page showing four sizes, 24 to 30, for the same jeans
The product page for the same jeans offered four sizes, 24 to 30.

This is more than a cosmetic bug. When two screens disagree, shoppers stop trusting both. Worse, the extra sizes were real, in-stock variations, so a shopper could choose one of them in the quick view. That can lead to an order for a size the store does not plan to sell, followed by a phone call, an apology and a cancelled order. For a store whose customers shop almost entirely on their phones, every lost order hurts.

Finding the cause

We first asked the owner one question: which screen is right? The answer was the product page. Firefly sells this style in sizes 24 to 30, and the variations for 32 to 36 were left over from setting up the product. That decided the direction of the fix: make the quick view follow the product page, not the other way around.

Then we read the code, without changing anything. The product page uses WooCommerce’s own dropdown function, which takes the sizes selected on the product’s attribute and keeps only those that have a variation. Firefly’s storefront plugin turns that dropdown into size buttons with the same rule. The quick view, written separately, called get_variation_attributes(), which collects every value from every variation. Same product, two rules, two answers.

Diagram: product attributes list sizes 24 to 30, variations list 24 to 36, the quick view before showed all variations and after shows only the assigned sizes
Two data sources. The fix makes the quick view use the product page’s rule.

The fix: one template, every product

The quick view for every product comes from one shared template in the storefront plugin. We added four lines to it. Before the size buttons are drawn, the quick view now keeps only the values that are selected on the product, in the same order the product page uses:

if ( taxonomy_exists( $taxonomy ) ) {
    $assigned = wc_get_product_terms( $id, $taxonomy, array( 'fields' => 'slugs' ) );
    $values   = array_values( array_intersect( $assigned, $values ) );
}

The order matters too. The first version kept the order of the variations, so one product showed 40, 42, 24, 26. Putting the product’s own list first in array_intersect() keeps its order, so the quick view now reads 24, 26, 28 exactly like the product page.

Because the fix sits in the shared template, it corrected every product at once, and it will keep working for products the store adds later.

How we kept the live store safe

  • Read first, change later. Every check before the fix only read code and data. Nothing changed until the owner agreed to the exact change.
  • The owner approved every change. Each change that touched the site waited for the store owner’s approval before it ran.
  • A backup before the edit. We copied the original template next to it, so it can be restored in seconds.
  • No product data touched. Products, variations, prices and stock stayed exactly as they were.
  • Cache cleared. We purged the page cache so shoppers saw the fix right away.

Checking every product, and a lesson about our own checks

We did not stop at the one product the owner reported. A small script loaded each of the 12 products in the shop, read the sizes, lengths and colours from the product page and from the quick view, and compared them value by value.

The first run reported a mismatch on 11 of 12 products. Before telling the owner anything was broken, we looked at the pattern: every “missing” value was the first one in its list. That pointed at our script, not the store. It skipped the first option of every list, because it assumed the “Choose an option” placeholder would be captured. After fixing the script, all 12 products matched, first as sets and then, after the ordering fix, in exactly the same order.

The lesson applies to any store fix: test your test. A checker that is wrong in a consistent way looks just like a site that is wrong in a consistent way.

What Firefly gained

  • One set of sizes everywhere. The quick view and the product page now offer the same sizes, in the same order, on all 12 products we checked.
  • No more orders for sizes the store does not sell. Shoppers can only choose sizes the owner has chosen to offer.
  • A fix that scales. New products get the same rule automatically, with no extra work.
  • Nothing to undo. The product data is unchanged, and the template backup makes the fix easy to reverse if ever needed.
  • No new plugin and no monthly fee. Four lines in code the store already owns.

The leftover variations for sizes 32 to 36 are still in the database. They no longer show anywhere, but a tidy catalogue is easier to manage, so cleaning them up is a sensible next step for the store.

Key takeaways

  • When a quick view and a product page disagree, they usually read their options from different sources.
  • Ask which screen is right before fixing anything. The answer decides which side changes.
  • Fix the shared template, not the products, and every product is corrected at once.
  • Match the order as well as the values, or the screens still look different.
  • Check every product, and check your checker.

More about this store: the Firefly Denim Store project. Related: overriding a WooCommerce template without forking the theme. For a step-by-step version you can follow on your own store, read how to fix wrong sizes in a WooCommerce quick view on Charming Theme.

Want your WooCommerce store checked and fixed?

We fix WooCommerce quick views, variation pickers, cart drawers and other storefront features in the code you already have. We read before we change, back up before we edit, and nothing goes live without your approval.

Frequently asked questions

Why does my WooCommerce quick view show sizes that the product page does not?

Usually because the quick view reads every value from the product’s variations, while the product page shows only the values selected on the product’s attribute. Leftover variations then appear in the quick view only.

Should I delete the extra variations or fix the quick view?

Do both, in that order of safety: first make the quick view follow the same rule as the product page, so it can never drift again, then clean up variations you no longer sell.

Will fixing the quick view change my products or stock?

No. The fix only changes which values the quick view displays. Products, variations, prices and stock stay as they are.

Do I have to fix every product separately?

No. A custom quick view is normally one shared template, so one fix corrects every product, including products added later.

Why were the sizes in the wrong order?

The quick view kept the order of the variations, while the product page uses the order of the attribute terms. Filtering the product’s own term list keeps the product page’s order.

How long does a fix like this take?

Finding the cause, fixing it and checking every product took less than a day for this store. Larger catalogues take longer to check, not to fix.

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *