テーマ仕様書 更新履歴
2023年
2023/11/21更新

2023/11/21更新

+ 更新した行
- 削除した行
  • マイページキャンセル機能 に関する更新箇所は 2023/10/17更新 をご確認ください。
  • 全ページのコードから {% csrf_meta_tags %} を削除しました。{% csrf_meta_tags %} の記述が残っていても動作には影響はございません。 (記述の有無に関わらず同じ動作となるようシステム側で調整しています)

セレクション機能の実装

selection > セレクションページ

ec_force/shop/selections/show.html.liquid
ec_force/shop/selections/show.html+smartphone.liquid

※新規追加ファイルです。

shared_partial > header

ec_force/shop/shared/_header.html.liquid
ec_force/shop/shared/_header.html+smartphone.liquid

 {% capture yield_description %}{% yield meta_description %}{% endcapture %}
 {% capture yield_keywords %}{% yield meta_keywords %}{% endcapture %}
+{% capture yield_og_image %}{% yield og_image %}{% endcapture %}
{% capture meta_keywords %}
  {% if yield_keywords == '' %}
    {{ base_info.meta_keyword }}
  {% else %}
    {{ yield_keywords }}
  {% endif %}
{% endcapture %}
 
+{% capture og_image %}
+  {% if yield_og_image == '' %}
+    {{ base_info.sns_ogp_logo.url }}
+  {% else %}
+    {{ yield_og_image }}
+  {% endif %}
+{% endcapture %}
+
 <!-- メタタグ -->
-<meta property="og:image" content="{{ base_info.sns_ogp_logo.url }}">
+<meta property="og:image" content="{{ og_image | strip }}">

Google検索にて商品の商品名・価格・レビューなどを表示できるようにする

product > 商品詳細画面

ec_force/shop/products/show.html.liquid
ec_force/shop/products/show.html+smartphone.liquid

<!-- Google検索結果画面に商品が持つレビュー数やおすすめレベルを表示-->
<script type="application/ld+json">
  {
    "@context": "https://schema.org/",
    "@type": "Product",
    "name": "{{ product.name }}",
+    "description": "{{ description }}",
+    {% if product.thumbnail.url %}
+    "image": "{{ product.thumbnail.url| escape }}",
+    {% else %}
+    "image": "{{ 'missing' | image_url }}",
+    {% endif %}
+    "offers": {
+      "@type": "Offer",
+      {% if product.out_of_stock? %}
+      "availability": "https://schema.org/OutOfStock",
+      {% else %}
+      "availability": "https://schema.org/InStock",
+      {% endif %}
+      "price": "{{ product.first_price_include_tax }}",
+      "priceCurrency": "JPY"
+  {% assign is_readable = product.id | check_review_reading_rule %}
+  {% if product.reviews_count > 0 and base_info.use_review? and is_readable %}
+    },
     "aggregateRating" : {
       "@type": "AggregateRating",
-      "bestRating": "5",
-      "worstRating": "1",
-      "reviewRating": "{{ product.reviews_count }}",
+      "reviewCount": "{{ product.reviews_count }}",
       "ratingValue": "{{ product.average_star_eval }}"
+    },
+    "review": [
+    {% for review in reviews %}
+      {% if review.name == empty %}
+        {% continue %}
+      {% endif %}
+      {
+        "@type": "Review",
+        "author": {
+          "@type": "Person",
+          "name": "{{ review.name }}"
+        },
+        "datePublished": "{{ review.created_at | date: "%Y-%m-%d" }}",
+        "reviewBody": "{{ review.comment }}",
+        "reviewRating": {
+          "@type": "Rating",
+          "ratingValue": "{{ review.star }}"
+        }
+      {% if forloop.last %}
+      }
+      {% else %}
+      },
+      {% endif %}
+    {% endfor %}
+    ]
+  {% else %}
     }
+  {% endif %}
   }
</script>

商品詳細ページでパンくずパーツを表示

product > 商品詳細画面

ec_force/shop/products/show.html.liquid
ec_force/shop/products/show.html+smartphone.liquid

 <!-- 商品詳細画面 -->
 <div id="product-show-view">
