Skip to main content

DETAIL & VALIDATE

DETAIL​

Class: OciDetailController
Purpose: Redirects the buyer directly to the Shopware product detail page for a given product number.

Flow​

  1. Check productid parameter (required)
  2. OciProductService::getProductByProductNumber() → look up product by productNumber in $dataFeedContext
  3. Redirect to frontend.detail.page with the internal Shopware product UUID

Parameters​

ParameterRequiredDescription
productid✅ YesProduct number (e.g. SW-1234)

Response​

HTTP 302 Redirect
Location: /detail/{shopwareProductId}

Error behaviour​

ErrorException
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​

  1. Check productid and quantity (both required)
  2. Load product by productNumber ($dataFeedContext)
  3. Raise quantity to minPurchase if below the minimum order quantity
  4. Add product with quantity to $cartContext (OciProductService::addProductToCart())
  5. Build OCI form: OciConnectorResponseGenerator::buildForm() (using $dataFeedContext)
  6. Clear session (ConnectorSessionService::clear())
  7. Render Twig template

Parameters​

ParameterRequiredDescription
productid✅ YesProduct number
quantity✅ YesQuantity; automatically raised to minPurchase if too low

Response​

@AgiqonConnector/storefront/plugin/oci-validate.html.twig

Template variables:

VariableTypeDescription
ociFormOciFormDataComplete OCI form data
AgiqonOciStartIndexintConfigured start index of the system (OciSystemEntity::getIndexStart())

Error behaviour​

ErrorException
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.