Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-8055

Provide cart's item context to an order item in the OrderFactory

    XMLWordPrintable

Details

    • Ibexa Commerce
    • Yes

    Description

      We are already providing a Checkout's context to an Order (https://github.com/ibexa/checkout/blob/main/src/lib/Order/Factory/OrderFactory.php#L80):

               $context = $checkout->getContext();
               ////////
              return new OrderCreateStruct(
                  $orderUser,
                  $orderCurrency,
                  $orderValue,
                  'local_shop',
                  $orderItems,
                  $orderCompany,
                  $context
              );
      

      Providing CartEntry's context to an OrderItem as well would be useful (https://github.com/ibexa/checkout/blob/main/src/lib/Order/Factory/OrderFactory.php#L220):

                  $orderItems[] = new OrderItem(
                      $entry->getQuantity(),
                      $orderItemValue,
                      $orderItemProduct,
                      $entry->getContext()->toArray(),
                  );
      

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              bartlomiej.wajda@ibexa.co Bartłomiej Wajda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: