관련 개인/그룹
지역
11월의 한살림 제철, 제맛.11월 제철,제맛. 모바일 달력을 다운받으세요.11월, 겨울 기운 시작과 새로운 일년 준비, 김장겨울 기운이 돌기 시작하는 11월입니다. 한살림 제철제맛 물품들로 김장을 준비해보세요.제철제맛 장보기 >> http://bit.ly/2F5lyce
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; }
댓글 달기