안녕하세요. 350캠페인 참가자 여러분!
이번 350캠페인에서 월마다 꼭 해주셔야 할 기온 측정에 일부 분들만 참여해주시고 있습니다.
온도계를 가지고 가신 분들 중 기온 측정을 안하실 분들은
저희 환경운동연합 사무실로 온도계를 반납해주세요.
대전 지역의 정확한 열지도 작성을 위해서는 기온 측정을 꼭 해주시거나
온도계를 반납해주셔서 다른 분들에게 온도계를 양보해주시기 바랍니다^^
use Drupal\commerce_order\Entity\Order; /** * Implements hook_preprocess_HOOK() for commerce_checkout_order_summary. */ function bootstrap_barrio_subtheme_preprocess_commerce_checkout_order_summary(&$variables) { $order = $variables['order_entity']; // 주문 엔터티 $product_ids = []; if ($order instanceof Order) { foreach ($order->getItems() as $order_item) { $purchased_entity = $order_item->getPurchasedEntity(); if ($purchased_entity && $purchased_entity->getProduct()) { $product = $purchased_entity->getProduct(); $product_ids[] = $product->id(); } } } // Twig 템플릿에서 사용할 변수 추가 $variables['product_ids'] = $product_ids; }
댓글 달기