Jump to content

Edit History

Janett

Janett

    /**
     * @param array{cookie: Cookie, cart: Cart, altern: int, order_invoice_list: OrderInvoice[]} $params
     */
    public function hookActionPDFInvoiceRender(array $params)
    {
        if (isset($params['order_invoice_list'])) {
            foreach ($params['order_invoice_list'] as $orderInvoice) {
                if (Validate::isLoadedObject($orderInvoice)) {
                    $order = new Order((int) $orderInvoice->id_order);

                    if (Validate::isLoadedObject($order)) {
                        $orderDetails = $order->getOrderDetailList();
                        $customer = new Customer((int) $order->id_customer);
                        if (Validate::isLoadedObject($customer)) {
                            $firstname = $customer->firstname;
                        }
                    }
                }
            }
        }
    }

 

Janett

Janett

    /**
     * @param array{cookie: Cookie, cart: Cart, altern: int, order_invoice_list: OrderInvoice[]} $params
     */
    public function hookActionPDFInvoiceRender(array $params)
    {
        if (isset($params['order_invoice_list'])) {
            foreach ($params['order_invoice_list'] as $orderInvoice) {
                if (Validate::isLoadedObject($orderInvoice)) {
                    $order = new Order((int) $orderInvoice->id_order);

                    if (Validate::isLoadedObject($order)) {
                        $customer = new Customer((int) $order->id_customer);
                        $orderDetails = $order->getOrderDetailList();
                    }
                }
            }
        }
    }

 

×
×
  • Create New...