FROM CACHE - jp_header
解決済

テーマ<Broadcast 正式>での「税込み」文言の付け加え方

Liebeseele
訪問者
2 0 1

皆様こんにちは

現在テーマ<Broadcast 正式>を使用させて頂いております。

今更ではありますが商品ページに表示されている「税抜き」表記を「税込み」表記に変更したく、こちらにたどり着きました。

他のテーマを使用されている質問者様の質問&回答を参考にliquidの該当コードを探してみたものの、

product-price.liquid ----- 該当コード無し

product-price-listing.liquid ----- 該当コード無し

procuct-option.liquid   -----

 

<div class="selector-wrapper js" data-option="option{{ option.position }}">
  <label for="SingleOptionSelector-{{ forloop.index0 }}-{{product.id}}">
    {{ option.name }}
  </label>

  <select
    id="SingleOptionSelector-{{ forloop.index0 }}-{{product.id}}"
    data-single-option-selector
    data-index="option{{ option.position }}">
    {% for value in option.values %}
      <option
        value="{{ value | escape }}"
        {% if option.selected_value == value %}selected="selected"{% endif %}>
        {{ value }}
      </option>
    {% endfor %}
  </select>
</div>

 

product-grid-item.liquid   ----- 

 

{%- assign double_img = false -%}
{%- if product.media[1].preview_image and settings.image_hover_enable -%}
  {%- assign double_img = true -%}
{%- endif -%}

{%- if last_element -%}
  {%- assign lastElementClass = 'visually-hidden' -%}
{%- endif -%}

{% if fallback %}
  <div class="product-item {{ grid_width_small }} {{ grid_width_medium }} {{ grid_width_large }} {{ lastElementClass }}">
    <div class="product-item__image svg-placeholder">
        {% capture current %}{% cycle 1, 2, 3, 4, 5, 6 %}{% endcapture %}
        {{ 'collection-' | append: current | placeholder_svg_tag }}
    </div>
    <div class="product-information">
      {% if showReviews %}
        <span class="spr-badge" data-rating="0.0">
          <span class="spr-starrating spr-badge-starrating">
            <i class="spr-icon spr-icon-star-empty"></i>
            <i class="spr-icon spr-icon-star-empty"></i>
            <i class="spr-icon spr-icon-star-empty"></i>
            <i class="spr-icon spr-icon-star-empty"></i>
            <i class="spr-icon spr-icon-star-empty"></i>
          </span>
        </span>
      {% endif %}
      <h3 class="title">{{ 'home_page.onboarding.product_title' | t }}</h3>
      <span class="price">{{ 9900 | money }}</span>
    </div>
  </div>
{% else %}
  <div class="product-item {{ grid_width_small }} {{ grid_width_medium }} {{ grid_width_large }} {{ lastElementClass }}">
    <a id="product-{{ product.variants.first.id }}" class="product-link" href="{{ product.url | within: collection }}" aria-label='{{ product.title }}'>

      {% capture over_image_content %}
        {% if product.compare_at_price > product.price and settings.sale_tags_enable %}
          <span class="sale-box">{{ 'products.product.on_sale' | t }}</span>
        {% endif %}
        {% if quick_view and product.object_type == 'product' %}
          <div class="slideup">
            {%- assign uniqueID = section.id -%}
            {%- if template.name == 'list-collections' -%}
              {%- assign uniqueID = collection.id -%}
            {%- endif -%}
            <span data-modal="Product{{ forloop.index0 }}{{ paginate.current_page }}-{{uniqueID}}" class="trigger-quick-view caps">{{ 'products.general.quick_view' | t }}</span>
          </div>
        {% endif %}
      {% endcapture %}

      <div class="product-item__image {% if double_img %} double__image{% endif %}">
        <div class="product-item__bg lazyload"
          data-aos="img-in"
          data-aos-anchor=".product-grid"
          data-aos-delay="{{ animation_delay | times: 150 }}"
          data-aos-duration="{{ animation_delay | times: 100 | plus: 800 }}"
          data-aos-easing="ease-out-quart"
          data-bgset="{% include 'bgset', image: product.featured_media.preview_image %}"></div>
          {% if double_img %}
            <div class="product-item__bg__under lazyload" data-bgset="{% include 'bgset', image: product.media[1].preview_image %}"></div>
          {% endif %}
        {{ over_image_content }}
      </div>

      <noscript>
        <div class="product-item__image no-js-image" style="background-image:url('{{ img_src | img_url: '540x' }}'); background-size: contain; background-position: center center; background-repeat: no-repeat;"
          >
          {{ over_image_content }}
        </div>
      </noscript>
      <div class="product-information"
        data-aos="fade-up"
        data-aos-anchor=".product-grid"
        data-aos-delay="{{ animation_delay | times: 100 }}"
        data-aos-duration="{{ animation_delay | times: 100 | plus: 100 }}">

        {%- if showReviews -%}
          {%- if settings.enable_yotpo and settings.yotpo_ID != '' -%}
            <div class="yotpo bottomLine" data-product-id="{{ product.id }}"></div>
          {%- else -%}
            <span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
          {%- endif -%}
        {%- endif -%}

        <h3 class="title">{{ product.title }}</h3>
        <span class="price{% if product.compare_at_price > product.price %} sale{% endif %}">
          {% if product.available %}
            {% if product.compare_at_price > product.price %}
              <span class="old-price">{{ product.compare_at_price | money }}</span>
            {% endif %}
            {% if product.price_varies %}
              <small>{{ 'products.general.from' | t }}</small> {{ product.price_min | money }}
            {% else %}
              {{ product.price_min | money }}
            {% endif %}
          {% else %}
            <span class="sold-out">{{ 'products.product.sold_out' | t }}</span>
          {% endif %}
        </span>
      </div>
    </a>
  </div>
{% endif %}

 

 