+  <!-- 商品カテゴリーPCパンくずリスト(任意) -->
+  {% for ancestry in product_categories_ancestry %}
+    <ol>
+      <li>{{ 'TOP' | link_to: '/shop' }}</li>
+      {% for path in ancestry %}
+        <li><a href="/shop/product_categories/{{ path.slug }}">{{ path.name }}</a></li>
+      {% endfor %}
+      <li>{{ product.name }}</li>
+    </ol>
+  {% endfor %}
+
   <!-- カートに商品を追加用のメッセージ -->

軽微な修正

商品詳細画面の img タグに alt 属性を追加

product > 商品詳細画面
ec_force/shop/products/show.html.liquid
ec_force/shop/products/show.html+smartphone.liquid

   <!-- 商品画像 -->
   {% if product.thumbnail.url %}
     {% assign src = product.thumbnail.url %}
+    {% assign alt = product.name %}
   {% else %}
     {% assign src = 'missing' | image_url %}
+    {% assign alt = '' %}
+  {% endif %}
+
+  {% if product.master.thumbnails.size > 0 %}
+    {% if product.master.option_values_presentation %}
+      {% assign alt = product.name | append: ' ' | append: product.master.option_values_presentation %}
+    {% else %}
+      {% assign alt = product.name %}
+    {% endif %}
   {% endif %}
-  <img src="{{ src }}" id="main-img">
+
+  <img src="{{ src }}" alt="{{ alt }}" id="main-img">
   <div id="sub-images-view"></div>
 
   <!-- 商品名 -->

未ログイン時のLINE IE連携ボタンの表記変更

cart > カート画面
ec_force/shop/carts/show.html.liquid
ec_force/shop/carts/show.html+smartphone.liquid

         <!-- LINE ID 説明ポップアップ -->
         {{ line_settings['information_context'] }}
         <!-- LINE ID 連携ボタン(クラス) -->
-        <a class="line-token-set-btn" href="#">LINE ID 連携</a>
+        <a class="line-token-set-btn" href="#">LINEでログイン</a>
       {% elsif customer_signed_in == true and current_customer.line_id? == false %}
         <!-- LINE ID 説明ポップアップ -->
         {{ line_settings['information_context'] }}

cart > 注文情報入力画面
ec_force/shop/orders/new.html.liquid
ec_force/shop/orders/new.html+smartphone.liquid

       <!-- LINE ID 説明ポップアップ -->
       {{ line_settings['information_context'] }}
       <!-- LINE ID 連携ボタン(クラス) -->
-      <a class="line-token-set-btn" href="#">LINE ID 連携</a>
+      <a class="line-token-set-btn" href="#">LINEでログイン</a>
     {% elsif customer_signed_in == true and current_customer.line_id? == false %}
       <!-- LINE ID 説明ポップアップ -->
       {{ line_settings['information_context'] }}

auth > 会員ログイン/会員登録画面
ec_force/shop/customers/sessions/new.html.liquid
ec_force/shop/customers/sessions/new.html+smartphone.liquid

   <!-- LINE ID 説明ポップアップ -->
   {{ line_settings['information_context'] }}
   <!-- LINE ID 連携ボタン(クラス) -->
-  <a class="line-token-set-btn" href="#">LINE ID 連携</a>
+  <a class="line-token-set-btn" href="#">LINEでログイン</a>
 {% endif %}
 
 <form action="/shop/customers" accept-charset="UTF-8" method="post">

shared_partial > sidebar
ec_force/shop/shared/_sidebar.html.liquid

           <!-- LINE ID 説明ポップアップ -->
           {{ line_settings['information_context'] }}
           <!-- LINE ID 連携ボタン(クラス) -->
-          <a class="line-token-set-btn" href="#">LINE ID 連携</a>
+          <a class="line-token-set-btn" href="#">LINEでログイン</a>
         {% elsif customer_signed_in == true and current_customer.line_id? == false %}
           <!-- LINE ID 説明ポップアップ -->
           {{ line_settings['information_context'] }}

定期商品追加時の連続クリック制御

mypage > 定期注文詳細画面 商品の追加
ec_force/shop/customer/subs_orders/variants/show.html.liquid
ec_force/shop/customer/subs_orders/variants/show.html+smartphone.liquid

     <!-- 定期便に追加 -->
-    <button id="btn-add" style='display:none;'>定期便に追加</button>
+    <button id="btn-add" style='display:none;' data-disable-with="保存中...">定期便に追加</button>

