PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 6, 2024
Let's talk code, commerce and open source.

Hook actionOrderSlipAdd

Informations

Order slip creation This hook is called when a new credit slip is added regarding client order
Hook actionOrderSlipAdd
Locations
FO
Type action
Origin core
Aliases [orderSlip]

Located in

Origin File
core src/Adapter/Order/Refund/OrderSlipCreator.php

Parameters details

    <?php
    array(
      'order' => Order,
      'productList' => array(
        (int) product ID 1,
        (int) product ID 2, 
        ...,
        (int) product ID n
      ),
      'qtyList' => array(
        (int) quantity 1,
        (int) quantity 2,
        ...,
        (int) quantity n 
      )
    );
    The order of IDs and quantities is important!

Call of the Hook in the origin file

Hook::exec('actionOrderSlipAdd', [
                'order' => $order,
                'productList' => $orderRefundSummary->getProductRefunds(),
                'qtyList' => $fullQuantityList,
            ], null, false, true, false, $order->id_shop)