app/template/user_data/index.twig line 1

Open in your IDE?
  1. {% extends '@user_data/layout/default_frame.twig' %}
  2. {% block title %}
  3. カンバッチ製作【個人小ロットから業務用OEMまで激安印刷】ZEAMI Goods
  4. {% endblock %}
  5. {% block js %}
  6. <link href="{{ asset('assets/js/swiper/swiper.css') }}" rel="stylesheet" type="text/css">
  7. <link href="{{ asset('assets/custom_css/slide_campaign.css') }}" rel="stylesheet" type="text/css">
  8. <script src="{{ asset('assets/js/swiper/swiper.min.js') }}"></script>
  9. <script src="{{ asset('assets/js/top.js') }}" type="text/javascript"></script>
  10. <script>
  11. document.addEventListener('DOMContentLoaded', function () {
  12. document.getElementById('search-form').addEventListener('submit', function (event) {
  13. event.preventDefault();
  14. var form = this;
  15. window.location.hash = 'Item';
  16. setTimeout(function () {
  17. HTMLFormElement.prototype.submit.call(form)
  18. }, 0);
  19. });
  20. });
  21. $(document).ready(function () {
  22. let form = document.getElementById('search-form');
  23. $('input[name="category"]').change(function () {
  24. window.location.hash = 'Item';
  25. HTMLFormElement.prototype.submit.call(form)
  26. });
  27. $('input[type="checkbox"]').change(function () {
  28. window.location.hash = 'Item';
  29. HTMLFormElement.prototype.submit.call(form)
  30. });
  31. });
  32. </script>
  33. {% endblock %}
  34. {% block content %}
  35. <!-- ▼▼ MAIN CONTENTS __________________________________________________________________________________________________ ▼▼ -->
  36. <main
  37. id="mainContents">
  38. <!-- // == FIRST VIEW ================================================================================ // -->
  39. <section id="firstView" class="fades">
  40. <article id="viewContainer" class="swiper-container view_campaign">
  41. <ul id="first_viewList" class="swiper-wrapper">
  42. {% for campaign in campaigns %}
  43. <!-- \\ ☆☆ ONE SLIDE ☆☆ \\ -->
  44. <li class="swiper-slide">
  45. <a href="/campaign_detail/{{ campaign.id }}">
  46. <img src="{{ asset(campaign.image|no_image_product, 'save_image') }}">
  47. </a>
  48. </li>
  49. <!-- // ☆☆ ONE SLIDE ☆☆ // -->
  50. {% endfor %}
  51. </ul>
  52. <!-- //// ++++ #first_viewList ++++ //// -->
  53. <div class="swiper-pagination fades"></div>
  54. <!-- ///// #viewContainer +++++ ///// -->
  55. </article>
  56. </section>
  57. <!-- ///// +++++ #firstView +++++ ///// -->
  58. <!-- // == 受注状況 ================================================================================ // -->
  59. <section id="Status" class="section_basic fades">
  60. {% if(season) %}
  61. <!-- // ++ 通常時 ++ //////////////////////////////////////////////////////// -->
  62. <aside id="order_statusBox" class="fades">
  63. <div class="custom_inner">
  64. <h4 id="statusHeadline" class="up">現在の受注状況</h4>
  65. <div id="orderStatus" class="{{season.code == 'peak_season' ? 'limit' : ''}} up">
  66. <p>{{season.note}}</p>
  67. <!-- //// ++++ #orderStatus ++++ //// -->
  68. </div>
  69. </div>
  70. </aside>
  71. {% endif %}
  72. <!-- ///// #order_statusBox +++++ ///// -->
  73. </section>
  74. <!-- ///// +++++ #Status +++++ ///// -->
  75. <!-- // == トピックス ================================================================================ // -->
  76. <section id="Topics" class="fades">
  77. <article id="topicsContainer" class="swiper-container top_news">
  78. <ul id="topicsList" class="swiper-wrapper">
  79. {% for news in newsList %}
  80. <!-- \\ ☆☆ ONE TOPICS ☆☆ \\ -->
  81. {% if news.is_notification != true and news.is_notification != 1 %}
  82. <li class="swiper-slide">
  83. <a href="news_article/{{ news.id}}">
  84. <img src="{{ asset('assets/img/top/top_news_thumb.gif') }}" style="background-image: url('{{ asset(news.image|no_image_product, 'save_image') }}');" class="topics_photo">
  85. <div class="topics_titlebox">
  86. <h5 class="top_topicstitle ">{{news.title}}</h5>
  87. <p class="topics_update ">{{ news.publish_date|date('Y.m.d D') }}</p>
  88. <!-- //// **** .topics_titlebox ***** //// -->
  89. </div>
  90. </a>
  91. </li>
  92. {% endif %}
  93. <!-- // ☆☆ ONE TOPICS ☆☆ // -->
  94. {% endfor %}
  95. </ul>
  96. <!-- //// ++++ #topicsList ++++ //// -->
  97. <!-- ///// #newsContainer +++++ ///// -->
  98. </article>
  99. <!-- // ++ 最新ニュース ++ //////////////////////////////////////////////////////// -->
  100. <div id="latest_newsArea" class="fades">
  101. <dl id="whats_newContainer">
  102. <dt>
  103. <p class="up">お知らせ</p>
  104. </dt>
  105. <dd>
  106. {% if newsNoti is not null %}
  107. <div id="wtn_titleBox">
  108. <span id="wtnDate" class="up">{{ newsNoti.publish_date|date('Y.m.d') }}</span>
  109. <h5 id="wthTitle" class="up">
  110. <a href="/news_article/{{ newsNoti.id }}">{{ newsNoti.title }}</a>
  111. </h5>
  112. </div>
  113. {% endif %}
  114. </dd>
  115. </dl>
  116. <!-- //// ++++ #whats_newContainer ++++ //// -->
  117. <!-- ///// #latest_newsArea +++++ ///// -->
  118. </div>
  119. </section>
  120. <!-- ///// +++++ #Topics +++++ ///// -->
  121. <!-- // == 大口注文 ================================================================================ // -->
  122. <section id="largeOrder" class="fades">
  123. <div class="custom_inner">
  124. <aside id="info_bnrArea">
  125. <h4 id="info_bnrTitle">大口注文<p>特別注文窓口のご案内</p>
  126. </h4>
  127. <p id="btn_infoBnr">
  128. <a href="/inquiry">詳しく見る</a>
  129. </p>
  130. <!-- ///// #info_bnrArea +++++ ///// -->
  131. </aside>
  132. </div>
  133. </section>
  134. <!-- ///// +++++ #largeOrder +++++ ///// -->
  135. <!-- // == アイテム一覧 ================================================================================ // -->
  136. <section id="Item" class="section_basic fades">
  137. <h3 class="top_section_title" class="up">アイテム一覧<p class="up">以下のカテゴリーを選択してください</p>
  138. </h3>
  139. <form
  140. action="" id="search-form">
  141. <!-- // ++ カテゴリーリンク ++ /////////////////////////////////////////////////////// -->
  142. <div id="item_categoryBox">
  143. <ul id="item_categoryList" class="fades">
  144. <li class="up on">
  145. <label class="up"><input type="radio" {{ form.category_id == '' ? 'checked' : '' }} name="category" value="" class="input_cat"><span class="item_cat_name">全て</span>
  146. </label>
  147. </li>
  148. {% for cate in categories %}
  149. <li class="up">
  150. <label class="up"><input type="radio" name="category" {{ cate.id == form.category_id ? 'checked' : '' }} value="{{ cate.id }}" class="input_cat"><span class="item_cat_name">{{cate.name}}</span>
  151. </label>
  152. </li>
  153. {% endfor %}
  154. </ul>
  155. <!-- //// ++++ #item_categoryList ++++ //// -->
  156. <!-- ///// #item_categoryList +++++ ///// -->
  157. </div>
  158. <!-- // ++ カテゴリーリンク ++ /////////////////////////////////////////////////////// -->
  159. <div id="searchboxArea" class="input_content fades">
  160. <div class="search_inner">
  161. <dl id="searchBox" class="fades">
  162. <dt class="up"><input type="text" name="name" value="{{ form.name }}" placeholder="キーワード検索" class="form_txt"></dt>
  163. <dd class="up"><input type="submit" name="submit" value="submit" class="btn_search"></dd>
  164. <!-- //// ++++ #searchBox ++++ //// -->
  165. </dl>
  166. <ul id="search_checkList" class="fades">
  167. {% for tag in tags %}
  168. <li class="up">
  169. <label class="up"><input type="checkbox" {{ tag.id in form.tags ? 'checked' : '' }} name="tags[]" value="{{tag.id}}" id=""/><span class="check_text">{{tag.name}}</span>
  170. </label>
  171. </li>
  172. {% endfor %}
  173. <!-- //// ++++ #search_checkList ++++ //// -->
  174. </ul>
  175. </div>
  176. <!-- //// **** .search_inner **** //// -->
  177. <!-- ///// #searchboxArea +++++ ///// -->
  178. </div>
  179. <!-- // ++ アイテム一覧 ++ /////////////////////////////////////////////////////// -->
  180. <article id="item_listConainer">
  181. <ul id="top_itemList">
  182. {% for product in products %}
  183. {% set firstCategory = product.productCategories|first %}
  184. <!-- \\ ☆☆ ONE ITEM ☆☆ \\-->
  185. <li class="one_item up">
  186. <a href="/product/{{ product.id }}">
  187. <dl class="top_item_body">
  188. <dt class="top_itemthumb up">
  189. <img src="{{ asset('assets/img/space.gif') }}" style="background-image:url('{{ asset(product.mainFileName|no_image_product, 'save_image') }}');">
  190. </dt>
  191. <!-- //// .top_itemthumb **** //// -->
  192. <dd class="top_iteminfobox">
  193. <h4 class="top_itemname up">
  194. {{ firstCategory ? firstCategory.Category.name : '' }}
  195. {{product.name}}</h4>
  196. <p class="top_itemprice up">
  197. <span>1枚あたり</span>
  198. {{ product.price02_min|price }}
  199. {% if product.price02_min != product.price02_max %}
  200. {{ 'admin.common.separator__range'|trans }}{{ product.price02_max|price }}
  201. {% endif %}〜</p>
  202. </dd>
  203. <!-- //// .top_iteminfobox **** //// -->
  204. <!-- //// **** .top_item_body **** //// -->
  205. </dl>
  206. </a>
  207. </li>
  208. <!-- // ☆☆ ONE ITEM ☆☆ // -->
  209. {% endfor %}
  210. </ul>
  211. <!-- //// ++++ #top_itemList ++++ //// -->
  212. <!-- ///// #item_listConainer +++++ ///// -->
  213. </article>
  214. </form>
  215. </section>
  216. <!-- ///// +++++ #Item +++++ ///// -->
  217. <!-- // == アイテム一覧 ================================================================================ // -->
  218. <section id="Coupon" class="section_basic fades">
  219. <h3 class="top_section_title" class="up">現在配布中のクーポン</h3>
  220. <aside id="top_couponBox">
  221. <ul id="use_Coupon" class="customer_check_list up">
  222. {% for Coupon in couponPro %}
  223. <!-- ☆☆ CHECK ONE ☆☆-->
  224. <li class="one_check type_check">
  225. <aside class="coupon_box type-{{Coupon.CouponKind.id == 2 ? 'percent' : 'yen'}}_off">
  226. <div class="coupon_titlebox">
  227. <p class="tiny">{{Coupon.coupon_name}}</p>
  228. <h5 class="coupon_title">{{Coupon.CouponKind.id == 2 ? Coupon.discount_rate : (Coupon.discount_price | round )}}{{Coupon.CouponKind.id == 2 ? '%':'円'}}
  229. OFF</h5>
  230. </div>
  231. <!-- /// .coupon_titlebox *** /// -->
  232. <div class="coupon_main">
  233. <p class="coupon_caution">有効期限:{{ Coupon.available_to|date('Y年n月j日') }}まで</p>
  234. <div class="coupon-wrap-list-sub">
  235. <div>
  236. <dl class="coupon_detail">
  237. <dt>{{ 'front.mypage.coupon.terms_of_use'|trans }}</dt>
  238. <dd>
  239. {% set useConditions = [] %}
  240. {% if Coupon.issued %}
  241. {% set useConditions = useConditions|merge(['front.mypage.coupon.issued_format'|trans({'%issued%':Coupon.issued})]) %}
  242. {% endif %}
  243. {% if Coupon.min_price %}
  244. {% set useConditions = useConditions|merge([Coupon.min_price|number_format~'front.mypage.coupon.min_price_format'|trans]) %}
  245. {% endif %}
  246. {% if Coupon.customer_available %}
  247. {% set useConditions = useConditions|merge(['front.mypage.coupon.customer_available'|trans({'%customer_available%':Coupon.customer_available})]) %}
  248. {% endif %}
  249. {% if useConditions is empty %}
  250. {{ 'front.mypage.coupon.terms_of_use.nothing'|trans }}
  251. {% else %}
  252. {{ useConditions|join('、') }}
  253. {% endif %}
  254. </dd>
  255. </dl>
  256. <dl class="coupon_detail">
  257. <dt>{{ 'front.mypage.coupon.target_category'|trans }}</dt>
  258. <dd>
  259. {% if Coupon.getTargetCategories is not empty %}
  260. {% for CategoryId, CategoryName in Coupon.getTargetCategories|slice(0, 3, true) %}
  261. {% if not loop.first %}
  262. {% endif %}
  263. <object>{{ CategoryName }}</object>
  264. {% endfor %}
  265. {% if Coupon.getTargetCategories | length > 3 %}
  266. など
  267. {% endif %}
  268. {% else %}
  269. {{ 'front.mypage.coupon.terms_of_use.nothing'|trans }}
  270. {% endif %}
  271. </dd>
  272. </dl>
  273. <dl class="coupon_detail">
  274. <dt>{{ 'common.coupon.target_product'|trans }}</dt>
  275. <dd>
  276. {% if Coupon.getTargetProducts is not empty %}
  277. {% for ProductId, ProductName in Coupon.getTargetProducts|slice(0, 3, true) %}
  278. {% if not loop.first %}
  279. {% endif %}
  280. {% if isUsed %}
  281. <object>{{ ProductName }}</object>
  282. {% else %}
  283. <object>
  284. <a class="coupon-wrap-list-sub-link" href="{{ url('product_detail', {'id' : ProductId }) }}">
  285. {{ ProductName }}
  286. </a>
  287. </object>
  288. {% endif %}
  289. {% endfor %}
  290. {% if Coupon.getTargetProducts | length > 3 %}
  291. など
  292. {% endif %}
  293. {% else %}
  294. {{ 'front.mypage.coupon.terms_of_use.nothing'|trans }}
  295. {% endif %}
  296. </dd>
  297. </dl>
  298. </div>
  299. </div>
  300. <!-- /// .coupon_main *** /// -->
  301. <!-- /// *** .coupon_box *** /// -->
  302. </aside>
  303. </li>
  304. {% endfor %}
  305. <!-- /// *** .customer_check_list *** /// -->
  306. </ul>
  307. <!-- //// ++++ #top_couponBox ++++ //// -->
  308. </aside>
  309. </section>
  310. <!-- ///// #Coupon +++++ ///// -->
  311. <!-- ///// +++++ #mainContents +++++ ///// -->
  312. </main>
  313. {% endblock %}