product-grid-item.liquidの中にmoneyなどの単語はでてくるものの、

https://torublog.com/shopify-add-taxin-text/#i

を参考にしているのですが、コード編集の知識がほぼ一切なく、果たしてここでよいのかわからず行き詰っております。

 

念のためにsnippets内のすべてのコードのタイトルだけここにコピペしておきたいと思います。

どなた様か変更方法をご教授願えますでしょうか、

大変申し訳ございませんが、何卒よろしくお願い申し上げます。

 

1 件の受理された解決策

KOICHI_KAMIZURU
Shopify Partner
56 21 62

成功

Broadcastテーマを所有していない為正確にはお答えできないのですが、product.liquidの中に以下のようなコードはありますでしょうか?

<span data-product-price="">{{ money_price }}</span>

もし存在した場合は、以下のように変更をお願いします。

<span data-product-price="">{{ money_price }}{%- if shop.taxes_included -%}&nbsp;({{ 'products.product.include_taxes' | t }}){%- endif -%}</span>

 

また、合わせて以下もご確認ください。

 

■設定->税金 

1. [税の計算]の「すべての価格を税込価格で表示する」にチェックが入っているかどうか

 

■オンラインストア->テーマ

1. [現在のテーマ]からアクション->言語を編集する

2. Productsタブ内の「Include taxes」に「税込」というテキストが入力されているかどうか

 

宜しくお願い致します。

上水流 弘一 (Kamizuru Koichi)
アプリ開発、テーマのカスタマイズ承っております。
お気軽にご相談ください。

元の投稿で解決策を見る

2件の返信2

KOICHI_KAMIZURU
Shopify Partner
56 21 62

成功

Broadcastテーマを所有していない為正確にはお答えできないのですが、product.liquidの中に以下のようなコードはありますでしょうか?

<span data-product-price="">{{ money_price }}</span>

もし存在した場合は、以下のように変更をお願いします。

<span data-product-price="">{{ money_price }}{%- if shop.taxes_included -%}&nbsp;({{ 'products.product.include_taxes' | t }}){%- endif -%}</span>

 

また、合わせて以下もご確認ください。

 

■設定->税金 

1. [税の計算]の「すべての価格を税込価格で表示する」にチェックが入っているかどうか

 

■オンラインストア->テーマ

1. [現在のテーマ]からアクション->言語を編集する

2. Productsタブ内の「Include taxes」に「税込」というテキストが入力されているかどうか

 

宜しくお願い致します。

上水流 弘一 (Kamizuru Koichi)
アプリ開発、テーマのカスタマイズ承っております。
お気軽にご相談ください。
Liebeseele
訪問者
2 0 1

 様

大変貴重なご意見誠に有難うございます。

大変お恥ずかしいことに、御指摘頂きましたProduct.liquid内を何度か確認してみると、

79行目に日本語で「税抜き」と書かれている箇所があり、そこを「税込み」と書き換えたところ、全ての商品ページで「税込み」の文言が反映されておりました。

金額に関しましてはほかのアプリを使って計算出来たため、これで万事解決と至りました。

この度は誠に有難うございます。

 

参考までに変更後のproduct.liquidの一部を抜粋して添付させて頂きます。

 

    <div class="grid__item medium-up--one-half">
      <div class="form__wrapper{% unless current_variant.available %} variant--soldout{% endunless %}" data-form-wrapper>
        <div class="form__inner__wrapper">
          <div class="form__width">
            <div class="product__title__wrapper">
              <h1 class="product__title">{{ product.title }}</h1>
              <div class="h5--body product__price" data-price-wrapper>
                <span data-product-price {% if current_variant.compare_at_price > current_variant.price %} class="product__price--sale"{% endif %}>
                  {{ current_variant.price | money }}
                </span>
                <span class="product__price--sale-tax" >
        			(税込み)
                </span>
                {% if product.compare_at_price_max > product.price %}
                  <span class="visually-hidden" data-compare-text>{{ 'products.product.regular_price' | t }}</span>
                  <s class="product__price--strike" data-compare-price>
                    {% if current_variant.compare_at_price > current_variant.price %}
                      {{ current_variant.compare_at_price | money }}
                    {% endif %}
                  </s>
                {% endif %}
              </div>
            </div>