DETAIL & VALIDATE
DETAIL
Class: OciDetailController
Purpose: Redirects the buyer directly to the Shopware product detail page for a given product number.
Flow
- Check
productidparameter (required) OciProductService::getProductByProductNumber()→ look up product byproductNumberin$dataFeedContext- Redirect to
frontend.detail.pagewith the internal Shopware product UUID
Parameters
| Parameter | Required | Description |
|---|---|---|
productid | ✅ Yes | Product number (e.g. SW-1234) |
Response
HTTP 302 Redirect
Location: /detail/{shopwareProductId}
Error behaviour
| Error | Exception |
|---|---|
productid missing | \RuntimeException: Parameter PRODUCTID is required and has not been provided. |
| Product not found | \RuntimeException: Product with product number "..." was not found. |
note
DETAIL leaves the ConnectorSession active — the buyer can continue shopping after the redirect.
VALIDATE
Class: OciValidateController
Purpose: Adds a single product to a temporary cart and returns the complete OCI form. Typically used when the procurement system wants to validate an item before starting an interactive shopping session.
Flow
- Check
productidandquantity(both required) - Load product by
productNumber($dataFeedContext) - Raise quantity to
minPurchaseif below the minimum order quantity - Add product with
quantityto$cartContext(OciProductService::addProductToCart()) - Build OCI form:
OciConnectorResponseGenerator::buildForm()(using$dataFeedContext) - Clear session (
ConnectorSessionService::clear()) - Render Twig template
Parameters
| Parameter | Required | Description |
|---|---|---|
productid | ✅ Yes | Product number |
quantity | ✅ Yes | Quantity; automatically raised to minPurchase if too low |
Response
@AgiqonConnector/storefront/plugin/oci-validate.html.twig
Template variables:
| Variable | Type | Description |
|---|---|---|
ociForm | OciFormData | Complete OCI form data |
AgiqonOciStartIndex | int | Configured start index of the system (OciSystemEntity::getIndexStart()) |
Error behaviour
| Error | Exception |
|---|---|
productid or quantity missing | \RuntimeException: Parameters "PRODUCTID" and "QUANTITY" are required... |
| Product not found | \RuntimeException: Product with product number "..." was not found. |
note
The ConnectorSession is cleared after VALIDATE — unlike DETAIL and SOURCING, which leave the session active. DataFields are fully resolved and available in the ociForm object.