Description
Store Admin
› Set global sale type and price type defaults
› Define default amount per pack store-wide
› Control which tabs appear in storefront (pieces / packs / all)
› Configure cart quantity display mode
› Enable stock check by individual units
› Toggle pack amount display in measurement units
› Control pack postfix visibility per view type
› Define default amount per pack store-wide
› Control which tabs appear in storefront (pieces / packs / all)
› Configure cart quantity display mode
› Enable stock check by individual units
› Toggle pack amount display in measurement units
› Control pack postfix visibility per view type
Vendor / Seller
› Override global settings per product
› Set pack type: Pack, Carton, or Pallet
› Define items per pack and min/max pack qty
› Choose per-piece or per-pack pricing mode
› Fill complete B2B info tab (MOQ, Incoterms, HS code)
› Export/import all packaging fields via CSV
› Bulk update sale_type across products via Global Update
› Set pack type: Pack, Carton, or Pallet
› Define items per pack and min/max pack qty
› Choose per-piece or per-pack pricing mode
› Fill complete B2B info tab (MOQ, Incoterms, HS code)
› Export/import all packaging fields via CSV
› Bulk update sale_type across products via Global Update
Buyer / Customer
› Switch between pieces and pack tabs on product page
› See price per piece or price per pack clearly
› Quantity steps enforce pack-size increments
› View full B2B info: MOQ, lead time, Incoterms, HS code
› See country of origin and sample availability
› Cart shows precise units ordered (pieces tracking)
› Order details and invoices display pack quantities
› See price per piece or price per pack clearly
› Quantity steps enforce pack-size increments
› View full B2B info: MOQ, lead time, Incoterms, HS code
› See country of origin and sample availability
› Cart shows precise units ordered (pieces tracking)
› Order details and invoices display pack quantities
Pack-Based Selling Engine
Three pack types · Flexible pricing logic · Dual pieces/packs display · Quantity enforcement
Three Pack Types
Per-product pack type label shown in the storefront and order documents: Pack, Carton, or Pallet. Label is translatable via the CS-Cart language system.
Dual Price Type
Enter the product price either as per-piece or per-pack. The addon auto-converts: if selling in packs with piece-based pricing, the displayed pack price = stored price × items per pack.
Items Per Pack
Define how many individual units are in each pack (e.g. 12 pieces/carton). Supports decimal values (float) for weight-based products. Global default overridable per-product.
Storefront Display Modes
Control which tabs customers see: Pieces only, Packs only, or Both. Choose the default tab. First show: pieces or packs first.
Min / Max Pack Quantities
Set minimum and maximum order quantities in packs (decimal(12,3)). These auto-sync to CS-Cart's native min_qty and max_qty columns: min_qty = min_pack_qty × items_per_pack.
Quantity Step Control
Two modes: product_step (use the native CS-Cart qty_step) or product_amount_in_pack (quantity input increments by the full pack size). Prevents ordering partial packs.
Round Pack Amount
Automatically round the displayed pack quantity in the storefront (Y/N). Global or per-product override. Prevents fractional pack display when customers choose an amount not divisible by pack size.
Cart Display Mode
Three cart display options: number_positions (show counts per cart position), number_units (show unit count), or not_display (hide pack info). Controls what quantity label appears next to cart items.
Measurement Unit Display: When enabled, the storefront quantities are shown in the product's measurement unit (e.g. "24 kg" instead of "2 packs"). Integrates with the optional
ms_fractional_stock companion addon for full fractional quantity support.
B2B Trade Fields
8 dedicated product columns — turn every product page into a full trade specification sheet
Country of Origin
ISO 2-letter country code stored and expanded to the full country name on display (resolved via CS-Cart
country_descriptions). Appears in the B2B info tab on the product page.
MOQ (Minimum Order Qty)
Enforced automatically: setting MOQ higher than current min_qty raises CS-Cart's native min_qty (and ms_min_qty if fractional stock is active) so the cart refuses undersized orders.
Supply Capacity
Free-text field for production output (e.g. "10,000 units/month"). Displayed in the B2B tab so buyers can assess availability before bulk negotiations.
Lead Time
Free-text lead time description (e.g. "2–4 weeks after deposit"). Stored up to 100 characters. Shown prominently on the product page to set buyer expectations.
Incoterms
Select from the standard Incoterms 2020 list: EXW, FOB, CIF, CFR, DDP. Validated against a whitelist on save. Full label stored for display.
HS Code (Harmonized System)
6–10 digit international tariff classification code (HTSUS/HS). Up to 20 characters. Enables customs brokers and trade compliance engines to auto-classify shipments. Exportable via EXIM.
Sample Availability
Yes / No toggle indicating vendor can supply product samples. Displayed as a badge in the B2B info tab. Buyers filter for sample-ready products when evaluating suppliers.
Customization Support
Yes / No flag indicating whether the vendor accepts OEM/ODM customization requests (branding, packaging, sizing). Shown alongside sample availability as buyer decision signals.
Configuration
Three Settings Sections
Every setting has a sensible default and can be overridden at the product level. Admin sets the store-wide baseline; vendors tune individual products.
sale_type — pieces | packs (default: pieces)
price_type — pieces | packs (default: pieces)
amount_pack — items per pack (default: 1)
show_sale_types — pieces | packs | all
first_show_sale_type — pieces | packs
product_amount_changing_type — step | pack
display_in_product_measurement_units — Y/N
round_product_amount_in_storefront — Y/N
display_mode — positions | units | off
check_product_amount_by_units — Y/N
price_type — pieces | packs (default: pieces)
amount_pack — items per pack (default: 1)
show_sale_types — pieces | packs | all
first_show_sale_type — pieces | packs
product_amount_changing_type — step | pack
display_in_product_measurement_units — Y/N
round_product_amount_in_storefront — Y/N
display_mode — positions | units | off
check_product_amount_by_units — Y/N
Controls which storefront views show the pack postfix/label:
show_postfix_on_vendor_products — vendor listings
categories_view — category pages
products_on_sale — sale blocks
products_newest — new arrivals block
products_bestsellers — bestsellers block
companies_products — company page
product_features_view — features panel
wishlist_view — wishlists
products_search — search results
block_products — product blocks
show_postfix_on_vendor_products — vendor listings
categories_view — category pages
products_on_sale — sale blocks
products_newest — new arrivals block
products_bestsellers — bestsellers block
companies_products — company page
product_features_view — features panel
wishlist_view — wishlists
products_search — search results
block_products — product blocks
A third settings_info tab renders a custom Smarty template (
info.tpl) directly inside the addon settings page. Use it to display documentation, usage tips, or an interactive configuration guide — all in context where admins are configuring the addon.
20 Columns Added to
cscart_productsAll added via
ADD COLUMN IF NOT EXISTS — zero risk of duplicate-column errors on re-install or upgrade| Column | Type | Default | Purpose |
|---|---|---|---|
ms_packaging_use_global_settings | char(1) | 'Y' | Inherit store-wide settings or override per-product |
sale_type | varchar(10) | 'pieces' | How the product is sold — pieces or packs |
show_sale_types | varchar(10) | 'pieces' | Which tabs to show: pieces | packs | all |
product_amount_changing_type | varchar(30) | 'product_step' | Quantity step mode: by step or by full pack size |
ms_packaging_price_type | varchar(30) | 'pieces' | Whether the entered price is per-piece or per-pack |
round_pack_amount | char(1) | 'N' | Auto-round displayed pack qty in storefront |
default_product_amount | float | 0 | Default quantity pre-filled in the cart input |
ms_amount_pack | float | 1 | Items per pack (supports decimals) |
ms_first_show_sale_type | varchar(10) | 'pieces' | Which tab appears first when mode = all |
ms_pack_type | varchar(20) | 'pack' | Label type: pack / carton / pallet |
min_pack_qty | decimal(12,3) | 0.000 | Minimum packs per order — synced to min_qty |
max_pack_qty | decimal(12,3) | 0.000 | Maximum packs per order — synced to max_qty |
ms_country_origin | varchar(2) | '' | B2B: ISO 2-letter country of origin |
ms_moq | int(11) | 1 | B2B: Minimum Order Quantity (enforces min_qty) |
ms_supply_capacity | varchar(255) | '' | B2B: Production output (e.g. "5000 units/month") |
ms_lead_time | varchar(100) | '' | B2B: Delivery lead time (e.g. "3–5 weeks") |
ms_incoterms | varchar(10) | '' | B2B: Trade term — EXW / FOB / CIF / CFR / DDP |
ms_sample_availability | char(1) | 'N' | B2B: Samples available (Y/N) |
ms_customization | char(1) | 'N' | B2B: OEM/ODM customization accepted (Y/N) |
ms_hs_code | varchar(20) | '' | B2B: Harmonized System tariff code (HS/HTS) |
Rows highlighted in amber are B2B-specific fields. Rows in white are packaging mechanism fields.
Checkout
Cart, Checkout & Order Integration
Packaging data flows from the product page into the cart, order details, shipping calculation, and printed order documents.
Cart Pieces Tracking
When selling in packs, the exact pieces count is tracked in an auxiliary session variable (
ms_packaging_pieces_amount) alongside the pack count. This powers subtotal recalculation, stock validation, and order documents simultaneously.
Subtotal Recalculation
During
calculate_cart, the addon recalculates subtotals using price_by_piece × pieces_amount for precise billing. RFQ products (wk_rfquotation) are skipped entirely — their negotiated price is never overridden.
Stock Check by Units
Optional setting: validate stock in pieces rather than packs. Calculates how many complete packs fit within available stock and adjusts the allowed quantity accordingly, preventing overselling.
Order Details Row
Packaging data is serialized into
order_details.extra: sale_type, ms_amount_pack, show_sale_types, price_type, pieces_amount, price_by_piece, and ms_packaging_show_amount. All visible in admin order views and order history.
Order Document Variables
MsPackagingVariables injects packaging settings into CS-Cart's order document template engine. Invoices and packing slips can display pack sizes, price type, and unit amounts alongside the standard order data.
Inventory Delta
After purchase,
update_product_amount_pre hook adjusts the inventory delta to match actual pieces consumed. When display mode = all and pieces amount is known from session, it uses that exact count for stock reduction.
EXIM — Bulk Import / Export
All packaging and B2B fields are available in CS-Cart's standard product CSV export/import
Product Sale Typepieces or packs per product
Show Sale Typespieces | packs | all
B2B Country of OriginISO 2-letter code
B2B MOQminimum order quantity
B2B Supply Capacityproduction output text
B2B Lead Timeproduction + shipping time
B2B IncotermsEXW / FOB / CIF / CFR / DDP
B2B Sample AvailabilityY / N flag
B2B CustomizationOEM/ODM Y / N flag
B2B HS CodeHarmonized System code
Import uses both
process_get and convert_put callbacks registered in products.post.php EXIM schema. B2B fields pass through the same validation pipeline as the admin UI (incoterm whitelist check, MOQ → min_qty sync, country code truncation).
Bulk Operations & Addon Integrations
Apply packaging changes across multiple products at once, and maintain compatibility with RFQ and Fractional Stock addons.
Global Product Update
Extends CS-Cart's mass-update product tool. Admin can select sale_type (pieces/packs) and apply it to hundreds of products in one form submission via a single
UPDATE ... WHERE product_id IN (?n) query.
wk_rfquotation Guard
A dedicated
fn_ms_packaging_is_rfq_product() check protects three hooks: add_to_cart price, cart_product_data, and normalize_amount. RFQ-approved quotes (stored_price=Y, rfq_quantity_locked, or extra.wk_rfq) are never touched.
ms_fractional_stock Bridge
When the companion
ms_fractional_stock addon is active (but does not conflict — conflict is registered), the product info function switches to the fractional path: allow_fractional_amount, ms_unit_measure, ms_step_qty, ms_min_qty, and ms_max_qty are all resolved via the fractional addon's own helper functions.
Static Request Cache
fn_ms_packaging_get_product_base_data() caches all packaging columns per product in a static PHP array for the duration of the request. Eliminates the N+1 query problem. Cache is invalidated by fn_ms_packaging_clear_product_cache() after any UPDATE.
Product Tabs (Backend)
Two dedicated product edit tabs injected via Smarty hooks:
ms_fractions_stock_and_packaging_tab.tpl (pack configuration) and ms_b2b_fields_tab.tpl (B2B info fields). Both tabs appear for admin and vendor product editing.
Order Items Row Override
Admin order detail page: the order product row is overridden (
items_list_row.override.tpl) to display the pack-quantity summary (pieces vs packs), price per piece, and the sale type label instead of the raw CS-Cart amount field.
Compatibility & Technical Specifications
Version
1.2.0
CS-Cart Editions
Multi-Vendor & Ultimate
Edition Types
ROOT · VENDOR · STOREFRONT
Addon ID
ms_packaging
DB Columns
+20 on products
Developer
Zclues Software
Pack / Carton / Pallet
Per-Piece & Per-Pack Pricing
Pieces / Packs / All Tabs
Min/Max Pack Qty
MOQ Enforcement
Incoterms 2020
HS / HTS Code
Country of Origin
Supply Capacity
Lead Time
Sample Availability
OEM/ODM Customization
EXIM CSV Import/Export
Global Product Update
Order Document Variables
Stock Check by Units
RFQ Guard (wk_rfquotation)
Fractional Stock Bridge
Request-level DB Cache
Measurement Unit Display
Supplement Facts
Amount Per Serving
%Daily Value
| Compatible | Youpitheme | — |
* Daily Value not established.
Features
Compatible
- Unitheme
- Youpitheme
Comptabile versions
- 4.18.x ,
- 4.17.x ,
- 4.16.x ,
- 4.15.x
Cs-cart Core
- Store Builder
- Multi-vendor
Improvement For
- Admin
- Vendor
- Customer
Reviews
No reviews found
Please sign in so that we can notify you about a reply