/** * 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; } 134. 코로나19시대의 청년구직자 들여다보기 #팟캐스트 #노력말고_노조가_필요한_우리 #노가리 #실태조사 #코로나19 #청년 #구직자 코로나19시대에 청년구직자들은 어떻게 살고 있을까? 어떤 고민들이 있을까요? 2020년... | 시민정치마당 주요 콘텐츠로 건너뛰기
사이드바

134. 코로나19시대의 청년구직자 들여다보기

#팟캐스트 #노력말고_노조가_필요한_우리 #노가리
#실태조사 #코로나19 #청년 #구직자

코로나19시대에 청년구직자들은 어떻게 살고 있을까?
어떤 고민들이 있을까요?
2020년...

화, 2021/03/23- 22:55admin 에 의해 제출됨
관련 개인/그룹
지역
카테고리

134. 코로나19시대의 청년구직자 들여다보기



#팟캐스트 #노력말고_노조가_필요한_우리 #노가리

#실태조사 #코로나19 #청년 #구직자



코로나19시대에 청년구직자들은 어떻게 살고 있을까?

어떤 고민들이 있을까요?

2020년에 진행한 청년구직자 실태조사를 살펴보고

올해의 청년구직자 사업에 대해 고민해봅니다.



일하고 꿈꾸고 저항하는 청년들의 노동조합, 청년유니온.

노력말고 노조가 필요한 우리: 노.가.리 제 134회



-이번주상담111: 송하민(씨앗)

-진행: 치리(이슬), 김영민

-출연: 정보영

-제작: 유니콘사운드

-편집: 치리(이슬)



팟빵으로 듣기 : http://bit.ly/팟빵_노가리

아이튠즈로 듣기 : http://bit.ly/아이튠즈_노가리

유튜브로 듣기: https://bit.ly/유튜브_노가리

문의 및 사연메일 : [email protected]

카카오톡 : @청년유니온 http://bit.ly/카톡청유

청년유니온 함께하기 : youthunion.kr/j



댓글 달기

CAPTCHA
스펨 사용자 차단 질문