Process Automation

Turning one messy pricing spreadsheet into a correct storefront

160 products, two different pricing conventions mixed in the same sheet, and a storefront that had never had real prices. The fix had to be a repeatable pipeline, not a one-off manual pass.

Context

A traditional-foods retailer had a WooCommerce storefront with no working prices — the catalog existed, but the actual product data lived in a client-maintained Excel sheet that mixed two different pricing conventions across the same set of products.

The challenge

Some products priced per kilogram with whole-kilogram pack tiers (1 / 5 / 30 kg); others priced as a flat total for small gram-based packs (100 / 250 / 500 g) — same spreadsheet, same column headers, two different meanings. Loading it naively would have priced a 30 kg sack the same as a 30 g sachet.

What we did

The concrete engineering decisions that made this work.

Classify before loading

Every row was classified by how many price tiers it carried: one tier stayed a simple product, two or more became a variable product with a weight attribute per tier.

Two pricing rules, not one

Whole-kilogram-tier products were recalculated as kg × rate; gram-pack products kept their sheet price as-is and only had a derived per-kg rate added for comparison shopping.

279 variations generated

The pipeline produced 96 variable products with 279 total variations and 62 simple products from the same 160-row sheet — with a full database backup taken before any write.

Per-kg price shown on the storefront

A small custom plugin surfaces the derived "₹ per KG" figure on the product page as the shopper switches pack size, using WooCommerce's own variation-change events.

Outcome

A fully priced, correctly structured catalog live from a single spreadsheet import — cart totals and shipping weight verified end-to-end (a 30 kg order correctly totals ₹3,300 and carries 30 kg of shipping weight).

WordPressWooCommercePHP
Get started

Start a strategic discussion

Book a free architectural consultation. We reply within 24 hours.