[기획연재⑦] “사회적 돌봄의 현실이 그대로 드러나”
기획연재 ‘코로나19 이후를 이야기하다’에서는 신종 코로나바이러스 감염증(이하 코로나19)을 대응하고 있는 지방정부의 소식을 비롯해 전문가와 현장 활동가의 이야기를 시리즈로…
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; }
기획연재 ‘코로나19 이후를 이야기하다’에서는 신종 코로나바이러스 감염증(이하 코로나19)을 대응하고 있는 지방정부의 소식을 비롯해 전문가와 현장 활동가의 이야기를 시리즈로…