/** * Implements hook_preprocess_commerce_checkout_form(). */ function bootstrap_barrio_subtheme_preprocess_commerce_checkout_form(&$variables) { $form = &$variables['form']; $custom_fields = []; // 주문 엔터티 추출 시도 $order = NULL; $possible_keys = ['#order', 'order', '#entity', 'checkout']; foreach ($possible_keys as $key) { if (!empty($form[$key]) && $form[$key] instanceof \Drupal\commerce_order\Entity\OrderInterface) { $order = $form[$key]; \Drupal::logger('mytheme')->debug('Order found with key: @key', ['@key' => $key]); break; } } // 대체 방법: 현재 체크아웃 단계에서 주문 엔터티 로드 if (!$order) { $checkout_flow = \Drupal::routeMatch()->getParameter('commerce_checkout_flow'); if ($checkout_flow) { $order = \Drupal::routeMatch()->getParameter('commerce_order'); \Drupal::logger('mytheme')->debug('Order loaded from route: @order_id', ['@order_id' => $order ? $order->id() : 'none']); } } if ($order && $order instanceof \Drupal\commerce_order\Entity\OrderInterface) { foreach ($order->getItems() as $order_item) { $variation = $order_item->getPurchasedEntity(); $product = $variation ? $variation->getProduct() : NULL; if ($product) { $footer_block_value = $product->hasField('field_footer_block') && !$product->field_footer_block->isEmpty() ? $product->field_footer_block->value : 'N/A'; $custom_fields[] = [ 'footer_block' => $footer_block_value, ]; \Drupal::logger('mytheme')->debug('Field footer_block value: @value for product: @product_id', [ '@value' => $footer_block_value, '@product_id' => $product->id(), ]); } else { \Drupal::logger('mytheme')->debug('No product found for order item: @id', ['@id' => $order_item->id()]); } } } else { $custom_fields[] = ['footer_block' => '주문 엔터티를 찾을 수 없습니다.']; \Drupal::logger('mytheme')->debug('No order entity found. Form keys: @keys', ['@keys' => implode(', ', array_keys($form))]); } $variables['custom_fields'] = $custom_fields; $variables['form_keys'] = array_keys($form); } function bootstrap_barrio_subtheme_preprocess_commerce_checkout_order_summary(&$variables) { /** @var \Drupal\commerce_order\Entity\OrderInterface $order */ $order = $variables['order_entity']; $result = []; foreach ($order->getItems() as $item) { $variation = $item->getPurchasedEntity(); // 커스텀 필드값 가져오기 (배열 형태). $values = $variation->get('body')->getValue(); // 예: 각 라인아이템 별로 값 저장. $result[$item->id()] = $values; } $variables['body'] = $result; } “환경부·서울·경기, 매립지 종료 대책 주민토론회 불참 실망” | 시민정치마당 주요 콘텐츠로 건너뛰기
사이드바

“환경부·서울·경기, 매립지 종료 대책 주민토론회 불참 실망”

수, 2019/12/04- 03:56admin 에 의해 제출됨
관련 개인/그룹

환경부와 서울시·경기도가 인천지역 시민단체와 국회의원이 제안한 수도권쓰레기매립지 종료 대책 토론회 불참을 통보했다. 시민단체는 실망스럽다는 의견을 냈다. 인천평화복지연대는 7일 오전 논평을 내고 더불어민주당 신동근 국회의원(서구을), 서구갑위원회(위원장 김교흥)과 함께 환경부·서울시·경기도·인천시에 ‘수도권매립지 종료에 따른 대책 마련 토론회’ 참여를 제안했는데, 인천시를 제외한 나머지 기관 모두 참석이 어렵다는 최종 답변을 보내왔다고 밝혔다

< 관련 뉴스 >

# 인천투데이 : “환경부·서울·경기, 매립지 종료 대책 주민토론회 불참 실망” http://www.incheontoday.com/news/articleView.html?idxno=117899

 

# 경인일보 : 매립지 4자회의 3개월만에 재개됐지만… '빈손'으로 끝나 http://www.kyeongin.com/main/view.php?key=20191107010002487
 

댓글 달기

CAPTCHA
스펨 사용자 차단 질문