ショップサンクスオファー利用時、特定条件で起こる不具合の修正

cart > お届けサイクル(部分テンプレート)
ec_force/shop/orders/_view_payment_schedule.html.liquid
ec_force/shop/orders/_view_payment_schedule.html+smartphone.liquid

     <input id='scheduled_to_be_delivered_at' type='hidden'>
     <input id='scheduled_1st_delivery_date' name='preview_order[scheduled_to_be_delivered_at]' type='hidden'>
     <input id='scheduled_1st_delivery_time' name='preview_order[scheduled_delivery_time]' type='hidden'>
+    <input id='selected_scheduled_delivery_time' value="{{ order.scheduled_delivery_time }}" type='hidden'>
   {% else %}
     <input id='payment_schedule' name='order[subs_order_attributes][payment_schedule]' type='hidden'>
     <input id='payment_schedule_locked' name='order[subs_order_attributes][payment_schedule_locked]' type='hidden'>
     <input id='scheduled_to_be_delivered_every_x_month' name='order[subs_order_attributes][scheduled_to_be_delivered_every_x_month]' type='hidden'>
     <input id='scheduled_to_be_delivered_on_xth_day' name='order[subs_order_attributes][scheduled_to_be_delivered_on_xth_day]' type='hidden'>
     <input id='scheduled_to_be_delivered_every_x_day' name='order[subs_order_attributes][scheduled_to_be_delivered_every_x_day]' type='hidden'>
     <input id='scheduled_to_be_delivered_on_xth_day_of_week' name='order[subs_order_attributes][scheduled_to_be_delivered_on_xth_day_of_week]' type='hidden'>
     <input id='scheduled_to_be_delivered_every_x_day_of_week' name='order[subs_order_attributes][scheduled_to_be_delivered_every_x_day_of_week]' type='hidden'>
     <input id='scheduled_2nd_delivery_date' name='order[subs_order_attributes][scheduled_to_be_delivered_at]' type='hidden'>
     <input id='scheduled_2nd_delivery_time' name='order[subs_order_attributes][scheduled_delivery_time]' type='hidden'>
     <input id='scheduled_to_be_delivered_at' type='hidden'>
     <input id='scheduled_1st_delivery_date' name='order[scheduled_to_be_delivered_at]' type='hidden'>
     <input id='scheduled_1st_delivery_time' name='order[scheduled_delivery_time]' type='hidden'>
+    <input id='selected_scheduled_delivery_time' value="{{ order.scheduled_delivery_time }}" type='hidden'>
   {% endif %}
 
   <!-- お届けサイクル -->

cart > サンクスクロスセル(部分テンプレート)
ec_force/shop/orders/_form_cv_xsell.html.liquid
ec_force/shop/orders/_form_cv_xsell.html+smartphone.liquid

-                <input type="hidden" name="product-name" value="{{ cv_xsell_product.name }}">
+                <input type="hidden" name="product-name" value="{{ cv_xsell_product.name | escape }}">
                 <input type="hidden" name="product_description" value="{{ cv_xsell_product.parsed_description | simple_format }}">
                 <input type="hidden" name="is_pre_order" value="{% if base_info.use_pre_order? and cv_xsell_product.master.pre_order.is_pre_order? %}1{% else %}0{% endif %}">
                 <input type="hidden" name="pre_ordered_display_mark" value="{% if pre_order_settings.display_mark %}1{% else %}0{% endif %}">
-                <input type="hidden" name="pre_ordered_delivery_description_modal" value="{{ cv_xsell_product.master.pre_order.pre_ordered_delivery_description }}">
-                <input type="hidden" name="pre_ordered_notes" value="{{ pre_order_settings.notes }}">
+                <input type="hidden" name="pre_ordered_delivery_description_modal" value="{{ cv_xsell_product.master.pre_order.pre_ordered_delivery_description | escape }}">
+                <input type="hidden" name="pre_ordered_notes" value="{{ pre_order_settings.notes | escape }}">
                 <input type="hidden" name="valid_pre_order" value="{% if cv_xsell_product.master.pre_order.within_pre_order_period? == false %}0{% endif %}1">
                 <input type="hidden" name="delivery_group_names" value="{{ delivery_group_names }} ">
                 <input type="hidden" name="list-price" value="{{ cv_xsell_product.master.list_price | number_to_currency }}">