{#
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 isHasLeftSide = false %}
{% block stylesheet %}
<link rel="stylesheet" href="{{ asset('assets/css/product-detail.css') }}">
<link rel="stylesheet" href="{{ asset('assets/CustomComponent/modal.css') }}">
<style>
.custom-quantity {
border: none;
font-size: 18px;
text-align: center;
}
/* remove number input arrow */
.custom-quantity::-webkit-outer-spin-button,
.custom-quantity::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
.custom-quantity[type=number] {
-moz-appearance: textfield;
}
.custom-quantity[type=number] {
-moz-appearance: textfield;
}
.slick-slider {
margin-bottom: 10px;
}
.slick-dots {
position: absolute;
bottom: -45px;
display: block;
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;
}
.slide-item img {
border-radius: 10px;
object-fit: contain;
max-height: 550px;
height: 550px;
width: 100%;
background-color: #E9E9E9;
}
.ec-sliderItemRole .slideThumb img {
width: 100%;
border-radius: 6px;
height: 133px;
max-height: 133px;
object-fit: contain;
}
.ec-sliderItemRole .slideThumb {
margin-bottom: 0;
width: calc(25% - 7.5px);
}
.ec-sliderItemRole .item_nav {
gap: 10px;
}
.item_nav {
display: flex;
gap: 16px;
flex-wrap: wrap;
}
.slideThumb {
width: calc(25% - 12px);
}
@media screen and (max-width: 1200px) {
.item_nav {
gap: 10px;
}
.slideThumb {
width: calc(25% - 7.5px);
height: 20vw;
}
.slide-item img {
height: auto;
max-height: 500px;
}
}
@media screen and (max-width: 768px) {
.slide-item img {
height: 342px;
}
}
.ec-grid2 {
gap: 10px;
}
.main_button_add_cart, .main_button_add_cart:hover {
background-color: var(--cart-button-color);
}
</style>
{% endblock %}
{% set body_class = 'product_page' %}
{# script #}
{% block javascript %}
<script>
$(document).ready(function() {
$('.item-minus').click(function () {
// Check if button is disabled
if ($(this).hasClass('btn-disabled')) {
return;
}
const $input = $(this).siblings('.quantity-value').find('.custom-quantity');
let current = parseInt($input.val()) || 0;
if (current > 1) {
$input.val(current - 1);
}
});
$('.item-plus').click(function () {
// Check if button is disabled
if ($(this).hasClass('btn-disabled')) {
return;
}
const $input = $(this).siblings('.quantity-value').find('.custom-quantity');
let current = parseInt($input.val()) || 0;
$input.val(current + 1);
});
});
const params = new URLSearchParams(window.location.search);
const imei = params.get('imei');
if (imei) {
$('#user_imei').val(imei);
}
</script>
<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 %}
// Thêm thuộc tính is_country_category cho classcategory select
function addCountryCategoryAttributes() {
// Lấy country_id từ URL
const countryId = params.get('country_id');
console.log('Country ID from URL:', countryId);
console.log('eccube.classCategories:', eccube.classCategories);
if (!countryId) {
console.log('No country_id found in URL');
return; // Không có country_id thì không làm gì
}
let hasSelected = false;
// Thêm thuộc tính cho classcategory_id1
const $select1 = $('select[name=classcategory_id1]');
if ($select1.length) {
console.log('Found select1, checking options...');
$select1.find('option').each(function() {
const $option = $(this);
const optionValue = $option.val();
let isCountryCategoryFlag = false;
if (optionValue && optionValue !== '__unselected') {
isCountryCategoryFlag = isCountryCategory(optionValue);
if (isCountryCategoryFlag && optionValue === countryId) {
console.log('Auto-selecting country category:', optionValue, 'in select1');
$option.prop('selected', true);
hasSelected = true;
}
}
$option.attr('data-is-country-category', isCountryCategoryFlag);
});
// Trigger change event sau khi đã chọn tất cả options
if (hasSelected) {
setTimeout(function() {
$select1.trigger('change');
}, 10);
}
}
// Thêm thuộc tính cho classcategory_id2
const $select2 = $('select[name=classcategory_id2]');
if ($select2.length) {
console.log('Found select2, checking options...');
$select2.find('option').each(function() {
const $option = $(this);
const optionValue = $option.val();
// Kiểm tra xem option này có phải là country category không
let isCountryCategoryFlag = false;
if (optionValue && optionValue !== '__unselected') {
// Kiểm tra xem option này có phải là country category không
isCountryCategoryFlag = isCountryCategory(optionValue);
// Nếu đây là country category và match với country_id, tự động chọn
if (isCountryCategoryFlag && optionValue === countryId) {
console.log('Auto-selecting country category:', optionValue, 'in select2');
$option.prop('selected', true);
hasSelected = true;
}
}
// Thêm thuộc tính data-is-country-category
$option.attr('data-is-country-category', isCountryCategoryFlag);
});
// Trigger change event sau khi đã chọn tất cả options
if (hasSelected) {
setTimeout(function() {
$select2.trigger('change');
}, 10);
}
}
if (hasSelected) {
console.log('Country category auto-selection completed');
}
}
// Function để kiểm tra xem một classcategory có phải là country category không
function isCountryCategory(categoryId) {
if (eccube.classCategories && eccube.classCategories[categoryId]) {
console.log('Category', categoryId, 'found in eccube.classCategories');
return true;
}
return false;
}
// Chạy function khi document ready và sau khi các select đã được khởi tạo
$(document).ready(function() {
// Delay một chút để đảm bảo các select đã được khởi tạo
setTimeout(function() {
addCountryCategoryAttributes();
}, 100);
});
// Custom function to update price display
function updatePriceDisplay(classcat2) {
var $price02 = $('.price02-default');
try {
if (classcat2 && typeof classcat2.price02_inc_tax !== 'undefined' && String(classcat2.price02_inc_tax).length >= 1) {
// Show specific price when category is selected
$price02.text(classcat2.price02_inc_tax_with_currency).addClass('selected');
} else {
// Show range price when no category is selected
var originalPrice = $price02.attr('data-original-price');
if (originalPrice) {
$price02.text(originalPrice).removeClass('selected');
}
}
} catch (e) {
console.log('Error updating price display:', e);
// Fallback to original price
var originalPrice = $price02.attr('data-original-price');
if (originalPrice) {
$price02.text(originalPrice).removeClass('selected');
}
}
}
// Add event listeners for category changes
$(document).ready(function() {
// Listen for category 1 changes
$('select[name=classcategory_id1]').on('change', function() {
var $form = $(this).parents('form');
var product_id = $form.find('input[name=product_id]').val();
var $sele1 = $(this);
var $sele2 = $form.find('select[name=classcategory_id2]');
// Update price display after a short delay to let original function complete
setTimeout(function() {
updatePriceFromCategories(product_id, $sele1.val(), $sele2.val());
}, 150);
});
// Listen for category 2 changes
$('select[name=classcategory_id2]').on('change', function() {
var $form = $(this).parents('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]');
// Update price display after a short delay to let original function complete
setTimeout(function() {
updatePriceFromCategories(product_id, $sele1.val(), $sele2.val());
}, 150);
});
});
// Function to update price based on selected categories
function updatePriceFromCategories(product_id, classcat_id1, classcat_id2) {
try {
// Don't update if categories are not properly selected
if (!classcat_id1 || classcat_id1 === '__unselected' || classcat_id1 === '') {
var $price02 = $('.price02-default');
var originalPrice = $price02.attr('data-original-price');
if (originalPrice) {
$price02.text(originalPrice).removeClass('selected');
}
return;
}
var classcat2;
if (eccube.hasOwnProperty('productsClassCategories')) {
if (eccube.productsClassCategories[product_id] &&
eccube.productsClassCategories[product_id][classcat_id1]) {
classcat2 = eccube.productsClassCategories[product_id][classcat_id1]['#' + classcat_id2];
}
} else {
if (typeof eccube.classCategories[classcat_id1] !== 'undefined') {
classcat2 = eccube.classCategories[classcat_id1]['#' + classcat_id2];
}
}
updatePriceDisplay(classcat2);
} catch (e) {
console.log('Error updating price from categories:', e);
// Fallback to original price
var $price02 = $('.price02-default');
var originalPrice = $price02.attr('data-original-price');
if (originalPrice) {
$price02.text(originalPrice).removeClass('selected');
}
}
}
// Initialize price display when page loads
$(document).ready(function() {
// Store original price if not already stored
var $price02 = $('.price02-default');
if (!$price02.attr('data-original-price')) {
$price02.attr('data-original-price', $price02.text());
}
// Check if any category is selected on page load
var $classcat1 = $('select[name=classcategory_id1]');
var $classcat2 = $('select[name=classcategory_id2]');
// Only update price if categories are properly selected
if ($classcat1.length && $classcat1.val() && $classcat1.val() !== '__unselected') {
// Category 1 is selected, trigger price update
if ($classcat2.length && $classcat2.val() && $classcat2.val() !== '__unselected') {
// Both categories are selected
setTimeout(function() {
updatePriceFromCategories({{ Product.id }}, $classcat1.val(), $classcat2.val());
}, 200);
} else {
// Only category 1 is selected
setTimeout(function() {
updatePriceFromCategories({{ Product.id }}, $classcat1.val(), null);
}, 200);
}
}
});
</script>
<script>
$(function() {
// bfcache無効化
$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため
// img タグに width, height が付与されている.
// 630px 未満の画面サイズでは縦横比が壊れるための対策
// see https://github.com/EC-CUBE/ec-cube/pull/5023
$('.ec-grid2__cell').hide();
var removeSize = function () {
$('.slide-item').height('');
$('.slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
$('.ec-grid2__cell').fadeIn(1500);
var baseHeight = $(slick.target).height();
var baseWidth = $(slick.target).width();
var rate = baseWidth / baseHeight;
$('.slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
$('.slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
$(window).resize(removeSize);
$('.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('{{ 'front.product.product_class_unselected'|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('{{ 'front.product.product_class_unselected'|trans }}');
return true;
} else {
$('#classcategory_id2')[0].setCustomValidity('');
}
{% endif %}
// 個数フォームのチェック
if ($('#quantity').val() < 1) {
$('#quantity')[0].setCustomValidity('{{ 'front.product.invalid_quantity'|trans }}');
return true;
} else {
$('#quantity')[0].setCustomValidity('');
}
// IMEIフォームのチェック
{% if Product.hasUserImeiCategory %}
if (!$('#user_imei').length || $('#user_imei').val() == '') {
if ($('#user_imei').length) {
$('#user_imei')[0].setCustomValidity('{{ 'front.cart.user_imei_required'|trans }}');
} else {
alert('{{ 'front.cart.user_imei_required'|trans }}');
}
return true;
} else {
if ($('#user_imei').length) {
$('#user_imei')[0].setCustomValidity('');
}
}
{% endif %}
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) {
if (data.error_code == 'OUT_OF_STOCK_ZERO' || data.error_code == 'OUT_OF_STOCK') {
alert('この商品の在庫は残り' + data.stock_left + 'です。');
} else if (data.error_code == 'DUPLICATE_IMEI') {
alert('{{ 'front.shopping.duplicate_imei'|trans }}');
} else {
// カートブロックを更新する
$.ajax({
url: "{{ url('block_cart') }}",
type: 'GET',
dataType: 'html'
}).done(function(html) {
$('.ec-headerRole__cart').html(html);
});
// Hiển thị popup thông báo thành công sử dụng ModalComponent
if (window.ModalUtils) {
window.ModalUtils.showSuccess('cart-success-modal',
'{{ 'front.modal.cart_success.title'|trans({}, 'messages') }}',
'{{ 'front.modal.cart_success.message'|trans({}, 'messages') }}'
);
} else {
// Fallback nếu ModalComponent chưa load
alert('{{ 'front.modal.cart_success.title'|trans({}, 'messages') }}');
}
}
}).fail(function(data) {
alert('{{ 'front.product.add_cart_error'|trans }}');
}).always(function(data) {
// Buttonを有効にする
$('.add-cart').prop('disabled', false);
});
});
});
// Modal events are now handled by ModalComponent
</script>
<script src="{{ asset('assets/CustomComponent/modal.js') }}"></script>
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "{{ Product.name }}",
"image": [
{% for img in Product.ProductImage %}
"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}
{% else %}
"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"
{% endfor %}
],
"description": "{{ Product.description_list | default(Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",
{% if Product.code_min %}
"sku": "{{ Product.code_min }}",
{% endif %}
"offers": {
"@type": "Offer",
"url": "{{ url('product_detail', {'id': Product.id}) }}",
"priceCurrency": "{{ eccube_config.currency }}",
"price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
"availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"
}
}
</script>
{% endblock %}
{% block main %}
<!-- breadcrumb section -->
<div class="breadcrumb-section">
<div class="container-1360 border-box px-40">
<nav class="breadcrumb">
<a href="{{ url('homepage') }}" class="breadcrumb__item text-black">ホーム</a>
<img src="{{ asset('assets/img/default/icons/icon-breadcrumb-arrow.svg') }}" alt=">" class="breadcrumb__separator">
<a href="{{ url('product_list') }}" class="breadcrumb__item text-black">商品一覧</a>
<img src="{{ asset('assets/img/default/icons/icon-breadcrumb-arrow.svg') }}" alt=">" class="breadcrumb__separator">
<span class="breadcrumb__item breadcrumb__item--current text-black">{{ Product.name }}</span>
</nav>
</div>
</div>
<!-- product detail section -->
<div class="product-detail-section container-1200">
<div class="product-detail-wrapper">
<div class="product-detail-left">
<!-- Main gallery (using existing slick) -->
<div class="item_visual">
{% for ProductImage in Product.ProductImage %}
<div class="slide-item"><img src="{{ asset(ProductImage, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" width="550" height="550"{% if loop.index > 1 %} loading="lazy"{% endif %}></div>
{% else %}
<div class="slide-item"><img src="{{ asset(''|no_image_product, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" width="550" height="550"></div>
{% endfor %}
</div>
<!-- Thumbs below -->
<div class="product-detail-left-bottom">
<div class="item_nav">
{% for ProductImage in Product.ProductImage %}
<div class="slideThumb" data-index="{{ loop.index0 }}">
<div class="product-thumbnail"><img src="{{ asset(ProductImage, 'save_image') }}" alt="" width="133" height="133" loading="lazy"></div>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="product-detail-right">
<!-- Product Title -->
<h1 class="product-title">{{ Product.name }}</h1>
<!-- Product Price -->
<div class="product-price">
{% if Product.hasProductClass -%}
<span class="product-price-value price02-default text-color-primary" data-original-price="{{ Product.getPrice02IncTaxMin|price }}{% if Product.getPrice02IncTaxMin != Product.getPrice02IncTaxMax %} ~ {{ Product.getPrice02IncTaxMax|price }}{% endif %}">{{ Product.getPrice02IncTaxMin|price }}{% if Product.getPrice02IncTaxMin != Product.getPrice02IncTaxMax %} ~ {{ Product.getPrice02IncTaxMax|price }}{% endif %}</span>
{% else %}
<span class="product-price-value price02-default text-color-primary" data-original-price="{{ Product.getPrice02IncTaxMin|price }}">{{ Product.getPrice02IncTaxMin|price }}</span>
{% endif %}
</div>
<!-- Quantity and Add to Cart -->
<form method="post" id="form1" action="{{ url('product_add_cart', {'id': Product.id}) }}">
<div class="product-quantity-wrapper">
{% if Product.stock_find %}
<div class="product-quantity-left">
<div class="btn-group__header group__header-mobile mb-12">数量</div>
{{ form_widget(form._token) }}
{{ form_widget(form.product_id) }}
{{ form_widget(form.ProductClass) }}
{% if form.classcategory_id1 is defined %}
<div class="classcategory-wrapper" data-category-type="1">
{{ form_widget(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% endif %}
{% if form.classcategory_id2 is defined %}
<div class="classcategory-wrapper" data-category-type="2">
{{ form_widget(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
<div class="product-quantity">
<button type="button" class="quantity-btn quantity-btn--minus item-minus{% if Product.getProductType() == constant('Eccube\\Entity\\Product::PRODUCT_TYPE_DATA_PACKAGE') %} btn-disabled{% endif %}">
<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><rect y="5" width="12" height="2" fill="#333333"/></svg>
</button>
<div class="quantity-value">
{{ form_widget(form.quantity, {
'attr': {
'class': 'custom-quantity hide-number-input h-100 bg-white',
'readonly': 'readonly',
}
}) }}
</div>
<button type="button" class="quantity-btn quantity-btn--plus item-plus{% if Product.getProductType() == constant('Eccube\\Entity\\Product::PRODUCT_TYPE_DATA_PACKAGE') %} btn-disabled{% endif %}">
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 5H12V7H7V12H5V7H0V5H5V0H7V5Z" fill="#333333"/></svg>
</button>
{{ form_errors(form.quantity) }}
</div>
</div>
<!-- Add to Cart Button -->
<button type="submit" class="btn-add-to-cart add-cart">
<span>カートに入れる</span>
<div class="btn-add-to-cart__icon">
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.252 6.00098L10.249 6.00391L10.252 6.00684L5.72656 10.5312L4.5957 9.40039L7.19434 6.80273H1.72852V5.20312H7.19238L4.5957 2.60742L5.72656 1.47656L10.252 6.00098Z" fill="#FBE800"/></svg>
</div>
</button>
{% else %}
<!-- button out of stock -->
<button class="btn-add-to-cart btn-add-to-cart--out-of-stock" disabled="disabled">
<span>{{ 'front.product.out_of_stock'|trans }}</span>
</button>
{% endif %}
</div>
{% if form.user_imei is defined %}
<div class="user-imei-form mt-4">
<div class="btn-group__header group__header-mobile mb-12">IMEI番号</div>
{{ form_widget(form.user_imei) }}
{{ form_errors(form.user_imei) }}
</div>
{% endif %}
</form>
<!-- Divider -->
<div class="product-divider"></div>
<!-- Product Description Section -->
<div class="btn-group__header mb-16">商品説明</div>
<div class="product-description">
{{ Product.description_detail | nl2br }}
</div>
{% if Product.product_note is not empty %}
<div class="btn-group__header mb-16">備考</div>
<div class="product-remarks">{{ Product.product_note | nl2br }}</div>
{% endif %}
</div>
</div>
<!-- border bottom -->
<div class="product-detail-border-bottom"></div>
<!-- btn bottom -->
<div class="btn-bottom">
<button class="btn-return" onclick="history.back()">
<div class="btn-return__icon">
<svg width="9" height="10" viewBox="0 0 9 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 4.52441L0.00292969 4.52734L0 4.53027L4.52539 9.05469L5.65625 7.92383L3.05762 5.32617H8.52344V3.72656H3.05957L5.65625 1.13086L4.52539 0L0 4.52441Z" fill="#FBE800"/></svg>
</div>
<span>前のページに戻る</span>
</button>
</div>
</div>
<!-- Modal -->
{% include 'CustomComponent/modal.twig' with {
id: 'cart-success-modal',
title: 'front.modal.cart_success.title'|trans({}, 'messages'),
message: 'front.modal.cart_success.message'|trans({}, 'messages'),
showCancelButton: true,
cancelText: 'front.modal.cart_success.cancel_text'|trans({}, 'messages'),
showActionButton: true,
actionText: 'front.modal.cart_success.action_text'|trans({}, 'messages'),
actionUrl: url('cart'),
autoRedirect: false,
redirectUrl: '',
redirectDelay: 0,
reloadOnCancel: true,
reloadOnError: false
} %}
<script>
// slick js
$(document).ready(function() {
$('.item_visual').slick({
dots: false,
arrows: false,
responsive: [{
breakpoint: 768,
settings: {
dots: false
}
}]
});
$('.slideThumb').on('click', function() {
var index = $(this).attr('data-index');
$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
{% endblock %}