Product Type
First-Pass Node Dossier
This page is an evidence-backed node dossier generated from the domain hierarchy and node questionnaire.
What It Is
ProductType is a first-class catalog taxonomy in Pyle. It groups products, carries translated labels and slugs, participates in search, and feeds downstream behavior such as promotions, shipping eligibility, product groups, and minimum-quantity rules.
Parent hierarchy:
Catalog & MerchandisingProductsProduct Type
Primary implementation paths:
packages/framework/src/Models/ProductType.phppackages/framework/src/Actions/ProductTypepackages/framework/src/Http/Controllers/Api/Admin/ProductTypesController.phppackages/admin/src/Livewire/Admin/Settings/Types
What Users Can Do With It
Direct capabilities
Admin users can:
- create a product type in Settings > Types
- edit a product type
- delete a product type if it has no associated products
- list and search product types through the admin API
Indirect capabilities
Other workflows use ProductType without making it the primary object being edited:
- assign a product type to a product
- use product types in promotion conditions
- use product types in shipping-service eligibility rules
- use product types to drive product-group behavior
- manage product type to product category relationships through Excel import/export
Where It Is Managed
| Channel | Role | Notes |
|---|---|---|
| Admin Settings UI | Direct | Create and edit dialogs live under packages/admin/src/Livewire/Admin/Settings/Types |
| Admin API | Direct | ProductTypesController exposes index, store, show, update, destroy |
| Product admin flows | Indirect | Product create/edit screens select a product type |
| Storefront | Indirect | Exposed nested inside product and order-item resources |
| Excel import/export | Direct | product_types and product_type_product_category sheets are present |
| ERP bridge | Direct | Product types can be synced from ERP |
Sources:
packages/admin/src/Livewire/Admin/Settings/Types/DataTable/CreateDialog.phppackages/admin/src/Livewire/Admin/Settings/Types/DataTable/EditDialog.phppackages/framework/src/Http/Controllers/Api/Admin/ProductTypesController.phppackages/framework/src/Http/Resources/Storefront/ProductResource.phppackages/framework/src/Http/Resources/Storefront/OrderItemResource.phppackages/framework/src/Actions/Import/Product/Sheets/ImportProductTypeRows.phppackages/framework/src/Actions/Import/Product/Sheets/ImportProductTypeProductCategoryRows.phppackages/framework/src/Services/ErpBridge/ProductType/ProductTypeErpSyncService.php
Channel-Level Field Coverage
Admin create dialog
The create dialog only exposes:
namedescription
Source:
packages/admin/src/Livewire/Admin/Settings/Types/DataTable/CreateDialog.php
Admin edit dialog
The edit dialog exposes:
namedescriptionslugsearch_weight
Source:
packages/admin/src/Livewire/Admin/Settings/Types/DataTable/EditDialog.php
Admin API
The admin API allows the ProductType resource itself to be listed, created, read, updated, and deleted. The controller's list endpoint only allows these fields in query shaping:
idnamedescriptionslug
The API resource serializer returns the model payload directly through parent::toArray($request).
Source:
packages/framework/src/Http/Controllers/Api/Admin/ProductTypesController.phppackages/framework/src/Http/Resources/Admin/ProductTypeResource.php
Model fields that exist but are not exposed in the inspected admin UI
The model also contains:
codeexternal_idmarkupminimum_marginkey_specsavailable_for_google_merchantgroup_name
Source:
packages/framework/src/Models/ProductType.php
Storefront field filtering
Storefront resources deliberately remove:
markupminimum_margin
Source:
packages/framework/src/Http/Resources/Storefront/ProductTypeResource.php
Configuration And Data Model
Key model characteristics:
- translated:
name,description,slug - soft-deletable
- searchable
- ERP-syncable
- activity-log aware
Important fields:
| Field | Purpose |
|---|---|
name | translated business label |
description | translated description |
slug | translated handle for routing or lookups |
search_weight | search weighting input |
markup | pricing-related input |
minimum_margin | used in downstream minimum-quantity recalculation logic |
group_name | grouping metadata used in imports/exports |
external_id | ERP matching key |
code | derived identifier |
Creation behavior:
- requires
name.enandname.fr - auto-generates translated slugs
- defaults description to the provided names if omitted
- derives
codefrom slug, or fromexternal_id + slug
Sources:
packages/framework/src/Actions/ProductType/CreateProductType.phppackages/framework/src/Actions/ProductType/UpdateProductType.phppackages/framework/src/Models/ProductType.php
Relationships
ProductType directly relates to:
products()productAttributes()productCategories()
It also participates indirectly in:
- shipping-service product-type restrictions
- promotion prerequisite and entitlement conditions
- product-group selection on storefront product pages
Sources:
packages/framework/src/Models/ProductType.phppackages/framework/src/Models/ShippingService.phppackages/framework/src/Services/Promotion/Conditionspackages/framework/src/Http/Resources/Storefront/ProductResource.php
Rules And Downstream Effects
Deletion rule:
- a product type cannot be deleted while products still reference it
Automatic side effects on update:
- if
search_weightchanges, related searchable products are reindexed - if
minimum_marginchanges andpyle.calculate_product_minimum_quantity_from_moqis enabled, related products get queued minimum-quantity recalculation jobs
Trigger path:
ProductTypeObserverdispatchesProductType/UpdateRelatedProducts
Sources:
packages/framework/src/Actions/ProductType/DeleteProductType.phppackages/admin/src/Livewire/Admin/Settings/Types/DataTable/EditDialog.phppackages/framework/src/Observers/ProductTypeObserver.phppackages/framework/src/Actions/ProductType/UpdateRelatedProducts.php
Integrations And Automation
Excel
The exact product-type Excel surfaces are:
product_typesproduct_type_product_category
These support both direct product-type data and product-type/category relationship management.
Sources:
packages/framework/src/Actions/Exports/ProductType/Sheets/ProductTypesSheet.phppackages/framework/src/Actions/Exports/Product/Sheets/ProductTypeProductCategorySheet.phppackages/framework/src/Actions/Import/Product/Sheets/ImportProductTypeRows.phppackages/framework/src/Actions/Import/Product/Sheets/ImportProductTypeProductCategoryRows.php
ERP bridge
Product types are synced through the ERP bridge and matched through ERP-oriented fields such as external_id.
Sources:
packages/framework/src/Services/ErpBridge/ProductType/ProductTypeErpSyncService.phppackages/framework/src/Actions/ErpBridge/ProductTypepackages/erp-bridge/src/Requests/ProductTypes/GetProductTypesRequest.php
Where It Appears To End Users
ProductType is not a first-class storefront page. It appears as nested data inside product and order-item responses and influences what customers can buy or how combinations are resolved.
Examples:
- nested in storefront product payloads
- nested in storefront order-item payloads
- used when resolving product groups
Sources:
packages/framework/src/Http/Resources/Storefront/ProductResource.phppackages/framework/src/Http/Resources/Storefront/OrderItemResource.phppackages/framework/src/Http/Resources/Storefront/ProductTypeResource.php
Current Documentation Takeaways
The three most important operator-level facts are:
ProductTypeis broader than a simple label. It drives real pricing, shipping, promotion, and search behavior.- The admin UI only exposes a subset of the model. Some important fields exist only through API, import/export, or sync paths.
- Changing a product type can have downstream effects on products, especially search and minimum-quantity behavior.
Open Questions
- The admin API exposes
AllowedFilter::exact('visible')inProductTypesController, but the inspected model and migration evidence do not clearly explain that field. - The generated bindings file that wires observers is not committed in this repo snapshot, so observer registration is inferred from framework boot behavior rather than directly inspected project config.