バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

プラグイン > バグ報告・利用に関する質問 > 定休日カレンダープラグイン(EC-CUBE3系)1.0.5 で不要行が表示される

バグ報告・利用に関する質問

新規スレッドを追加する

スレッド表示 | 古いものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
alpin
投稿日時: 2018/4/17 17:27
対応状況: −−−
新米
登録日: 2018/4/13
居住地:
投稿: 2
Re: 定休日カレンダープラグイン(EC-CUBE3系)1.0.5 で不要行が表示される
返信ありがとうございます。

4月が終わる前に解決できるよういろいろやってみます。
468
投稿日時: 2018/4/16 11:00
対応状況: −−−
登録日: 2008/10/26
居住地:
投稿: 3217
Re: 定休日カレンダープラグイン(EC-CUBE3系)1.0.5 で不要行が表示される
roop_weekを計算しているところで判定が誤っていると思われますので、
ロジック中で変数を表示させたりして、デバッグされては如何でしょうか?


----------------
株式会社シロハチ
■ECCUBE2系、3系構築カスタマイズご相談ください。
EC-CUBE3マニュアル
blog

alpin
投稿日時: 2018/4/13 15:19
対応状況: −−−
新米
登録日: 2018/4/13
居住地:
投稿: 2
定休日カレンダープラグイン(EC-CUBE3系)1.0.5 で不要行が表示される
EC-CUBE 3.0.15
サーバーOS Linux
DBサーバー MySQL 5.6.23
WEBサーバー Apache
PHP 5.4.45

[現象]
定休日カレンダープラグイン(EC-CUBE3系)1.0.5 で不要行が表示されます
2018/4の表は本来5行でいいのですが、6行表示されてしまいます
6行目は全部空白カラムです

「ec-cube 3.0.15をサポートしていないため、正常に動作しない可能性があります」
とありますのでそのせいかもしれませんが、なんとか対応できればと思っています

よろしくお願いします

以下、ブロック内ソースです

{# CSSの初期設定読込 #}
<link rel="stylesheet" href="{{ app.config.front_urlpath }}/css/pg_calendar.css">
<dl id="fCal">
<dt><a href="#" class="disabled">営業日カレンダー<span class="spOnlyIL">・営業日・時間帯</span></a><span class="btnTrig">+</span></dt>
<dd>
<div id="calendar" class="calendar">
{% for roop in 0..(HolidayConfig['0']['config_data']-1) %}
{% set day = date('first day of this month') %}
{% set month = day|date_modify("+" ~ roop ~ " month")|date('n') %}
{% set year = day|date_modify("+" ~ roop ~ " month")|date('Y') %}

{% if (month != "1") %}
{% set roop_week = day|date_modify("+" ~ (roop+1) ~ " month")|date_modify('-1 day')|date('W') - day|date_modify(year ~ "-" ~ month ~ "-" ~ "01")|date('W') %}
{% else %}
{% set roop_week = day|date_modify("+" ~ (roop+1) ~ " month")|date_modify('-1 day')|date('W') - 1 %}
{% endif %}

{% if ((day|date_modify("+" ~ (roop+1) ~ " month")|date_modify('-1 day')|date('w')) == "0") %}
{% set roop_week = (roop_week+1) %}
{% endif %}
{% set day = day|date_modify("+" ~ roop ~ " month")|date_modify('-' ~ day|date_modify("+" ~ roop ~ " month")|date('w') ~ 'days') %}

<table>
<caption>{{ year }}年{{ month }}月の定休日</caption>
<thead><tr><th id="sunday">日</th><th>月</th><th>火</th><th>水</th><th>木</th><th>金</th><th id="saturday">土</th></tr></thead>
<tbody>
{% for i in (0..roop_week) %}
<tr>
{% for j in (0..6) %}
{% if day|date('n') == month %}
{% if HolidayWeek[j] %}
<td class="holiday">{{ day|date('j') }}</td>
{% else %}
{% if Holidays[month][day|date('j')] is defined and Holidays[month][day|date('j')] is not empty %}
<td class="holiday">{{ day|date('j') }}</td>
{% else %}
<td>{{ day|date('j') }}</td>
{% endif %}
{% endif %}
{% else %}
<td>&nbsp;</td>
{% endif %}
{% set day = day|date_modify('+1day') %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
<p class="txtsl marB20"><span class="tCol01">赤文字</span>・・・休業日</p>
</div>
</dd>
</dl>
スレッド表示 | 古いものから 前のトピック | 次のトピック | トップ


 



ログイン


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

統計情報

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

投稿数ランキング

1
seasoft
7365
2
468
3217
3
AMUAMU
2712
4
nanasess
2303
5
umebius
2085
6
yuh
1818
7
h_tanaka
1610
8
red
1567
9
mcontact
1240
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
796
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.