유기견도 행복하개 ‘업사이클링 반려동물 장난감 만들기’
사랑하는 나의 반려동물을 위해
나의 체취가 듬뿍 묻은 헌 옷과 헌 양말로
세상에 단 하나뿐인 터그놀이, 노즈워크 장난감을 만들어 보아요!
바느질을 하실 수 있는 누구나 신청 가능하시며,
참가비는 무료 입니다^^
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; }
댓글 달기