Linux 软件免费装
Banner图

Food Products for WooCommerce

开发者 macvej
更新时间 2026年9月4日 00:31
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce food nutrition expiry date batch tracking

下载

1.1.0 1.1.1

详情介绍:

Food Products for WooCommerce turns your WooCommerce shop into a food shop. It adds two new product types - Food Simple Product and Food Variable Product - that work exactly like WooCommerce's own Simple and Variable products, with everything a food or grocery shop needs on top: a nutrition declaration table, expiry dates, batch and supplier tracking, and automatic handling of stock that is about to go off. Nothing is replaced or overridden: your existing products, themes and payment gateways carry on untouched. You choose the new product type only on the products that need it. Nutrition declaration table Every food product gets a Nutrition tab: a label/amount/unit table declared per 100 g or per 100 ml (pre-filled with the EU-mandatory energy / fat / carbohydrate / protein / salt rows, all editable) that is shown to shoppers as its own tab on the product page. Rows can be reordered, renamed, indented as sub-nutrients, added and removed. Food Variable Products can share one table across every variation, or let a single variation override it with its own. Ingredient list An Ingredients tab holding the ingredients in declaration order, each with an optional percentage, sub-ingredients and one of the 14 EU-declarable allergens. The product page prints the list as one sentence with allergens in bold, plus a "may contain" line. Per-variation overrides work the same way as for nutrition. Expiry dates and batch tracking The Expiry & Tracking tab stores one row per batch, each with an expiry date, quantity, batch number, batch date and supplier - so you always know which delivery a unit of stock came from and when it goes off. Food Variable Products track batches per variation, matching how WooCommerce already tracks stock. Every sale takes a unit off the batch closest to its date, and a refund puts it back, so the table reads as what is still on the shelf. Optionally, the closest upcoming expiry date is shown to shoppers on the product page - always, or only once it falls within a number of days you choose. Expiry Dashboard and write-off An admin screen listing every batch row across every food product in one place, sorted by closest expiry date first, colour-coded by urgency, filterable by date range and exportable as a CSV file for your stock takes and audits. A batch that has expired can be written off from there or from the product itself, taking what is left of it out of the sellable stock - or you can have that happen automatically every night at an hour you choose. The batch table is the stock Once a product tracks batches, its batch table is its stock. WooCommerce's own stock management is switched off for it and stays off; the product is in stock while a batch in date has units left, "N in stock" on the product page is the batch total, and a shopper cannot buy more than the batches hold. Every sale comes off a batch - a full-price sale off the freshest batch first, so the batch nearest its date is kept for the reduced offer - and a refund puts the units back. Stock past its best-before date is not sold at all unless you say so (see below). Automatic Markdown Offer a discount on the batch closest to its date, on a ladder of steps you set (for example 15% a week out, 30% three days out, 50% on the last day). The product's own price is never changed: the shopper opts into the reduced batch on the product page, the discount applies to that cart line only, and the offer withdraws itself once the batch is sold out or expired. A cap on units per batch, a price floor, a catalogue badge and a choice of whether a product with nothing left to sell stays listed or is hidden are all yours to set, and any product can opt out. Where the law allows it, you can also choose to keep selling batches past their best-before date: that adds a fixed last step to the ladder with its own discount and wording, and those units count as sellable stock. A Markdown Earnings screen reports what each marked-down batch sold, what it brought in, what the discount cost, and how much expired unsold anyway. Email when expired A scheduled digest email listing every batch that has reached its expiry date - or is about to, within a window you choose - sent to the shop users you pick, daily, weekly, every 2 weeks or every 3 weeks. Each batch is only ever mailed once, every send is recorded in an Email Log, and a "Send Notification Email Now" button lets you run it on demand. Individual products can opt out. Automatic category switching Have WooCommerce move stock for you: categories you choose (for example "Clearance" or "Last chance") are added to a product as it nears its closest expiry date, and categories are removed Built for real shops Requirements WooCommerce must be installed and active. The plugin will not activate without it, and deactivates itself with an explanatory notice if WooCommerce is later disabled.

