バージョン選択

フォーラム

メニュー

オンライン状況

53 人のユーザが現在オンラインです。 (44 人のユーザが フォーラム を参照しています。)
登録ユーザ: 1
ゲスト: 52
tattsu もっと...

サイト内検索

質問 > フロント機能 > 商品詳細ページ 規格2の内容が表示されない不具合

フロント機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
melonsoda
投稿日時: 2022/9/9 19:55
対応状況: −−−
新米
登録日: 2022/9/9
居住地:
投稿: 5
商品詳細ページ 規格2の内容が表示されない不具合
▼EC-CUBE
EC-CUBE 4.1ダウンロード版(カスタマイズ済)
▼レンタルサーバ
Xserver
▼PHP
不明
▼データベース
phpMyAdmin
▼WEBサーバ
不明
▼ブラウザ
GoogleChrome、
▼導入プラグイン
 Web API
 Coupon Plugin for EC-CUBE4
 会員ランクプラグイン
 会員ランクプラグインアドオン:配送方法制限
 商品ランキング
 Google Merchant Center
 同じカテゴリの商品を自動で表示
 新規会員登録時クーポン付与プラグイン for EC-CUBE 4
 期間限定送料無料プラグイン for EC-CUBE 4
 プロモーション用モーダル表示プラグイン for EC-CUBE 4
 メールマガジンプラグイン
 商品画像にテキスト追加 for EC-CUBE4
 売上順・売れ筋順並び替えプラグイン for EC-CUBE4
 商品おすすめ順並び替えプラグイン for EC-CUBE4
 商品画像一括アップロードプラグイン
 商品レビュー管理プラグイン
 おすすめ商品管理プラグイン
 関連商品プラグイン
 売上集計プラグイン
 Securitychecker4
 Site Kit プラグイン
 SoftbankPayment4
 商品タグ機能拡張

▼カスタマイズの有無
会員ランクプラグインに関連したカスタマイズあり(詳細不明)

▼不具合ページ
商品詳細ページ(Product/detail.twig)

▼不具合現象
商品詳細ページ(detail)の規格2表示フォームの内容が突如表示されなくなってしまいました。デフォルト表示の"選択してください"のみ表示されている状態です。
下記URLにて現象をご確認頂けます。

https://melonsoda.shop/products/detail/401

運営中のアパレルECサイトについて、カスタマイズ・保守を依頼していた外部委託していたコーダーの方と突如音信不通になってしまった矢先、原因不明の不具合に見舞われ途方に暮れております...
自分含めて知識のある担当者が不在の状況でして、どなたか原因がお分かりになる方、ご助力頂けますと大変助かります。

detail.twig自体の最終更新日は不具合発生の数日前となっており、その間は不具合発生しておりませんでしたため直接の原因として考えにくいかと思っていますが、何ぶん知識がないため下記全コードを記載いたします。
直近他のコードやDBも変更した覚えがないため、不具合箇所や原因も不明の状況です。
何卒宜しくお願い致します。

{#
This file is part of EC-CUBE

Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.

http://www.ec-cube.co.jp/

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}

{% set body_class = 'product_page' %}

{% block stylesheet %}
<style>

.ec-newItemRole__listItemPrice {
font-size: 24px;
}
.slick-slider {
margin-bottom: 30px;
}

.slick-dots {
position: absolute;
bottom: -45px;
display: none !important;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}

.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;

cursor: pointer;
}

.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}

.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}

.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}

.slick-dots li button:before {
content: " ";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;

}

.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}

.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}

</style>
{% endblock %}

{% block javascript %}
<script>
eccube.classCategories = {{ class_categories_as_json(Product)|raw }};

// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var $form = $(form);
var product_id = $form.find('input[name=product_id]').val();
var $sele1 = $form.find('select[name=classcategory_id1]');
var $sele2 = $form.find('select[name=classcategory_id2]');
eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
}

