/** * 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; } [지방살림포럼] 지방의원 목요강좌_11월29일 목요일 | 시민정치마당 주요 콘텐츠로 건너뛰기
사이드바

[지방살림포럼] 지방의원 목요강좌_11월29일 목요일

금, 2018/11/09- 16:50익명 (미확인) 에 의해 제출됨
관련 개인/그룹
지역



[나라살림연구소 교육포럼 안내]


  2018년 예산안 심의 전 마지막 강좌 


[지방살림포럼] 지방의원 목요강좌

★ 목요강좌는 12월 20일까지 매주 목요일마다 진행합니다

★ 현안/사례/실전 중심으로 강의를 구성했습니다

★ 세 강의를 모두 이수하시면 수료증이 발급됩니다

지역별 맞춤식 총 3강 구성

[1강] 지방예산결산, [2강] 행정사무감사, [3강] 조례제개정
강좌안내

○ 기 간: 10월 4일~12월 20일 매주 목요일 진행

○ 일 시: 11월 29일(목) 14시~18시
○ 신 청: 수시 메일 접수 ([email protected])_이름, 연락처, 소속 기재바랍니다.
○ 비 용: 15만원(매회)
○ 혜 택: 정창수 저서『실전!지방예산결산』(정가:8만원) 50%할인 
○ 장 소: 연구소 교육장(마포구 동교로 209 용평빌딩, 4층)
○ 문 의: 02-336-0619



♣ 주차안내 ♣

: 별도의 주차공간이 없습니다. 대중교통을 이용 해 주세요. 
부득이한 경우에는 가까운 유료 주차장 이용이 가능합니다.


-근처 주차장 안내-

1. 올레플라자 신촌점: 서울특별시 마포구 월드컵북로2길 65 KT신촌지사
2. 토로스 주차타워 민영 주차장: 서울 마포구 동교로 180


댓글 달기

CAPTCHA
스펨 사용자 차단 질문