安装:

  1. Install and activate WooCommerce, if it isn't already. This plugin adds product types to WooCommerce and will refuse to activate without it.
  2. Install this plugin. Either upload the plugin's zip file under Plugins > Add New > Upload Plugin, or upload the extracted folder to /wp-content/plugins/ over FTP/SFTP, then activate it.
  3. Create a product the normal WooCommerce way (Products > Add New), and choose Food Simple Product or Food Variable Product from the Product data type dropdown.
  4. Open Food Products > Settings in the wp-admin menu to configure the date format, expiry email notifications, the Expiry Dashboard and automatic category switching.

屏幕截图:

  • The Nutrition tab in the product editor: the label/amount/unit table declared per 100 g or
  • The Ingredients tab: ingredients in declaration order, each with an optional percentage,
  • The Expiry & Tracking tab: the batch table with expiry date, quantity, batch number and
  • The Automatic Markdown settings, where you set the discount steps that reduce a batch as its
  • The Markdown Earnings dashboard, showing what marked-down stock sold for against what it
  • The Expiry Dashboard: every batch row from every food product in one list, closest expiry

升级注意事项:

1.1.1 Every short-dated batch is now offered, not only the closest one; sortable Expiry Dashboard; theme-neutral product page styling. Nothing you have set up changes. 1.1.0 Automatic Markdown, ingredient lists, expired-batch write-off and two new reporting screens, plus a new Products settings tab. Everything already saved on your products is kept. 1.0.2 Plugin display name now matches the assigned slug. Nothing you have set up changes. 1.0.15 New plugin slug and text domain from the plugin review. Nothing you have set up changes. 1.0.1 Naming, escaping and reliability fixes from the plugin review. No settings change. 1.0.0 Initial release.

常见问题:

Does this require WooCommerce?

Yes. The plugin adds WooCommerce product types and will not activate without it.

Does it work with my existing products?

Yes. Existing Simple and Variable products are left exactly as they are. The food features appear only on products you switch to Food Simple Product or Food Variable Product, and you can switch a product back at any time.

Can I track expiry dates per variation?

Yes. Food Variable Products keep their own batch table per variation, since expiry dates and quantities are physical stock facts and WooCommerce already tracks stock per variation. Nutrients work the other way round: one shared table for the whole product, which any single variation can override.

What is the Expiry Dashboard?

An admin screen listing every batch row from every food product's Expiry & Tracking table in one place, sorted by closest expiry date first, filterable by date range and exportable as CSV. It can be turned off on the Settings page.

Can I get emailed when a product expires?

Yes. Turn on "Email when expired" on the Notification Email tab and choose recipients and a frequency (daily, weekly, every 2 weeks or every 3 weeks). Each expiring batch row is emailed once and logged. Set an "upcoming expiry window" to be warned a few days ahead instead of only after the fact.

Does the plugin call any external service?

No. It makes no remote requests, requires no account or API key, and collects no analytics or telemetry.

Does Automatic Markdown work with the block-based product page?

The reduced-batch choice is a field in WooCommerce's classic add-to-cart form, so it appears on the classic single product template and in the Add to Cart form block that renders that form. The Cart, Mini Cart and Checkout blocks all show the batch and offer a reduced line was bought under.

Will automatic category switching mess up my categories?

No. It records exactly what it added or removed on each product and reverses only that. Any category you assigned by hand is left alone, and individual products can opt out of category switching entirely on their Expiry & Tracking tab.

What happens to my data if I delete the plugin?

Deleting the plugin removes only its own settings (fpwc_generel_settings_options), the email log and the category switching log. Nutrition, ingredient and Expiry & Tracking data saved on your products, and the batch a marked-down order line was bought from, are left untouched, so reinstalling picks up exactly where you left off.

更新日志:

1.1.1 1.1.0 1.0.2 1.0.15 1.0.1 1.0.0