Skip to content

Cannabis Store ​

A cannabis store on the store: formats, strains and brands, THC and CBD, terpenes, the minimum age, the 30 g limit an order may hold, the licence number.

kitloom/cannabis-store · admins: kitloom/cannabis-store-filament

A cannabis store on kitloom/store: what a cannabis product is beyond a product (its format, plant type, brand, THC and CBD, terpenes, net content), the minimum age cannabis starts with — the store asks it at its gate, at the checkout and at the door —, the limit one order may hold, counted in grams of dried cannabis, and the licence's number and a notice on every page. The defaults are Manitoba's; every one of them is a setting. The admin is kitloom/cannabis-store-filament; the theme made for it is kitloom/thicket-theme.

The module keeps the store's books in order; it is not legal advice. What your licence asks of a website — its words, its warnings, who may deliver — is your regulator's to say (in Manitoba, the LGCA).

What a cannabis product is ​

A cannabis product is a product of the store, with more on its form, under Details:

FieldWhere it goes
Format — flower, pre-roll, vape, extract, edible, beverage, topical, seedsthe rows under the description on the product page; how the order limit counts the product
THC, CBDthe rows, with the unit of the format: percent for flower, pre-rolls, vapes and extracts ("22 %"), milligrams per unit for edibles, beverages and topicals ("10 mg"). THC and CBD are in says otherwise for one product — an oil labelled in milligrams
Terpenesthe dominant ones, separated by commas; a row
Net contentwhat one unit holds — grams, millilitres for a beverage, the count for seeds; a row, and what the limit counts when the product is not sold by the size
Plant type (Indica, Sativa, Hybrid, CBD) and Brandtaxonomies of the product type, with pages of their own: /store/strain/indica/, /store/brand/larkspur-row/
Sizenot a field: a product sold by the size is a variable product with the option Size and a variant per size — "1 g", "3.5 g", "7 g", "3 x 0.5 g", "355 ml" — each with its price and stock

A product with a format is cannabis. One without — a grinder, papers, a battery — is an accessory: it has none of these rows and weighs nothing against the limit.

Age ​

A product with a format starts at the Minimum age of the settings (19 in Manitoba and most provinces, 18 in Alberta, 21 in Quebec) unless its form says otherwise. An accessory has the age you give it on its own form, or none.

The age itself is the store's to ask (kitloom/store, A shelf with a minimum age): the gate before the site with the highest age on the shelf, the date of birth at the checkout with the highest in the cart, the ID, signature or photo at the door — all under Store → Settings → Age. Cannabis at 19 beside an accessory at 18 asks 19.

The order limit ​

Order limit: how many grams of dried cannabis, or what equals them, one order may hold. The default is 30 — what a person may carry in public in Canada; 0 switches the limit off. A cart over it is refused when the customer places the order, with both numbers in the message: "An order may hold up to 30 g of dried cannabis or its equivalent; this cart holds 31 g."

Each format counts as Schedule 3 of the Cannabis Act has it:

FormatEquals 1 g of dried cannabis
Flower, pre-roll1 g
Edible15 g
Beverage570 g (a millilitre is taken as a gram)
Topical70 g
Vape, extract0.25 g
Seeds1 seed

So a 355 ml can is 0.62 g, a one-gram cartridge 4 g, a pack of three half-gram pre-rolls 1.5 g. How much a unit holds is read from the variant's Size — a number with g or ml, with a count before it for a pack ("3 x 0.5 g"); for seeds "10 seeds", "5 pack" or the number alone — and, where the Size says nothing the limit can read, from the product's Net content. Milligrams are not read as a size: on a label they say the THC, not the weight.

A product with neither counts as nothing. The limit cannot guess, so give every cannabis product a Size it can read or a net content. A simple product's page shows what one unit comes to ("Equals 3.5 g of dried cannabis") — a product without that row is one the limit does not see.

The limit is per order. It does not add up a customer's orders over a day.

Licence and notice ​

Retail licence number is shown on the site by the theme; put it on the receipt too (Store → Settings → Receipt header, a line of its own). Footer notice is a line in the footer of every page — the warning or the words your regulator asks for. It is empty until you write it: the module puts no words in your mouth.

Delivery ​

Cannabis goes out with the store's own staff or over the counter, not with a carrier: in Store → Delivery zones give the zone you serve the methods Local delivery (the store's own driver, a fee, a minimum order) and Pickup. The delivery on the order is the record: its window, its statuses with their times, and what had to be checked at the door (the ID for the age, a signature, a photo — as the store's settings say).

Two things are not built yet, and you keep them yourself for now: a field on a delivery for who carried it, and the hours your licence allows deliveries in — a window outside them is not refused.

Payments ​

Card processors often refuse cannabis, and an account opened for another trade may be closed over it. Until your payment provider has confirmed in writing that it takes cannabis, sell with an offline method of kitloom/payments — cash on delivery, a bank transfer — and mark the order paid when the money is in.

Demo ​

bash
php artisan cannabis-store:demo   # the store in Manitoba with GST and PST and a zone (own driver, pickup); four plant types, six brands, the categories by format, 27 cannabis products and 4 accessories; the age, the limit, a licence number; three orders

It is a shelf of its own — the store's generic demo is not put under it — and it is refused when the site already has plant types. The names are invented, the words say what is in the package and nothing of what it does, and there are no people in it: a demo is public.

For developers ​

  • The fields reach the store through its ProductExtension (Products\CannabisFields): the writer checks them, the admin draws them, the sheet exports them, the storeProduct part carries the rows and the taxonomies. The names are in CannabisStore (FIELD_*, FORMAT_*, TAX_STRAIN, TAX_BRAND, OPTION_SIZE).
  • The limit is a CheckoutStep (Checkout\LimitStep) that asks no field and refuses with the store's CartException — a 422 with the message for a script, the store's notice for a form. The count is Limits\Equivalence (of($product, $variant), ofLine(), ofCart(), parse()), the setting Limits\OrderLimit.
  • Every page has the cannabisStore part (Site\CannabisNotes): minAge, limit, licence, notice, and cartEquivalent with overLimit for the visitor's cart as the page was drawn — a page read again after the cart changed has the new number.
  • Settings: CannabisStoreOptions, behind manage_cannabis_store.
  • The demo is Demo\DemoCannabis (hasShelf(), seed()), for a theme's demo to call.

Tests ​

From the application that installs the package: php vendor/bin/phpunit --testsuite CannabisStore.

kitloom — sites on Laravel, built for you and run with AI.
Contact · Services · License · Refunds · Privacy · Community · YouTube · [email protected]