{% if form.classcategory_id2 is defined %}
fnSetClassCategories(
$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.classcategory_id1 is defined %}
eccube.checkStock($('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
{% endif %}
</script>
<script>
$(function() {
// bfcache無効化
$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});

$('.item_visual').slick({
dots: false,
arrows: false,
responsive: [{
breakpoint: 768,
settings: {
dots: true
}
}]
});

$('.slideThumb').on('click', function() {
var index = $(this).attr('data-index');
$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
$(function() {
$('.add-cart').on('click', function(event) {
{% if form.classcategory_id1 is defined %}
// 規格1フォームの必須チェック
if ($('#classcategory_id1').val() == '__unselected' || $('#classcategory_id1').val() == '') {
$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
$('#classcategory_id1')[0].setCustomValidity('');
}
{% endif %}

{% if form.classcategory_id2 is defined %}
// 規格2フォームの必須チェック
if ($('#classcategory_id2').val() == '__unselected' || $('#classcategory_id2').val() == '') {
$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
$('#classcategory_id2')[0].setCustomValidity('');
}
{% endif %}

// 個数フォームのチェック
if ($('#quantity').val() < 1) {
$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
return true;
} else {
$('#quantity')[0].setCustomValidity('');
}

event.preventDefault();
$form = $('#form1');
$.ajax({
url: $form.attr('action'),
type: $form.attr('method'),
data: $form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
$.each(data.messages, function() {
$('#ec-modal-header').html(this);
});

$('#ec-modal-checkbox').prop('checked', true);

// カートブロックを更新する
$.ajax({
url: "{{ url('block_cart') }}",
type: 'GET',
dataType: 'html'
}).done(function(html) {
$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
$('.add-cart').prop('disabled', false);
});
});
});
</script>
{% endblock %}

{% block main %}
<div class="ec-productRole">
<div class="ec-grid2">
<div class="ec-grid2__cell w53">
<div class="ec-sliderItemRole">

<div class="item_visual">
{% for ProductImage in Product.ProductImage %}
<div class="slide-item"><img src="{{ asset(ProductImage, 'save_image') }}"></div>
{% else %}
<div class="slide-item"><img src="{{ asset(''|no_image_product, 'save_image') }}"/></div>
{% endfor %}
</div>
<div class="item_nav">
{% for ProductImage in Product.ProductImage %}
<div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}"></div>
{% endfor %}
</div>
</div>
</div>

<div class="item_nav sp_only">
{% for ProductImage in Product.ProductImage %}
<div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}"></div>
{% endfor %}
</div>
<p id="cart_back_btn" class="ec-blockCartAreaBtn pagetop fas fa-shopping-cart-tpde"></p>
<div class="ec-grid2__cell w47" id="cart_area">
<div class="ec-productRole__profile">
{# 商品名 #}
<div class="ec-productRole__title">
<h1 class="ec-headingTitle">{{ Product.name }}</h1>
</div>
<div>
{% set productColor = ProductColorList(Product.id) %}
<ul class="ec-newItemRole__listItemColors">

{% for color in productColor %}
<li style="background: {{ color.HTML }}; border-color: #dcdcdc; "></li>
{% endfor %}
</ul>
</div>

<p class="ec-newItemRole__listItemPrice">
{% if app.user and app.user.customer_rank and app.user.customer_rank.id != 8 %}
{#<div>{{ Product.getCustomerRankPriceIncTaxMin(app.user.customer_rank.id)|price }}</div>#}
<span class="discount_percent">{{app.user.customer_rank.discount_rate}}%</span>
{% endif %}
{% if app.user and app.user.customer_rank and app.user.customer_rank.id != 8 %}
<span>{{ Product.getCustomerRankPriceIncTaxMin(app.user.customer_rank.id)|price }}</span>
<span class="no_discount_price">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}
{% else %}
{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}
</span>
{% else %}
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}
{% else %}
{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}
{% endif %}
</p>


{# 通常価格 #}
{#{% if Product.hasProductClass -%}#}
{# <div class="ec-productRole__priceRegular">#}
{# {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}#}
{# <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}</span></span>#}
{# <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span>#}
{# {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}#}
{# <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>#}
{# <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span>#}
{# {% endif %}#}
{# </div>#}
{#{% else %}#}
{# {% if Product.getPrice01Max is not null %}#}
{# <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>#}
{# <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span>#}
{# {% endif %}#}
{#{% endif %}#}
{# 販売価格 #}
{#<div class="ec-productRole__price">#}
{# {% if Product.hasProductClass -%}#}
{# {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}#}
{# <div class="ec-price">#}
{# <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }}</span>#}
{# <span class="ec-price__tax">{{ '税込'|trans }}</span>#}
{# </div>#}
{# {% else %}#}
{# <div class="ec-price">#}
{# <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>#}
{# <span class="ec-price__tax">{{ '税込'|trans }}</span>#}
{# </div>#}
{# {% endif %}#}
{# {% else %}#}
{# <div class="ec-price">#}
{# <span class="ec-price__price">{{ Product.getPrice02IncTaxMin|price }}</span>#}
{# <span class="ec-price__tax">{{ '税込'|trans }}</span>#}
{# </div>#}
{# {% endif %}#}
{#</div>#}
{# 商品コード #}
{% if Product.code_min is not empty %}
<div class="ec-productRole__code">
{{ '商品コード'|trans }}: <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
</div>
{% endif %}


<form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
{% if Product.stock_find %}
<div class="ec-productRole__actions">
{% if form.classcategory_id1 is defined %}
<div class="ec-select">
{{ form_widget(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class="ec-select">
{{ form_widget(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class="ec-numberInput"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</div>
</div>
<div class="ec-productRole__btn cart_btn">
<button type="submit" class="ec-blockBtn--action add-cart">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% else %}
<div class="ec-productRole__btn cart_btn">
<button type="button" class="ec-blockBtn--action zero" disabled="disabled">
{{ '品切れ中です'|trans }}
</button>
</div>
{% endif %}

{{ form_rest(form) }}
</form>
<div class="clearfix">
<div class="ec-modal ">
<input type="checkbox" id="ec-modal-checkbox" class="checkbox">
<div class="ec-modal-overlay">
<label for="ec-modal-checkbox" class="ec-modal-overlay-close"></label>
<div class="ec-modal-wrap">
<label for="ec-modal-checkbox" class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></label>
<div id="ec-modal-header" class="text-center">{{ 'カートに追加しました。'|trans }}</div>
<div class="ec-modal-box">
<div class="ec-role">
<label for="ec-modal-checkbox" class="ec-inlineBtn--cancel">{{ 'お買い物を続ける'|trans }}</label>
<a href="{{ url('cart') }}" class="ec-inlineBtn--action">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
{% if BaseInfo.option_favorite_product %}
<form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post" class="favorite_form">
<div class="ec-productRole__btn fav_btn">
{% if is_favorite == false %}
<button type="submit" id="favorite" class="ec-blockBtn--cancel fa-heart fa">
{#{{ ''|trans }}#}
<img src="/html/user_data/assets/img/common/heart_off.jpg">
</button>
{% else %}
<button type="submit" id="favorite" class="ec-blockBtn--cancel comp fa-heart fa"
disabled="disabled">
{#{{ ''|trans }}#}
<img src="/html/user_data/assets/img/common/heart_on.jpg">
</button>
{% endif %}
</div>
</form>
{% endif %}
</div>

<div class="ec-productRole__description pd30">{{ Product.description_detail|raw|nl2br }}</div>

{# 髢「騾」繧ォ繝・ざ繝ェ #}
{#{% if Product.ProductCategories is not empty %}
<div class="ec-productRole__category">
<div>{{ '髢「騾」繧ォ繝・ざ繝ェ'|trans }}</div>
{% for ProductCategory in Product.ProductCategories %}
<ul>
<li>
{% for Category in ProductCategory.Category.path %}
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}
<span>・・/span>{% endif -%}
{% endfor %}
</li>
</ul>
{% endfor %}
</div>
{% endif %}
#}


<p>関連タグ</p>
<ul class="ec-productRole__tags">
{% for Tag in Product.Tags %}
<li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
{% endfor %}
</ul>

{% if Product.freearea %}
<div class="ec-productRole__description">
{{ include(template_from_string(Product.freearea)) }}
</div>
{% endif %}

</div>
</div>
</div>

</div>
<style>
.ec-productRole .ec-productRole__tags {
border-bottom: none;
}
.ec-productRole .ec-productRole__tag {
margin-bottom: 5px
}

.ec-newItemRole__listItemColors {
list-style: none;
display: flex;
justify-content: start;
padding-left: 0;
margin-bottom: 5px;
}
.ec-newItemRole__listItemColors li {
width: 12px;
height: 12px;
border: 1px solid #000;
border-radius: 50%;
margin-right: 5px;
}
#hsd_same_category_area .item_name {
font-size: 14px;
}
#hsd_same_category_area .item_comment {
display: none;
}
</style>


{% if app.user and app.user.customer_rank and app.user.customer_rank.id != 8 %}
<script>
$(function() {
console.log(document.getElementById("quantity"));
var $quantity = document.getElementById("quantity");
$quantity.min = 1;
$quantity.value = 1;
});

</script>
{% endif %}
{% endblock %}
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
 » 商品詳細ページ 規格2の内容が表示されない不具合 melonsoda 2022/9/9 19:55
     Re: 商品詳細ページ 規格2の内容が表示されない不具合 sfujiya 2022/9/12 11:24
       Re: 商品詳細ページ 規格2の内容が表示されない不具合 melonsoda 2022/9/12 12:03
         Re: 商品詳細ページ 規格2の内容が表示されない不具合 sfujiya 2022/9/12 14:40
           Re: 商品詳細ページ 規格2の内容が表示されない不具合 melonsoda 2022/9/12 15:13

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,676名です
総投稿数は109,930件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2311
5
umebius
2085
6
yuh
1819
7
h_tanaka
1638
8
red
1569
9
mcontact
1279
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.