first commit
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
Warehouse 4.4.2
|
||||
Nova Fashion Store Version 2.0.11
|
||||
Marcus Furniture & Home Decor Version 2.1.1
|
||||
jms_yanka Version 1
|
||||
Ayon Version 2.6.0
|
||||
Ecolife Cosmetic 2
|
||||
Leo Vegan Versión 1.0.0
|
||||
@@ -0,0 +1,311 @@
|
||||
{**
|
||||
* PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{$product_price = $product.price|regex_replace:'/[^0-9,.]+/':''}
|
||||
{$currency = $product.price|regex_replace:'/[A-Za-z0-9.,]+/':''}
|
||||
{$unit_price = $product_price|floatval / $dimension_quantity|floatval}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<div class="product-line-grid row">
|
||||
<!-- product line left content: image-->
|
||||
<div class="product-line-grid-left col-md-3 col-xs-4">
|
||||
<span class="product-image media-middle">
|
||||
{if $product.cover}
|
||||
<img src="{$product.cover.bySize.cart_default.url}" alt="{$product.name|escape:'quotes'}">
|
||||
{else}
|
||||
<img src="{$urls.no_picture_image.bySize.cart_default.url}" />
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- product line body: label, discounts, price, attributes, customizations -->
|
||||
<div class="product-line-grid-body col-md-4 col-xs-8">
|
||||
<div class="product-line-info">
|
||||
<a class="label" href="{$product.url}" data-id_customization="{$product.id_customization|intval}">{$product.name}</a>
|
||||
</div>
|
||||
|
||||
<div class="product-line-info product-price h5 {if $product.has_discount}has-discount{/if}">
|
||||
{if $product.has_discount}
|
||||
<div class="product-discount">
|
||||
{* <span class="regular-price">{$product.regular_price}</span> *}
|
||||
{if $product.discount_type === 'percentage'}
|
||||
<span class="discount discount-percentage">
|
||||
-{$product.discount_percentage_absolute}
|
||||
</span>
|
||||
{else}
|
||||
<span class="discount discount-amount">
|
||||
-{$product.discount_to_display}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="current-price">
|
||||
<span class="price">{$product.price}</span>
|
||||
{if $product.unit_price_full}
|
||||
{if $dimension_text}
|
||||
<div class="unit-price-cart">{$currency}{$unit_price|string_format:"%.2f"} per {$dimension_unit|escape:'htmlall':'UTF-8'}</div>
|
||||
{else}
|
||||
<div class="unit-price-cart">{$product.unit_price_full}</div>
|
||||
{/if}
|
||||
{* <div class="unit-price-cart">{$product.unit_price_full}</div> *}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{* {if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
<a href="#" data-toggle="modal" data-target="#product-customizations-modal-{$customization.id_customization}">{l s='Product customization' d='Shop.Theme.Catalog'}</a>
|
||||
<div class="modal fade customization-modal" id="product-customizations-modal-{$customization.id_customization}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{l s='Close' d='Shop.Theme.Global'}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">{l s='Product customization' d='Shop.Theme.Catalog'}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{foreach from=$customization.fields item="field"}
|
||||
<div class="product-customization-line row">
|
||||
<div class="col-sm-3 col-xs-4 label">
|
||||
{$field.label}
|
||||
</div>
|
||||
<div class="col-sm-9 col-xs-8 value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if} *}
|
||||
</div>
|
||||
|
||||
<!-- product line right content: actions (quantity, delete), price -->
|
||||
<div class="product-line-grid-right product-line-actions col-md-5 col-xs-12">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 hidden-md-up"></div>
|
||||
<div class="col-md-10 col-xs-5">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-6 col-sp-12 qty">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift-quantity">{$product.quantity}</span>
|
||||
{else}
|
||||
<input
|
||||
class="js-cart-line-product-quantity"
|
||||
style="font-size: 14px;padding:0;"
|
||||
data-down-url="{$product.down_quantity_url}"
|
||||
data-up-url="{$product.up_quantity_url}"
|
||||
data-update-url="{$product.update_quantity_url}"
|
||||
data-product-id="{$product.id_product}"
|
||||
unique-product-id="{$product.id_product|escape:'javascript':'UTF-8'}-{$product.id_product_attribute|escape:'javascript':'UTF-8'}-{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
type="number"
|
||||
value="{if isset($dimension_text)}{$dimension_quantity|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}"
|
||||
name="product-quantity-spin"
|
||||
min="{$product.minimal_quantity}"
|
||||
/>
|
||||
{if isset($dimension_text)}
|
||||
<div class="input-group-append" style="height: 40px;line-height: 40px;float:right;">
|
||||
<span class="input-group-text small-text text-muted">{$dimension_unit|escape:'htmlall':'UTF-8'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-2 col-sp-12 price">
|
||||
<span class="product-price">
|
||||
<strong>
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift">{l s='Gift' d='Shop.Theme.Checkout'}</span>
|
||||
{else}
|
||||
{$product.total}
|
||||
{/if}
|
||||
</strong>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-3">
|
||||
<div class="cart-line-product-actions ">
|
||||
<a
|
||||
class = "remove-from-cart"
|
||||
rel = "nofollow"
|
||||
href = "{$product.remove_from_cart_url}"
|
||||
data-link-action = "delete-from-cart"
|
||||
data-id-product = "{$product.id_product|escape:'javascript'}"
|
||||
data-id-product-attribute = "{$product.id_product_attribute|escape:'javascript'}"
|
||||
data-id-customization = "{$product.id_customization|escape:'javascript'}"
|
||||
>
|
||||
{if !isset($product.is_gift) || !$product.is_gift}
|
||||
<i class="material-icons float-xs-left">delete</i>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{block name='hook_cart_extra_product_actions'}
|
||||
{hook h='displayCartExtraProductActions' product=$product}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
{foreach from=$customization.fields item="field"}
|
||||
{assign var="dimension_text" value=" "|explode:$field.text}
|
||||
<div class="alert medium-alert alert-info" style="width: 100%;">
|
||||
<p style="float:left;">{$field.label} </p>
|
||||
<div class="value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
{if isset($dimension_text)}
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var id_product = {$product.id_product|intval};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getdimensiondata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
results = data;
|
||||
id_product=id_product;
|
||||
//console.table(results);
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof results !== 'undefined' && results.length > 0) {
|
||||
var displayquantity = results[0]['displayquantity'];
|
||||
|
||||
if ((results[0]) && (displayquantity == 'decimalok')) {
|
||||
if (results[0]['step_width'])
|
||||
stepvalue = results[0]['step_width'];
|
||||
else
|
||||
stepvalue = results[0]['step'];
|
||||
|
||||
if(!stepvalue)
|
||||
stepvalue = 1;
|
||||
|
||||
switch(results[0]['calculationtype']) {
|
||||
case "weight":
|
||||
if (results[0]['minweight'])
|
||||
minvalue = results[0]['minweight'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxweight'])
|
||||
maxvalue = results[0]['maxweight'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
default:
|
||||
if (results[0]['minwidth'])
|
||||
minvalue = results[0]['minwidth'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxwidth'])
|
||||
maxvalue = results[0]['maxwidth'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('min', parseFloat(minvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('max', parseFloat(maxvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('step', parseFloat(stepvalue));
|
||||
}
|
||||
}
|
||||
|
||||
if (displayquantity == "decimalok") {
|
||||
window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"] = $("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val();
|
||||
setInterval(function(){
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val(parseFloat(window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"]).toFixed(4));
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.cart-item .bootstrap-touchspin {
|
||||
float:left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,46 @@
|
||||
{**
|
||||
* PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_detailed_product'}
|
||||
<div class="cart-overview js-cart" data-refresh-url="{url entity='cart' params=['ajax' => true, 'action' => 'refresh']}">
|
||||
{if $cart.products}
|
||||
<ul class="cart-items">
|
||||
{foreach from=$cart.products item=product}
|
||||
<li class="cart-item">
|
||||
{block name='cart_detailed_product_line'}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
{include file='checkout/_partials/cart-detailed-product-line-override.tpl' product=$product}
|
||||
{else}
|
||||
{include file='checkout/_partials/cart-detailed-product-line.tpl' product=$product}
|
||||
{/if}
|
||||
{/block}
|
||||
</li>
|
||||
{if is_array($product.customizations) && $product.customizations|count >1}<hr>{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<span class="no-items">{l s='There are no more items in your cart' d='Shop.Theme.Checkout'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,60 @@
|
||||
{**
|
||||
* PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_summary_product_line'}
|
||||
<div class="media-left">
|
||||
<a href="{$product.url}" title="{$product.name}">
|
||||
<img class="media-object" src="{$product.cover.small.url}" alt="{$product.name}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="product-name">{$product.name}</span>
|
||||
{* <span class="product-quantity">x{$product.quantity}</span> *}
|
||||
{* MEG Venture *}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<span class="product-quantity">x{if isset($dimension_text)}{$dimension_quantity|string_format:"%.2f"} {$dimension_unit|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}</span>
|
||||
{* MEG Venture *}
|
||||
<span class="product-price float-xs-right">{$product.price}</span>
|
||||
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info product-line-info-secondary text-muted">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
<br/>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,73 @@
|
||||
{**
|
||||
* PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<section id="js-checkout-summary" class="card js-cart" data-refresh-url="{$urls.pages.cart}?ajax=1&action=refresh">
|
||||
<div class="card-block">
|
||||
{block name='hook_checkout_summary_top'}
|
||||
{hook h='displayCheckoutSummaryTop'}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_products'}
|
||||
<div class="cart-summary-products">
|
||||
|
||||
<p>{$cart.summary_string}</p>
|
||||
|
||||
<p>
|
||||
<a href="#" data-toggle="collapse" data-target="#cart-summary-product-list" class="btn btn-outline">
|
||||
{l s='show details' d='Shop.Theme.Actions'}
|
||||
<i class="material-icons">expand_more</i>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{block name='cart_summary_product_list'}
|
||||
<div class="collapse" id="cart-summary-product-list">
|
||||
<ul class="media-list">
|
||||
{foreach from=$cart.products item=product}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line-override.tpl' product=$product}</li>
|
||||
{else}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_subtotals'}
|
||||
{include file='checkout/_partials/cart-summary-subtotals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
|
||||
{block name='cart_summary_totals'}
|
||||
{include file='checkout/_partials/cart-summary-totals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_voucher'}
|
||||
{include file='checkout/_partials/cart-voucher.tpl'}
|
||||
{/block}
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,307 @@
|
||||
{**
|
||||
* PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{$product_price = $product.price|regex_replace:'/[^0-9,.]+/':''}
|
||||
{$currency = $product.price|regex_replace:'/[A-Za-z0-9.,]+/':''}
|
||||
{$unit_price = $product_price|floatval / $dimension_quantity|floatval}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<div class="product-line-grid row">
|
||||
<!-- product left content: image-->
|
||||
<div class="product-line-grid-left col-md-3 col-xs-4">
|
||||
<span class="product-image media-middle">
|
||||
<img src="{$product.cover.bySize.cart_default.url}" alt="{$product.name|escape:'quotes'}">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- product left body: description -->
|
||||
<div class="product-line-grid-body col-md-4 col-xs-8">
|
||||
<div class="product-line-info">
|
||||
<a class="label" href="{$product.url}" data-id_customization="{$product.id_customization|intval}">{$product.name}</a>
|
||||
</div>
|
||||
|
||||
<div class="product-line-info product-price h5 {if $product.has_discount}has-discount{/if}">
|
||||
{if $product.has_discount}
|
||||
<div class="product-discount">
|
||||
{* <span class="regular-price">{$product.regular_price}</span> *}
|
||||
{if $product.discount_type === 'percentage'}
|
||||
<span class="discount discount-percentage">
|
||||
-{$product.discount_percentage_absolute}
|
||||
</span>
|
||||
{else}
|
||||
<span class="discount discount-amount">
|
||||
-{$product.discount_to_display}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="current-price">
|
||||
<span class="price">{$product.price}</span>
|
||||
{if $product.unit_price_full}
|
||||
{if $dimension_text}
|
||||
<div class="unit-price-cart">{$currency}{$unit_price|string_format:"%.2f"} per {$dimension_unit|escape:'htmlall':'UTF-8'}</div>
|
||||
{else}
|
||||
<div class="unit-price-cart">{$product.unit_price_full}</div>
|
||||
{/if}
|
||||
{* <div class="unit-price-cart">{$product.unit_price_full}</div> *}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{* {if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
<a href="#" data-toggle="modal" data-target="#product-customizations-modal-{$customization.id_customization}">{l s='Product customization' d='Shop.Theme.Catalog'}</a>
|
||||
<div class="modal fade customization-modal" id="product-customizations-modal-{$customization.id_customization}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">{l s='Product customization' d='Shop.Theme.Catalog'}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{foreach from=$customization.fields item="field"}
|
||||
<div class="product-customization-line row">
|
||||
<div class="col-sm-3 col-xs-4 label">
|
||||
{$field.label}
|
||||
</div>
|
||||
<div class="col-sm-9 col-xs-8 value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if} *}
|
||||
</div>
|
||||
|
||||
<!-- product left body: description -->
|
||||
<div class="product-line-grid-right product-line-actions col-md-5 col-xs-12">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 hidden-md-up"></div>
|
||||
<div class="col-md-10 col-xs-5">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-6 col-sp-12 qty">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift-quantity">{$product.quantity}</span>
|
||||
{else}
|
||||
<input
|
||||
class="js-cart-line-product-quantity"
|
||||
style="font-size: 14px;padding:0;"
|
||||
data-down-url="{$product.down_quantity_url}"
|
||||
data-up-url="{$product.up_quantity_url}"
|
||||
data-update-url="{$product.update_quantity_url}"
|
||||
data-product-id="{$product.id_product}"
|
||||
unique-product-id="{$product.id_product|escape:'javascript':'UTF-8'}-{$product.id_product_attribute|escape:'javascript':'UTF-8'}-{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
type="number"
|
||||
value="{if isset($dimension_text)}{$dimension_quantity|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}"
|
||||
name="product-quantity-spin"
|
||||
min="{$product.minimal_quantity}"
|
||||
/>
|
||||
{if isset($dimension_text)}
|
||||
<div class="input-group-append" style="height: 40px;line-height: 40px;float:right;">
|
||||
<span class="input-group-text small-text text-muted">{$dimension_unit|escape:'htmlall':'UTF-8'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-2 col-sp-12 price">
|
||||
<span class="product-price">
|
||||
<strong>
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift">{l s='Gift' d='Shop.Theme.Checkout'}</span>
|
||||
{else}
|
||||
{$product.total}
|
||||
{/if}
|
||||
</strong>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-3">
|
||||
<div class="cart-line-product-actions ">
|
||||
<a
|
||||
class = "remove-from-cart"
|
||||
rel = "nofollow"
|
||||
href = "{$product.remove_from_cart_url}"
|
||||
data-link-action = "delete-from-cart"
|
||||
data-id-product = "{$product.id_product|escape:'javascript'}"
|
||||
data-id-product-attribute = "{$product.id_product_attribute|escape:'javascript'}"
|
||||
data-id-customization = "{$product.id_customization|escape:'javascript'}"
|
||||
>
|
||||
{if !isset($product.is_gift) || !$product.is_gift}
|
||||
<i class="material-icons float-xs-left">delete</i>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{block name='hook_cart_extra_product_actions'}
|
||||
{hook h='displayCartExtraProductActions' product=$product}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
{foreach from=$customization.fields item="field"}
|
||||
{assign var="dimension_text" value=" "|explode:$field.text}
|
||||
<div class="alert medium-alert alert-info" style="width: 100%;">
|
||||
<p style="float:left;">{$field.label} </p>
|
||||
<div class="value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
{if isset($dimension_text)}
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var id_product = {$product.id_product|intval};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getdimensiondata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
results = data;
|
||||
id_product=id_product;
|
||||
//console.table(results);
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof results !== 'undefined' && results.length > 0) {
|
||||
var displayquantity = results[0]['displayquantity'];
|
||||
|
||||
if ((results[0]) && (displayquantity == 'decimalok')) {
|
||||
if (results[0]['step_width'])
|
||||
stepvalue = results[0]['step_width'];
|
||||
else
|
||||
stepvalue = results[0]['step'];
|
||||
|
||||
if(!stepvalue)
|
||||
stepvalue = 1;
|
||||
|
||||
switch(results[0]['calculationtype']) {
|
||||
case "weight":
|
||||
if (results[0]['minweight'])
|
||||
minvalue = results[0]['minweight'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxweight'])
|
||||
maxvalue = results[0]['maxweight'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
default:
|
||||
if (results[0]['minwidth'])
|
||||
minvalue = results[0]['minwidth'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxwidth'])
|
||||
maxvalue = results[0]['maxwidth'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('min', parseFloat(minvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('max', parseFloat(maxvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('step', parseFloat(stepvalue));
|
||||
}
|
||||
}
|
||||
|
||||
if (displayquantity == "decimalok") {
|
||||
window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"] = $("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val();
|
||||
setInterval(function(){
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val(parseFloat(window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"]).toFixed(4));
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.cart-item .bootstrap-touchspin {
|
||||
float:left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,48 @@
|
||||
{**
|
||||
* PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_detailed_product'}
|
||||
<div class="cart-overview js-cart" data-refresh-url="{url entity='cart' params=['ajax' => true, 'action' => 'refresh']}">
|
||||
{if $cart.products}
|
||||
<ul class="cart-items">
|
||||
{foreach from=$cart.products item=product}
|
||||
<li class="cart-item">
|
||||
{block name='cart_detailed_product_line'}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
{include file='checkout/_partials/cart-detailed-product-line-override.tpl' product=$product}
|
||||
{else}
|
||||
{include file='checkout/_partials/cart-detailed-product-line.tpl' product=$product}
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/block}
|
||||
</li>
|
||||
{if is_array($product.customizations) && $product.customizations|count >1}<hr>{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<span class="no-items">{l s='There are no more items in your cart' d='Shop.Theme.Checkout'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,60 @@
|
||||
{**
|
||||
* PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_summary_product_line'}
|
||||
<div class="media-left">
|
||||
<a href="{$product.url}" title="{$product.name}">
|
||||
<img class="media-object" src="{$product.cover.small.url}" alt="{$product.name}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="product-name">{$product.name}</span>
|
||||
{* <span class="product-quantity">x{$product.quantity}</span> *}
|
||||
{* MEG Venture *}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<span class="product-quantity">x{if isset($dimension_text)}{$dimension_quantity|string_format:"%.2f"} {$dimension_unit|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}</span>
|
||||
{* MEG Venture *}
|
||||
<span class="product-price float-xs-right">{$product.price}</span>
|
||||
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info product-line-info-secondary text-muted">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
<br/>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,75 @@
|
||||
{**
|
||||
* PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<section id="js-checkout-summary" class="card js-cart" data-refresh-url="{$urls.pages.cart}?ajax=1&action=refresh">
|
||||
<div class="card-block">
|
||||
{block name='hook_checkout_summary_top'}
|
||||
{hook h='displayCheckoutSummaryTop'}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_products'}
|
||||
<div class="cart-summary-products">
|
||||
|
||||
<p>{$cart.summary_string}</p>
|
||||
|
||||
<p>
|
||||
<a href="#" data-toggle="collapse" data-target="#cart-summary-product-list" class="btn btn-outline">
|
||||
{l s='show details' d='Shop.Theme.Actions'}
|
||||
<i class="material-icons">expand_more</i>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{block name='cart_summary_product_list'}
|
||||
<div class="collapse" id="cart-summary-product-list">
|
||||
<ul class="media-list">
|
||||
{foreach from=$cart.products item=product}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line-override.tpl' product=$product}</li>
|
||||
{else}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li>
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_subtotals'}
|
||||
{include file='checkout/_partials/cart-summary-subtotals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
|
||||
{block name='cart_summary_totals'}
|
||||
{include file='checkout/_partials/cart-summary-totals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_voucher'}
|
||||
{include file='checkout/_partials/cart-voucher.tpl'}
|
||||
{/block}
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,26 @@
|
||||
squaremeter_surface.css
|
||||
|
||||
to the end add below:
|
||||
|
||||
/* Ayon Theme CSS Fix */
|
||||
.product-bar-container{
|
||||
margin-bottom: 650px !important;
|
||||
}
|
||||
|
||||
#height, #width, #quantitym, #quantity_calculated {
|
||||
width:190px;
|
||||
}
|
||||
|
||||
#totalprice {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#totalpriceinfo span {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
input#quantity_wanted_alt, input#quantity_wanted_alth, input#quantity, input#directinput, #width select, #height select, #depth select, #weight select, #direct_input_p select, #directinput_p select {
|
||||
width: 105px;
|
||||
}
|
||||
/* Ayon Theme CSS Fix */
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,275 @@
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{$product_price = $product.price|regex_replace:'/[^0-9,.]+/':''}
|
||||
{$currency = $product.price|regex_replace:'/[A-Za-z0-9.,]+/':''}
|
||||
{$unit_price = $product_price|floatval / $dimension_quantity|floatval}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<div class="product-line-grid">
|
||||
<!-- product left content: image-->
|
||||
<div class="product-line-grid-thumb">
|
||||
<span class="product-image media-middle">
|
||||
<img src="{$product.cover.bySize.cart_default.url}" alt="{$product.name|escape:'quotes'}">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="product-line-grid-body">
|
||||
|
||||
<!-- first line -->
|
||||
<div class="product-line-name">
|
||||
|
||||
|
||||
|
||||
<div class="product-line-info">
|
||||
<a class="product-name" href="{$product.url}" data-id_customization="{$product.id_customization|intval}">{$product.name}</a>
|
||||
</div>
|
||||
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<p class="product-line-info atts">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</p>
|
||||
{/foreach}
|
||||
|
||||
{* {if $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
<a href="#" data-toggle="modal" data-target="#product-customizations-modal-{$customization.id_customization}">{l s='Product customization' d='Shop.Theme.Catalog'}</a>
|
||||
<div class="modal fade customization-modal" id="product-customizations-modal-{$customization.id_customization}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">{l s='Product customization' d='Shop.Theme.Catalog'}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="power" style="width: 500px; height: 300px; background: url({$product.cover.bySize.cart_view.url}) 500px 300px; margin: auto; background-position: 0px 0px;"></div>
|
||||
{foreach from=$customization.fields item="field"}
|
||||
<div class="product-customization-line row">
|
||||
<div class="col-sm-3 col-xs-4 label">
|
||||
{$field.label}
|
||||
</div>
|
||||
<div class="col-sm-9 col-xs-8 value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if} *}
|
||||
|
||||
<div class="cart-line-product-actions">
|
||||
<a
|
||||
class = "remove-from-cart remove"
|
||||
rel = "nofollow"
|
||||
href = "{$product.remove_from_cart_url}"
|
||||
data-link-action = "delete-from-cart"
|
||||
data-id-product = "{$product.id_product|escape:'javascript'}"
|
||||
data-id-product-attribute = "{$product.id_product_attribute|escape:'javascript'}"
|
||||
data-id-customization = "{$product.id_customization|escape:'javascript'}"
|
||||
>
|
||||
{if !isset($product.is_gift) || !$product.is_gift}
|
||||
<i><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></i>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{block name='hook_cart_extra_product_actions'}
|
||||
{hook h='displayCartExtraProductActions' product=$product}
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- second line -->
|
||||
|
||||
<div class="product-line-prices">
|
||||
|
||||
<div class="product-line-grid-price">
|
||||
<div class="product-line-info product-price h5 {if $product.has_discount}has-discount{/if}">
|
||||
<div class="current-price">
|
||||
<span class="price">{$product.price}</span>
|
||||
{if $product.has_discount}
|
||||
<span class="regular-price old-price">{$product.regular_price}</span>
|
||||
{if $product.discount_type === 'percentage'}
|
||||
<span class="discount discount-percentage">
|
||||
-{$product.discount_percentage_absolute}
|
||||
</span>
|
||||
{else}
|
||||
<span class="discount discount-amount">
|
||||
-{$product.discount_to_display}
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{if $product.unit_price_full}
|
||||
{if $dimension_text}
|
||||
<div class="unit-price-cart">{$currency}{$unit_price|string_format:"%.2f"} per {$dimension_unit|escape:'htmlall':'UTF-8'}</div>
|
||||
{else}
|
||||
<div class="unit-price-cart">{$product.unit_price_full}</div>
|
||||
{/if}
|
||||
{* <div class="unit-price-cart">{$product.unit_price_full}</div> *}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-line-grid-right product-line-actions">
|
||||
<div class="qty">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift-quantity">{$product.quantity}</span>
|
||||
{else}
|
||||
<input
|
||||
class="js-cart-line-product-quantity"
|
||||
data-down-url="{$product.down_quantity_url}"
|
||||
data-up-url="{$product.up_quantity_url}"
|
||||
data-update-url="{$product.update_quantity_url}"
|
||||
data-product-id="{$product.id_product}"
|
||||
unique-product-id="{$product.id_product|escape:'javascript':'UTF-8'}-{$product.id_product_attribute|escape:'javascript':'UTF-8'}-{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
type="text"
|
||||
value="{if isset($dimension_text)}{$dimension_quantity|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}"
|
||||
name="product-quantity-spin"
|
||||
min="{$product.minimal_quantity}"
|
||||
/>
|
||||
{if isset($dimension_text)}
|
||||
<div class="input-group-append" style="height: 40px;line-height: 59px;float:right;">
|
||||
<span class="input-group-text small-text text-muted">{$dimension_unit|escape:'htmlall':'UTF-8'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="price">
|
||||
<span class="product-price">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift">{l s='Gift' d='Shop.Theme.Checkout'}</span>
|
||||
{else}
|
||||
{$product.total}
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
{foreach from=$customization.fields item="field"}
|
||||
{assign var="dimension_text" value=" "|explode:$field.text}
|
||||
<div class="alert medium-alert alert-info" style="width: 100%;">
|
||||
<p style="float:left;">{$field.label} </p>
|
||||
<div class="value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if}
|
||||
|
||||
{if isset($dimension_text)}
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var id_product = {$product.id_product|intval};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getdimensiondata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
results = data;
|
||||
id_product=id_product;
|
||||
//console.table(results);
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof results !== 'undefined' && results.length > 0) {
|
||||
var displayquantity = results[0]['displayquantity'];
|
||||
|
||||
if ((results[0]) && (displayquantity == 'decimalok')) {
|
||||
if (results[0]['step_width'])
|
||||
stepvalue = results[0]['step_width'];
|
||||
else
|
||||
stepvalue = results[0]['step'];
|
||||
|
||||
if(!stepvalue)
|
||||
stepvalue = 1;
|
||||
|
||||
switch(results[0]['calculationtype']) {
|
||||
case "weight":
|
||||
if (results[0]['minweight'])
|
||||
minvalue = results[0]['minweight'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxweight'])
|
||||
maxvalue = results[0]['maxweight'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
default:
|
||||
if (results[0]['minwidth'])
|
||||
minvalue = results[0]['minwidth'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxwidth'])
|
||||
maxvalue = results[0]['maxwidth'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('min', parseFloat(minvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('max', parseFloat(maxvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('step', parseFloat(stepvalue));
|
||||
}
|
||||
}
|
||||
|
||||
if (displayquantity == "decimalok") {
|
||||
window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"] = $("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val();
|
||||
setInterval(function(){
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val(parseFloat(window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"]).toFixed(4));
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
@@ -0,0 +1,48 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_detailed_product'}
|
||||
<div class="cart-overview js-cart" data-refresh-url="{url entity='cart' params=['ajax' => true, 'action' => 'refresh']}">
|
||||
{if $cart.products}
|
||||
<ul class="cart-items">
|
||||
{foreach from=$cart.products item=product}
|
||||
<li class="cart-item">
|
||||
{block name='cart_detailed_product_line'}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
{include file='checkout/_partials/cart-detailed-product-line-override.tpl' product=$product}
|
||||
{else}
|
||||
{include file='checkout/_partials/cart-detailed-product-line.tpl' product=$product}
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/block}
|
||||
</li>
|
||||
{if $product.customizations|count >1}<hr>{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<span class="no-items">{l s='There are no more items in your cart' d='Shop.Theme.Checkout'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,53 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_summary_product_line'}
|
||||
<div class="media-left">
|
||||
<a href="{$product.url}" title="{$product.name}">
|
||||
<img class="media-object" src="{$product.cover.small.url}" alt="{$product.name}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="product-name">{$product.name}</span>
|
||||
{* <span class="product-quantity">x{$product.quantity}</span> *}
|
||||
{* MEG Venture *}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<span class="product-quantity">x{if isset($dimension_text)}{$dimension_quantity|string_format:"%.2f"} {$dimension_unit|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}</span>
|
||||
{* MEG Venture *}
|
||||
<span class="product-price float-xs-right">{$product.price}</span>
|
||||
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,84 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<section id="js-checkout-summary" class="card js-cart cart-summary" data-refresh-url="{$urls.pages.cart}?ajax=1&action=refresh">
|
||||
<div class="cart-detailed-totals">
|
||||
|
||||
<h4>{l s='Subtotal' d='Shop.Theme.Checkout'} - {$cart.summary_string}</h4>
|
||||
|
||||
{block name='cart_summary_products'}
|
||||
<div class="cart-summary-products">
|
||||
<p>
|
||||
<a href="#" data-toggle="collapse" class="collapsed noeffect" data-target="#cart-summary-product-list">
|
||||
{l s='Show details' d='Shop.Theme.Actions'}
|
||||
</a>
|
||||
</p>
|
||||
{block name='cart_summary_product_list'}
|
||||
<div class="collapse" id="cart-summary-product-list">
|
||||
<ul class="media-list">
|
||||
{foreach from=$cart.products item=product}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line-override.tpl' product=$product}</li>
|
||||
{else}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li>
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
<div class="card-block">
|
||||
{block name='hook_checkout_summary_top'}
|
||||
{hook h='displayCheckoutSummaryTop'}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_subtotals'}
|
||||
{foreach from=$cart.subtotals item="subtotal"}
|
||||
{if $subtotal && $subtotal.type !== 'tax'}
|
||||
<div class="cart-summary-line cart-summary-subtotals" id="cart-subtotal-{$subtotal.type}">
|
||||
<span class="label">{$subtotal.label}</span>
|
||||
<span class="value">{$subtotal.value}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
|
||||
{block name='cart_summary_voucher'}
|
||||
{include file='checkout/_partials/cart-voucher.tpl'}
|
||||
{/block}
|
||||
|
||||
<hr class="separator">
|
||||
|
||||
{block name='cart_summary_totals'}
|
||||
{include file='checkout/_partials/cart-summary-totals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,261 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{$product_price = $product.price|regex_replace:'/[^0-9,.]+/':''}
|
||||
{$currency = $product.price|regex_replace:'/[A-Za-z0-9.,]+/':''}
|
||||
{$unit_price = $product_price|floatval / $dimension_quantity|floatval}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<div class="product-line-grid">
|
||||
<!-- product line left content: image-->
|
||||
<div class="product-line-grid-left col-md-3 col-xs-4">
|
||||
<span class="product-image media-middle">
|
||||
{if $product.cover}
|
||||
<img src="{$product.cover.bySize.cart_default.url|escape:'quotes':'UTF-8'}" alt="{$product.name|escape:'quotes':'UTF-8'}">
|
||||
{else}
|
||||
<img src="{$urls.no_picture_image.bySize.cart_default.url}" />
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- product line body: label, discounts, price, attributes, customizations -->
|
||||
<div class="product-line-grid-body col-md-4 col-xs-8">
|
||||
<div class="product-line-info">
|
||||
<a class="label" href="{$product.url}" data-id_customization="{$product.id_customization|intval}">{$product.name}</a>
|
||||
</div>
|
||||
|
||||
<div class="product-line-info product-price h5 {if $product.has_discount}has-discount{/if}">
|
||||
{if $product.has_discount}
|
||||
<div class="product-discount">
|
||||
<span class="regular-price">{$product.regular_price}</span>
|
||||
{if $product.discount_type === 'percentage'}
|
||||
<span class="discount discount-percentage">
|
||||
-{$product.discount_percentage_absolute}
|
||||
</span>
|
||||
{else}
|
||||
<span class="discount discount-amount">
|
||||
-{$product.discount_to_display}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="current-price">
|
||||
<span class="price">{$product.price}</span>
|
||||
{if $product.unit_price_full}
|
||||
{if $dimension_text}
|
||||
<div class="unit-price-cart">{$currency}{$unit_price|string_format:"%.2f"} per {$dimension_unit|escape:'htmlall':'UTF-8'}</div>
|
||||
{else}
|
||||
<div class="unit-price-cart">{$product.unit_price_full}</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info {$attribute|lower}">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<!-- product line right content: actions (quantity, delete), price -->
|
||||
<div class="product-line-grid-right product-line-actions col-md-5 col-xs-12">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 hidden-md-up"></div>
|
||||
<div class="col-md-10 col-xs-6">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-6 qty">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift-quantity">{$product.quantity}</span>
|
||||
{else}
|
||||
<input
|
||||
class="js-cart-line-product-quantity"
|
||||
style="font-size: 14px;padding:0;"
|
||||
data-down-url="{$product.down_quantity_url}"
|
||||
data-up-url="{$product.up_quantity_url}"
|
||||
data-update-url="{$product.update_quantity_url}"
|
||||
data-product-id="{$product.id_product|intval}"
|
||||
unique-product-id="{$product.id_product|escape:'javascript':'UTF-8'}-{$product.id_product_attribute|escape:'javascript':'UTF-8'}-{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
type="number"
|
||||
value="{if isset($dimension_text)}{$dimension_quantity|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}"
|
||||
name="product-quantity-spin"
|
||||
/>
|
||||
{if isset($dimension_text)}
|
||||
<div class="input-group-append" style="height: 40px;line-height: 40px;">
|
||||
<span class="input-group-text small-text text-muted">{$dimension_unit|escape:'htmlall':'UTF-8'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-2 price">
|
||||
<span class="product-price">
|
||||
<strong>
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift">{l s='Gift' d='Shop.Theme.Checkout'}</span>
|
||||
{else}
|
||||
{$product.total}
|
||||
{/if}
|
||||
</strong>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-2 text-xs-right">
|
||||
<div class="cart-line-product-actions">
|
||||
<a
|
||||
class = "remove-from-cart"
|
||||
rel = "nofollow"
|
||||
href = "{$product.remove_from_cart_url}"
|
||||
data-link-action = "delete-from-cart"
|
||||
data-id-product = "{$product.id_product|escape:'javascript':'UTF-8'}"
|
||||
data-id-product-attribute = "{$product.id_product_attribute|escape:'javascript':'UTF-8'}"
|
||||
data-id-customization = "{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
>
|
||||
{if !isset($product.is_gift) || !$product.is_gift}
|
||||
<i class="material-icons float-xs-left">delete</i>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{block name='hook_cart_extra_product_actions'}
|
||||
{hook h='displayCartExtraProductActions' product=$product}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
{foreach from=$customization.fields item="field"}
|
||||
{assign var="dimension_text" value=" "|explode:$field.text}
|
||||
<div class="alert medium-alert alert-info">
|
||||
<p style="float:left;">{$field.label} </p>
|
||||
<div class="value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if isset($dimension_text)}
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var id_product = {$product.id_product|intval};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getdimensiondata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
results = data;
|
||||
id_product=id_product;
|
||||
//console.table(results);
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof results !== 'undefined' && results.length > 0) {
|
||||
var displayquantity = results[0]['displayquantity'];
|
||||
|
||||
if ((results[0]) && (displayquantity == 'decimalok')) {
|
||||
if (results[0]['step_width'])
|
||||
stepvalue = results[0]['step_width'];
|
||||
else
|
||||
stepvalue = results[0]['step'];
|
||||
|
||||
if(!stepvalue)
|
||||
stepvalue = 1;
|
||||
|
||||
switch(results[0]['calculationtype']) {
|
||||
case "weight":
|
||||
if (results[0]['minweight'])
|
||||
minvalue = results[0]['minweight'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxweight'])
|
||||
maxvalue = results[0]['maxweight'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
default:
|
||||
if (results[0]['minwidth'])
|
||||
minvalue = results[0]['minwidth'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxwidth'])
|
||||
maxvalue = results[0]['maxwidth'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('min', parseFloat(minvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('max', parseFloat(maxvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('step', parseFloat(stepvalue));
|
||||
}
|
||||
}
|
||||
|
||||
if (displayquantity == "decimalok") {
|
||||
window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"] = $("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val();
|
||||
setInterval(function(){
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val(parseFloat(window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"]).toFixed(4));
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
@@ -0,0 +1,48 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
{block name='cart_detailed_product'}
|
||||
<div class="cart-overview js-cart" data-refresh-url="{url entity='cart' params=['ajax' => true, 'action' => 'refresh']}">
|
||||
{if $cart.products}
|
||||
<ul class="cart-items">
|
||||
{foreach from=$cart.products item=product}
|
||||
<li class="cart-item">
|
||||
{block name='cart_detailed_product_line'}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
{include file=$module_dir|cat:'views/templates/front/cart-detailed-product-line-override.tpl' product=$product}
|
||||
{else}
|
||||
{include file='checkout/_partials/cart-detailed-product-line.tpl' product=$product}
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/block}
|
||||
</li>
|
||||
{if is_array($product.customizations) && $product.customizations|count >1}<hr>{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<span class="no-items">{l s='There are no more items in your cart' d='Shop.Theme.Checkout'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,60 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
{block name='cart_summary_product_line'}
|
||||
<div class="media-left">
|
||||
<a href="{$product.url}" title="{$product.name}">
|
||||
<img class="media-object" src="{$product.cover.small.url}" alt="{$product.name}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="product-name">{$product.name}</span>
|
||||
{* <span class="product-quantity">x{$product.quantity}</span> *}
|
||||
{* MEG Venture *}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<span class="product-quantity">x{if isset($dimension_text)}{$dimension_quantity|string_format:"%.2f"} {$dimension_unit|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}</span>
|
||||
{* MEG Venture *}
|
||||
<span class="product-price float-xs-right">{$product.price}</span>
|
||||
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info product-line-info-secondary text-muted">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
<br/>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,75 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
<section id="js-checkout-summary" class="card js-cart" data-refresh-url="{$urls.pages.cart}?ajax=1&action=refresh">
|
||||
<div class="card-block">
|
||||
{block name='hook_checkout_summary_top'}
|
||||
{hook h='displayCheckoutSummaryTop'}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_products'}
|
||||
<div class="cart-summary-products">
|
||||
|
||||
<p>{$cart.summary_string}</p>
|
||||
|
||||
<p>
|
||||
<a href="#" data-toggle="collapse" data-target="#cart-summary-product-list">
|
||||
{l s='show details' d='Shop.Theme.Actions'}
|
||||
<i class="material-icons">expand_more</i>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{block name='cart_summary_product_list'}
|
||||
<div class="collapse" id="cart-summary-product-list">
|
||||
<ul class="media-list">
|
||||
{foreach from=$cart.products item=product}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<li class="media">{include file=$module_dir|cat:'views/templates/front/cart-summary-product-line-override.tpl' product=$product}</li>
|
||||
{else}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li>
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_subtotals'}
|
||||
{include file='checkout/_partials/cart-summary-subtotals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
|
||||
{block name='cart_summary_totals'}
|
||||
{include file='checkout/_partials/cart-summary-totals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_voucher'}
|
||||
{include file='checkout/_partials/cart-voucher.tpl'}
|
||||
{/block}
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,412 @@
|
||||
{**
|
||||
* 2007-2016 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2016 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file=$layout}
|
||||
{block name='head_seo' prepend}
|
||||
<link rel="canonical" href="{$product.canonical_url}">
|
||||
{/block}
|
||||
|
||||
{block name='head' append}
|
||||
<meta property="og:type" content="product">
|
||||
<meta property="og:url" content="{$urls.current_url}">
|
||||
<meta property="og:title" content="{$page.meta.title}">
|
||||
<meta property="og:site_name" content="{$shop.name}">
|
||||
<meta property="og:description" content="{$page.meta.description}">
|
||||
<meta property="og:image" content="{$product.cover.large.url}">
|
||||
<meta property="product:pretax_price:amount" content="{$product.price_tax_exc}">
|
||||
<meta property="product:pretax_price:currency" content="{$currency.iso_code}">
|
||||
<meta property="product:price:amount" content="{$product.price_amount}">
|
||||
<meta property="product:price:currency" content="{$currency.iso_code}">
|
||||
{if isset($product.weight) && ($product.weight != 0)}
|
||||
<meta property="product:weight:value" content="{$product.weight}">
|
||||
<meta property="product:weight:units" content="{$product.weight_unit}">
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name='content'}
|
||||
<section id="main" itemscope itemtype="https://schema.org/Product">
|
||||
<meta itemprop="url" content="{$product.url}">
|
||||
<div class="row product-detail sticky-image default">
|
||||
<div class="pb-left-column col-lg-7 col-md-7 col-sm-6 col-xs-12">
|
||||
<div class="pd-left-content">
|
||||
{block name='page_content_container'}
|
||||
<section class="page-content" id="content">
|
||||
{block name='page_content'}
|
||||
<div class="image-wrapper">
|
||||
{block name='product_cover_tumbnails'}
|
||||
{include file='catalog/_partials/product-cover-thumbnails.tpl'}
|
||||
{/block}
|
||||
<div class="scroll-box-arrows">
|
||||
<i class="fa fa-angle-left left"></i>
|
||||
<i class="fa fa-angle-right right"></i>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
</section>
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
<div class="pb-right-column col-lg-5 col-md-5 col-sm-6 col-xs-12">
|
||||
<div class="container-flex">
|
||||
{block name='product_flags'}
|
||||
{if $product.flags}
|
||||
<ul class="product-flags">
|
||||
{foreach from=$product.flags item=flag}
|
||||
<li class="product-flag {$flag.type}">{$flag.label}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name='product_availability'}
|
||||
{if $product.show_availability && $product.availability_message}
|
||||
{if $product.availability == 'unavailable'}
|
||||
<div class="not-enough-product">
|
||||
<span id="product-availability">
|
||||
{$product.availability_message}
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name='product_cover'}
|
||||
<div class="product-cover">
|
||||
<img class="zoom_01 js-qv-product-cover" src="{$product.cover.bySize.small_default.url}" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image">
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
<div class="block-info">
|
||||
{block name='page_header_container'}
|
||||
{block name='page_header'}
|
||||
<h2 itemprop="name" class="pd-name">{block name='page_title'}{$product.name}{/block}</h2>
|
||||
{/block}
|
||||
{/block}
|
||||
|
||||
{block name='product_prices'}
|
||||
{include file='catalog/_partials/product-prices.tpl'}
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
{block name='product_additional_info'}
|
||||
{include file='catalog/_partials/product-additional-info.tpl'}
|
||||
{/block}
|
||||
|
||||
<div class="product-information">
|
||||
<ul class="other-info">
|
||||
{if $product.reference}
|
||||
<li id="product_reference">
|
||||
<label>{l s='Product Code:' d='Shop.Theme.Catalog'}</label>
|
||||
<span class="editable">{$product.reference}</span>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
{block name='product_availability'}
|
||||
{if $product.show_availability && $product.availability_message}
|
||||
<li>
|
||||
<label>{l s='Availability:' d='Shop.Theme.Catalog'}</label>
|
||||
<span class="editable">
|
||||
{if $product.availability == 'available'}
|
||||
{$product.availability_message}
|
||||
{elseif $product.availability == 'last_remaining_items'}
|
||||
<i class="material-icons product-last-items"></i>
|
||||
{else}
|
||||
{$product.availability_message}
|
||||
{/if}
|
||||
</span>
|
||||
</li>
|
||||
{/if}
|
||||
{/block}
|
||||
</li>
|
||||
{if $product.id_manufacturer}
|
||||
<li id="product_vendor">
|
||||
<label>{l s='Vendor:' d='Shop.Theme.Catalog'}</label>
|
||||
<span class="editable">{Manufacturer::getnamebyid($product.id_manufacturer)}</span>
|
||||
</li>
|
||||
{/if}
|
||||
<li class="product-category">
|
||||
<label>{l s='Product Type: '}</label>
|
||||
<a class="editable" href="{url entity='category' id=$product.id_category_default}">
|
||||
{$product.category|escape:'html':'UTF-8'}
|
||||
</a
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{block name='product_description_short'}
|
||||
<div id="product-description-short-{$product.id}" class="product-desc">{$product.description_short nofilter}</div>
|
||||
{/block}
|
||||
|
||||
{if isset($product.specific_prices.to) && $product.specific_prices.to > 0}
|
||||
<div class="specific_prices">
|
||||
<div class="countdown-box">
|
||||
<div class="countdown">{$product.specific_prices.to}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $product.is_customizable && count($product.customizations.fields)}
|
||||
{block name='product_customization'}
|
||||
{include file="catalog/_partials/product-customization.tpl" customizations=$product.customizations}
|
||||
{/block}
|
||||
{/if}
|
||||
|
||||
<div class="product-actions">
|
||||
{block name='product_buy'}
|
||||
<form action="{$urls.pages.cart}" method="post" id="add-to-cart-or-refresh">
|
||||
<input type="hidden" name="token" value="{$static_token}">
|
||||
<input type="hidden" name="id_product" value="{$product.id}" id="product_page_product_id">
|
||||
<input type="hidden" name="id_customization" value="{$product.id_customization}" id="product_customization_id">
|
||||
|
||||
{block name='product_pack'}
|
||||
{if $packItems}
|
||||
<section class="product-pack">
|
||||
<h3 class="h4">{l s='This pack contains' d='Shop.Theme.Catalog'}</h3>
|
||||
<article>
|
||||
<div class="card">
|
||||
<div class="pack-product-container">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Products</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$packItems item="product_pack"}
|
||||
{block name='product_miniature'}
|
||||
{include file='catalog/_partials/miniatures/pack-product.tpl' product=$product_pack}
|
||||
{/block}
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name='product_discounts'}
|
||||
{include file='catalog/_partials/product-discounts.tpl'}
|
||||
{/block}
|
||||
|
||||
{block name='product_variants'}
|
||||
{include file='catalog/_partials/product-variants.tpl'}
|
||||
{/block}
|
||||
|
||||
{block name='hook_display_reassurance'}
|
||||
{hook h='displayReassurance'}
|
||||
{/block}
|
||||
|
||||
{block name='product_add_to_cart'}
|
||||
{include file='catalog/_partials/product-add-to-cart.tpl'}
|
||||
{/block}
|
||||
|
||||
{hook h='displayProductButtons' product=$product}
|
||||
|
||||
{block name='product_refresh'}
|
||||
<input class="product-refresh ps-hidden-by-js" name="refresh" type="submit" value="{l s='Refresh' d='Shop.Theme.Actions'}">
|
||||
{/block}
|
||||
</form>
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="guaranteed text-center p-relative">
|
||||
<span>{l s='Guaranteed safe checkout' d='Shop.Theme.Catalog'}</span>
|
||||
<img class="img-responsive mg-auto px-15" src="{$urls.base_url}themes/jms_yanka/assets/img/payments.png" alt="">
|
||||
</div>
|
||||
|
||||
<div id="more_info_block" class="tabs">
|
||||
{block name='product_tabs'}
|
||||
<div class="panel-group" id="accordion">
|
||||
{if $product.description}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a class="" data-toggle="collapse" data-parent="#accordion" href="#descriptionn">
|
||||
{l s='Description' d='Shop.Theme.Catalog'}
|
||||
<span class="pt-icon">
|
||||
<svg viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 0.992188L6 5.98947L11 0.992187" stroke="#D0D0D0" stroke-width="1.1"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="descriptionn" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
{block name='product_description'}
|
||||
<div class="product-description">{$product.description nofilter}</div>
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#product-detailss">
|
||||
{l s='Additional information' d='Shop.Theme.Catalog'}
|
||||
<span class="pt-icon">
|
||||
<svg viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 0.992188L6 5.98947L11 0.992187" stroke="#D0D0D0" stroke-width="1.1"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="product-detailss" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
{block name='product_details'}
|
||||
{include file='catalog/_partials/product-details.tpl'}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if $product.attachments}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#attachmentss">
|
||||
{l s='Attachments' d='Shop.Theme.Catalog'}
|
||||
<span class="pt-icon">
|
||||
<svg viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 0.992188L6 5.98947L11 0.992187" stroke="#D0D0D0" stroke-width="1.1"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="attachmentss" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
{block name='product_attachments'}
|
||||
{if $product.attachments}
|
||||
<div class="tab-pane fade in" id="attachments" role="tabpanel">
|
||||
<section class="product-attachments">
|
||||
<h3 class="h5 text-uppercase">{l s='Download' d='Shop.Theme.Actions'}</h3>
|
||||
{foreach from=$product.attachments item=attachment}
|
||||
<div class="attachment">
|
||||
<h4><a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">{$attachment.name}</a></h4>
|
||||
<p>{$attachment.description}</p
|
||||
<a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">
|
||||
{l s='Download' d='Shop.Theme.Actions'} ({$attachment.file_size_formatted})
|
||||
</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
</section>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{foreach from=$product.extraContent item=extra key=extraKey}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#extra-{$extraKey}">
|
||||
{$extra.title}
|
||||
<span class="pt-icon">
|
||||
<svg viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 0.992188L6 5.98947L11 0.992187" stroke="#D0D0D0" stroke-width="1.1"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="extra-{$extraKey}" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
{foreach from=$product.extraContent item=extra key=extraKey}
|
||||
<div class="tab-pane fade in {$extra.attr.class}" id="extra-{$extraKey}" role="tabpanel" {foreach $extra.attr as $key => $val} {$key}="{$val}"{/foreach}>
|
||||
{$extra.content nofilter}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="panel panel-default reviews">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#review">
|
||||
{l s='Reviews' d='Shop.Theme.Catalog'}
|
||||
<span class="pt-icon">
|
||||
<svg viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 0.992188L6 5.98947L11 0.992187" stroke="#D0D0D0" stroke-width="1.1"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="review" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
{block name='product_footer'}
|
||||
{hook h='displayFooterProduct' product=$product category=$category}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||
<div class="addthis_inline_share_toolbox_lvar"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="stickyBottom"></div>
|
||||
|
||||
|
||||
{block name='product_accessories'}
|
||||
{if $accessories}
|
||||
<section class="product-accessories clearfix">
|
||||
<div class="addon-title">
|
||||
<h3>{l s='Accessories' d='Shop.Theme.Catalog'}</h3>
|
||||
</div>
|
||||
|
||||
<div class="products accessories-carousel customs-product-carousel">
|
||||
{foreach from=$accessories item="product_accessory"}
|
||||
<div class="item ajax_block_product">
|
||||
{block name='product_miniature'}
|
||||
{include file='catalog/_partials/miniatures/product.tpl' product=$product_accessory}
|
||||
{/block}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name='product_images_modal'}
|
||||
{include file='catalog/_partials/product-images-modal.tpl'}
|
||||
{/block}
|
||||
|
||||
{block name='page_footer_container'}
|
||||
|
||||
{/block}
|
||||
</section>
|
||||
{/block}
|
||||
@@ -0,0 +1,284 @@
|
||||
{**
|
||||
* 2007-2020 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{$product_price = $product.price|regex_replace:'/[^0-9,.]+/':''}
|
||||
{$currency = $product.price|regex_replace:'/[A-Za-z0-9.,]+/':''}
|
||||
{$unit_price = $product_price|floatval / $dimension_quantity|floatval}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<div class="product-line-grid">
|
||||
<!-- products -->
|
||||
<div class="row_cs product-info col-lg-2 col-md-2 col-sm-6 col-xs-6">
|
||||
<div class="product-image media-middle">
|
||||
<div class="cart-line-product-actions ">
|
||||
<a
|
||||
class = "remove-from-cart"
|
||||
rel = "nofollow"
|
||||
href = "{$product.remove_from_cart_url}"
|
||||
data-link-action = "delete-from-cart"
|
||||
data-id-product = "{$product.id_product|escape:'javascript'}"
|
||||
data-id-product-attribute = "{$product.id_product_attribute|escape:'javascript'}"
|
||||
data-id-customization = "{$product.id_customization|escape:'javascript'}"
|
||||
>
|
||||
{if !isset($product.is_gift) || !$product.is_gift}
|
||||
<i>
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="currentColor" d="M5,24h14l1-17H4L5,24z M18.3,8.6l-0.8,13.8h-11L5.7,8.6H18.3z"></path>
|
||||
<rect x="2" y="3.2" fill="currentColor" width="20" height="1.6"></rect>
|
||||
<rect x="10" y="0.2" fill="currentColor" width="4" height="1.6"></rect>
|
||||
</g>
|
||||
</svg>
|
||||
</i>
|
||||
{/if}
|
||||
</a>
|
||||
{hook h='displayCartExtraProductActions' product=$product}
|
||||
</div>
|
||||
<div class="info">
|
||||
<img src="{$product.cover.bySize.home_default.url}" alt="{$product.name|escape:'quotes'}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row_cs product-right col-lg-10 col-md-10 col-sm-6 col-xs-6">
|
||||
<div class="row_cs info col-lg-5 col-sm-12 col-xs-12">
|
||||
<div class="product-line-info">
|
||||
<a class="product-link" href="{$product.url}" data-id_customization="{$product.id_customization|intval}">{$product.name}</a>
|
||||
{foreach from=$product.attributes item="property_value" key="property"}
|
||||
<span>{l s='%label%:' sprintf=['%label%' => $property] d='Shop.Theme.Global'}<strong> {$property_value}</strong></span>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{* {if $product.customizations|count}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
<a href="#" data-toggle="modal" data-target="#product-customizations-modal-{$customization.id_customization}">{l s='Product customization' d='Shop.Theme.Catalog'}</a>
|
||||
<div class="modal fade customization-modal" id="product-customizations-modal-{$customization.id_customization}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
|
||||
</button>
|
||||
<h4 class="modal-title">{l s='Product customization' d='Shop.Theme.Catalog'}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{foreach from=$customization.fields item="field"}
|
||||
<div class="product-customization-line row">
|
||||
<div class="col-sm-3 col-xs-4 label">
|
||||
{$field.label}
|
||||
</div>
|
||||
<div class="col-sm-9 col-xs-8 value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if} *}
|
||||
<!-- price -->
|
||||
<div class="row_cs product-price col-lg-3 col-md-4 col-sm-12 col-xs-12">
|
||||
<div class="product-line-info">
|
||||
<span class="value">{$product.price}</span>
|
||||
{if $product.unit_price_full}
|
||||
{if $dimension_text}
|
||||
<div class="unit-price-cart">{$currency}{$unit_price|string_format:"%.2f"} per {$dimension_unit|escape:'htmlall':'UTF-8'}</div>
|
||||
{else}
|
||||
<div class="unit-price-cart">{$product.unit_price_full}</div>
|
||||
{/if}
|
||||
{* <div class="unit-price-cart">{$product.unit_price_full}</div> *}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- qty -->
|
||||
<div class="row_cs product-qty product-quantity col-lg-2 col-md-4 col-sm-12 col-xs-12">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift-quantity">{$product.quantity}</span>
|
||||
{else}
|
||||
<input
|
||||
class="js-cart-line-product-quantity"
|
||||
style="font-size: 14px;padding:0;"
|
||||
data-down-url="{$product.down_quantity_url}"
|
||||
data-up-url="{$product.up_quantity_url}"
|
||||
data-update-url="{$product.update_quantity_url}"
|
||||
data-product-id="{$product.id_product}"
|
||||
unique-product-id="{$product.id_product|escape:'javascript':'UTF-8'}-{$product.id_product_attribute|escape:'javascript':'UTF-8'}-{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
type="text"
|
||||
value="{if isset($dimension_text)}{$dimension_quantity|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}"
|
||||
name="product-quantity-spin"
|
||||
min="{$product.minimal_quantity}"
|
||||
/>
|
||||
{if isset($dimension_text)}
|
||||
<div class="input-group-append" style="height: 40px;line-height: 40px;float:right;">
|
||||
<span class="input-group-text small-text text-muted">{$dimension_unit|escape:'htmlall':'UTF-8'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- total -->
|
||||
<div class="row_cs product-total col-lg-2 col-md-4 col-sm-12 col-xs-12">
|
||||
<span class="price">
|
||||
<span class="value">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift">{l s='Gift' d='Shop.Theme.Checkout'}</span>
|
||||
{else}
|
||||
{$product.total}
|
||||
{/if}
|
||||
</span>
|
||||
<span class="value"> </span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
{if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
{foreach from=$customization.fields item="field"}
|
||||
{assign var="dimension_text" value=" "|explode:$field.text}
|
||||
<div class="alert medium-alert alert-info" style="width: 100%;">
|
||||
<p style="float:left;">{$field.label} </p>
|
||||
<div class="value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if isset($dimension_text)}
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var id_product = {$product.id_product|intval};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getdimensiondata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
results = data;
|
||||
id_product=id_product;
|
||||
//console.table(results);
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof results !== 'undefined' && results.length > 0) {
|
||||
var displayquantity = results[0]['displayquantity'];
|
||||
|
||||
if ((results[0]) && (displayquantity == 'decimalok')) {
|
||||
if (results[0]['step_width'])
|
||||
stepvalue = results[0]['step_width'];
|
||||
else
|
||||
stepvalue = results[0]['step'];
|
||||
|
||||
if(!stepvalue)
|
||||
stepvalue = 1;
|
||||
|
||||
switch(results[0]['calculationtype']) {
|
||||
case "weight":
|
||||
if (results[0]['minweight'])
|
||||
minvalue = results[0]['minweight'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxweight'])
|
||||
maxvalue = results[0]['maxweight'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
default:
|
||||
if (results[0]['minwidth'])
|
||||
minvalue = results[0]['minwidth'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxwidth'])
|
||||
maxvalue = results[0]['maxwidth'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('min', parseFloat(minvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('max', parseFloat(maxvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('step', parseFloat(stepvalue));
|
||||
}
|
||||
}
|
||||
|
||||
if (displayquantity == "decimalok") {
|
||||
window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"] = $("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val();
|
||||
setInterval(function(){
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val(parseFloat(window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"]).toFixed(4));
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.cart-item .bootstrap-touchspin {
|
||||
max-width:80px;
|
||||
float:left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,66 @@
|
||||
{**
|
||||
* 2007-2020 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="cart-overview js-cart" data-refresh-url="{url entity='cart' params=['ajax' => true, 'action' => 'refresh']}">
|
||||
<div class="label-title hidden-xs">
|
||||
<div class="col-lg-6 col-md-7 col-sm-7 col-xs-12">{l s='Products' d='Shop.Theme.Checkout'}</div>
|
||||
<div class="col-lg-6 col-md-5 col-sm-5 col-xs-12">
|
||||
<div class="pd-0 col-lg-4 col-md-4 col-sm-4 col-xs-12">{l s='Price' d='Shop.Theme.Checkout'}</div>
|
||||
<div class="pd-0 col-lg-4 col-md-4 col-sm-4 col-xs-12 text-center">{l s='Quantity' d='Shop.Theme.Checkout'}</div>
|
||||
<div class="pd-0 col-lg-4 col-md-4 col-sm-4 col-xs-12 text-right">{l s='Total' d='Shop.Theme.Checkout'}</div>
|
||||
</div>
|
||||
</div>
|
||||
{if $cart.products}
|
||||
<ul class="cart-items">
|
||||
{foreach from=$cart.products item=product}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<li class="cart-item">{include file='checkout/_partials/cart-detailed-product-line-override.tpl' product=$product}</li>
|
||||
{else}
|
||||
<li class="cart-item">{include file='checkout/_partials/cart-detailed-product-line.tpl' product=$product}</li>
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{if $product.customizations|count >1}
|
||||
<hr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<div class="no-items text-center">
|
||||
<svg width="119" height="119" viewBox="0 0 119 119" fill="none">
|
||||
<use xlink:href="#icon-empty_shopping_bag">
|
||||
<symbol id="icon-empty_shopping_bag" fill="none" viewBox="0 0 100 119">
|
||||
<path d="M5.86 119h88.28a5.865 5.865 0 0 0 5.86-5.859V21.484a1.953 1.953 0 0 0-1.953-1.953H84.375C84.375 8.761 75.613 0 64.844 0 54.05 0 45.313 8.73 45.313 19.531H30.468a1.953 1.953 0 0 0-1.953 1.953v32.657H1.953A1.953 1.953 0 0 0 0 56.094v57.047A5.865 5.865 0 0 0 5.86 119zm-1.954-5.859V97.109H49.22v16.032a1.955 1.955 0 0 1-1.953 1.953H5.859a1.955 1.955 0 0 1-1.953-1.953zm90.235 1.953H52.789a5.83 5.83 0 0 0 .336-1.953V97.109h42.969v16.032a1.955 1.955 0 0 1-1.953 1.953zM64.844 3.906c8.616 0 15.625 7.01 15.625 15.625h-31.25c0-8.635 6.984-15.625 15.625-15.625zM32.422 23.438h12.89v8.984H43.36a1.953 1.953 0 1 0 0 3.906h7.813a1.953 1.953 0 1 0 0-3.906H49.22v-8.984h31.25v8.984h-1.953a1.953 1.953 0 1 0 0 3.906h7.812a1.953 1.953 0 1 0 0-3.906h-1.953v-8.984h11.719v69.765h-42.97v-37.11a1.953 1.953 0 0 0-1.953-1.952h-18.75V23.438zm16.797 34.609v35.156H3.906V58.047H49.22z" fill="currentColor"></path>
|
||||
<path d="M14.844 69.766v3.906c0 6.474 5.244 11.719 11.719 11.719 6.462 0 11.718-5.257 11.718-11.72v-3.905a1.953 1.953 0 1 0 0-3.907h-3.906a1.953 1.953 0 1 0 0 3.907v3.906c0 4.307-3.505 7.812-7.813 7.812a7.812 7.812 0 0 1-7.812-7.812v-3.906a1.953 1.953 0 1 0 0-3.907h-3.906a1.953 1.953 0 1 0 0 3.907z" fill="currentColor"></path>
|
||||
</symbol>
|
||||
</use>
|
||||
</svg>
|
||||
<h3>{l s='Shopping Bag is Empty' d='Shop.Theme.Checkout'}</h3>
|
||||
<span>{l s='Your shopping bag is empty.' d='Shop.Theme.Checkout'}</span>
|
||||
<a class="btn-border" href="{$urls.pages.index}">
|
||||
{l s='Continue shopping' d='Shop.Theme.Actions'}
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,53 @@
|
||||
{**
|
||||
* 2007-2020 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_summary_product_line'}
|
||||
<div class="media-left">
|
||||
<a href="{$product.url}" title="{$product.name}">
|
||||
<img class="media-object" src="{$product.cover.small.url}" alt="{$product.name}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="product-link">{$product.name}</span>
|
||||
{* MEG Venture *}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<span class="product-quantity">x{if isset($dimension_text)}{$dimension_quantity|string_format:"%.2f"} {$dimension_unit|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}</span>
|
||||
{* <span class="product-quantity">x{$product.quantity}</span> *}
|
||||
{* MEG Venture *}
|
||||
<span class="product-price float-xs-right">{$product.price}</span>
|
||||
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,80 @@
|
||||
{**
|
||||
* 2007-2020 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<section id="js-checkout-summary" class="card js-cart" data-refresh-url="{$urls.pages.cart}?ajax=1">
|
||||
<div class="card-block">
|
||||
{hook h='displayCheckoutSummaryTop'}
|
||||
{block name='cart_summary_products'}
|
||||
<div class="cart-summary-products">
|
||||
|
||||
<b>{$cart.summary_string}</b>
|
||||
|
||||
<p>
|
||||
<a id="show-detail" href="#" data-toggle="collapse" data-target="#cart-summary-product-list">
|
||||
{l s='show details' d='Shop.Theme.Actions'}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{block name='cart_summary_product_list'}
|
||||
<div class="collapse" id="cart-summary-product-list">
|
||||
<ul class="media-list">
|
||||
{foreach from=$cart.products item=product}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line-override.tpl' product=$product}</li>
|
||||
{else}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li>
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_subtotals'}
|
||||
{foreach from=$cart.subtotals item="subtotal"}
|
||||
{if $subtotal && $subtotal.type !== 'tax'}
|
||||
<div class="cart-summary-line cart-summary-subtotals" id="cart-subtotal-{$subtotal.type}">
|
||||
<span class="label">{$subtotal.label}</span>
|
||||
<span class="value pull-right">{$subtotal.value}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
|
||||
{block name='cart_summary_voucher'}
|
||||
{include file='checkout/_partials/cart-voucher.tpl'}
|
||||
{/block}
|
||||
|
||||
<hr>
|
||||
|
||||
{block name='cart_summary_totals'}
|
||||
{include file='checkout/_partials/cart-summary-totals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,271 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{$product_price = $product.price|regex_replace:'/[^0-9,.]+/':''}
|
||||
{$currency = $product.price|regex_replace:'/[A-Za-z0-9.,]+/':''}
|
||||
{$unit_price = $product_price|floatval / $dimension_quantity|floatval}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<div class="product-line-grid row">
|
||||
<!-- product left content: image-->
|
||||
<div class="product-line-grid-left col-md-3 col-xs-4">
|
||||
<span class="product-image media-middle">
|
||||
{if $product.cover}
|
||||
<img src="{$product.cover.bySize.cart_default.url}" alt="{$product.name|escape:'quotes'}">
|
||||
{else}
|
||||
<img src="{$urls.no_picture_image.bySize.cart_default.url}" />
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- product left body: description -->
|
||||
<div class="product-line-grid-body col-md-4 col-xs-8">
|
||||
<div class="product-line-info">
|
||||
<a class="label" href="{$product.url}" data-id_customization="{$product.id_customization|intval}">{$product.name}</a>
|
||||
</div>
|
||||
|
||||
<div class="product-line-info product-price h5 {if $product.has_discount}has-discount{/if}">
|
||||
{if $product.has_discount}
|
||||
<div class="product-discount">
|
||||
<span class="regular-price">{$product.regular_price}</span>
|
||||
{if $product.discount_type === 'percentage'}
|
||||
<span class="discount discount-percentage">
|
||||
-{$product.discount_percentage_absolute}
|
||||
</span>
|
||||
{else}
|
||||
<span class="discount discount-amount">
|
||||
-{$product.discount_to_display}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="current-price">
|
||||
<span class="price">{$product.price}</span>
|
||||
{if $product.unit_price_full}
|
||||
{if $dimension_text}
|
||||
<div class="unit-price-cart">{$currency}{$unit_price|string_format:"%.2f"} per {$dimension_unit|escape:'htmlall':'UTF-8'}</div>
|
||||
{else}
|
||||
<div class="unit-price-cart">{$product.unit_price_full}</div>
|
||||
{/if}
|
||||
{* <div class="unit-price-cart">{$product.unit_price_full}</div> *}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<!-- product left body: description -->
|
||||
<div class="product-line-grid-right product-line-actions col-md-5 col-xs-12">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 hidden-md-up"></div>
|
||||
<div class="col-md-10 col-xs-6">
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-xs-6 col-sp-12 qty">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift-quantity">{$product.quantity}</span>
|
||||
{else}
|
||||
<input
|
||||
style="font-size: 14px;padding:0;"
|
||||
class="js-cart-line-product-quantity"
|
||||
data-down-url="{$product.down_quantity_url}"
|
||||
data-up-url="{$product.up_quantity_url}"
|
||||
data-update-url="{$product.update_quantity_url}"
|
||||
data-product-id="{$product.id_product}"
|
||||
unique-product-id="{$product.id_product|escape:'javascript':'UTF-8'}-{$product.id_product_attribute|escape:'javascript':'UTF-8'}-{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
type="number"
|
||||
value="{if isset($dimension_text)}{$dimension_quantity|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}"
|
||||
name="product-quantity-spin"
|
||||
/>
|
||||
{if isset($dimension_text)}
|
||||
<div class="input-group-append" style="height: 40px;line-height: 40px;float:right;">
|
||||
<span class="input-group-text small-text text-muted">{$dimension_unit|escape:'htmlall':'UTF-8'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-md-7 col-xs-2 col-sp-12 price">
|
||||
<span class="product-price">
|
||||
<strong>
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift">{l s='Gift' d='Shop.Theme.Checkout'}</span>
|
||||
{else}
|
||||
{$product.total}
|
||||
{/if}
|
||||
</strong>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-2 text-xs-right">
|
||||
<div class="cart-line-product-actions">
|
||||
<a
|
||||
class = "remove-from-cart"
|
||||
rel = "nofollow"
|
||||
href = "{$product.remove_from_cart_url}"
|
||||
data-link-action = "delete-from-cart"
|
||||
data-id-product = "{$product.id_product|escape:'javascript'}"
|
||||
data-id-product-attribute = "{$product.id_product_attribute|escape:'javascript'}"
|
||||
data-id-customization = "{$product.id_customization|escape:'javascript'}"
|
||||
>
|
||||
{if !isset($product.is_gift) || !$product.is_gift}
|
||||
<i class="material-icons float-xs-left">delete</i>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{block name='hook_cart_extra_product_actions'}
|
||||
{hook h='displayCartExtraProductActions' product=$product}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
{foreach from=$customization.fields item="field"}
|
||||
{assign var="dimension_text" value=" "|explode:$field.text}
|
||||
<div class="alert medium-alert alert-info" style="width: 100%;">
|
||||
<p style="float:left;">{$field.label} </p>
|
||||
<div class="value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if}
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
{if isset($dimension_text)}
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var id_product = {$product.id_product|intval};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getdimensiondata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
results = data;
|
||||
id_product=id_product;
|
||||
//console.table(results);
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof results !== 'undefined' && results.length > 0) {
|
||||
var displayquantity = results[0]['displayquantity'];
|
||||
|
||||
if ((results[0]) && (displayquantity == 'decimalok')) {
|
||||
if (results[0]['step_width'])
|
||||
stepvalue = results[0]['step_width'];
|
||||
else
|
||||
stepvalue = results[0]['step'];
|
||||
|
||||
if(!stepvalue)
|
||||
stepvalue = 1;
|
||||
|
||||
switch(results[0]['calculationtype']) {
|
||||
case "weight":
|
||||
if (results[0]['minweight'])
|
||||
minvalue = results[0]['minweight'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxweight'])
|
||||
maxvalue = results[0]['maxweight'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
default:
|
||||
if (results[0]['minwidth'])
|
||||
minvalue = results[0]['minwidth'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxwidth'])
|
||||
maxvalue = results[0]['maxwidth'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('min', parseFloat(minvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('max', parseFloat(maxvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('step', parseFloat(stepvalue));
|
||||
}
|
||||
}
|
||||
|
||||
if (displayquantity == "decimalok") {
|
||||
window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"] = $("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val();
|
||||
setInterval(function(){
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val(parseFloat(window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"]).toFixed(4));
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.cart-item .bootstrap-touchspin {
|
||||
max-width:80px;
|
||||
float:left;
|
||||
margin-left: -10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,48 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_detailed_product'}
|
||||
<div class="cart-overview js-cart" data-refresh-url="{url entity='cart' params=['ajax' => true, 'action' => 'refresh']}">
|
||||
{if $cart.products}
|
||||
<ul class="cart-items">
|
||||
{foreach from=$cart.products item=product}
|
||||
<li class="cart-item">
|
||||
{block name='cart_detailed_product_line'}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
{include file='checkout/_partials/cart-detailed-product-line-override.tpl' product=$product}
|
||||
{else}
|
||||
{include file='checkout/_partials/cart-detailed-product-line.tpl' product=$product}
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/block}
|
||||
</li>
|
||||
{if is_array($product.customizations) && $product.customizations|count >1}<hr>{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<span class="no-items">{l s='There are no more items in your cart' d='Shop.Theme.Checkout'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,60 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_summary_product_line'}
|
||||
<div class="media-left">
|
||||
<a href="{$product.url}" title="{$product.name}">
|
||||
<img class="media-object" src="{$product.cover.small.url}" alt="{$product.name}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="product-name">{$product.name}</span>
|
||||
{* MEG Venture *}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<span class="product-quantity">x{if isset($dimension_text)}{$dimension_quantity|string_format:"%.2f"} {$dimension_unit|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}</span>
|
||||
{* MEG Venture *}
|
||||
{* <span class="product-quantity">x{$product.quantity}</span> *}
|
||||
<span class="product-price float-xs-right">{$product.price}</span>
|
||||
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info product-line-info-secondary text-muted">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
<br/>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,75 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<section id="js-checkout-summary" class="card js-cart" data-refresh-url="{$urls.pages.cart}?ajax=1&action=refresh">
|
||||
<div class="card-block">
|
||||
{block name='hook_checkout_summary_top'}
|
||||
{hook h='displayCheckoutSummaryTop'}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_products'}
|
||||
<div class="cart-summary-products">
|
||||
|
||||
<p>{$cart.summary_string}</p>
|
||||
|
||||
<p>
|
||||
<a href="#" data-toggle="collapse" data-target="#cart-summary-product-list" class="btn btn-outline">
|
||||
{l s='show details' d='Shop.Theme.Actions'}
|
||||
<i class="material-icons">expand_more</i>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{block name='cart_summary_product_list'}
|
||||
<div class="collapse" id="cart-summary-product-list">
|
||||
<ul class="media-list">
|
||||
{foreach from=$cart.products item=product}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line-override.tpl' product=$product}</li>
|
||||
{else}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li>
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_subtotals'}
|
||||
{include file='checkout/_partials/cart-summary-subtotals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
|
||||
{block name='cart_summary_totals'}
|
||||
{include file='checkout/_partials/cart-summary-totals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_voucher'}
|
||||
{include file='checkout/_partials/cart-voucher.tpl'}
|
||||
{/block}
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,261 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{$product_price = $product.price|regex_replace:'/[^0-9,.]+/':''}
|
||||
{$currency = $product.price|regex_replace:'/[A-Za-z0-9.,]+/':''}
|
||||
{$unit_price = $product_price|floatval / $dimension_quantity|floatval}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<div class="product-line-grid">
|
||||
<!-- product line left content: image-->
|
||||
<div class="product-line-grid-left col-md-3 col-xs-4">
|
||||
<span class="product-image media-middle">
|
||||
{if $product.cover}
|
||||
<img src="{$product.cover.bySize.cart_default.url|escape:'quotes':'UTF-8'}" alt="{$product.name|escape:'quotes':'UTF-8'}">
|
||||
{else}
|
||||
<img src="{$urls.no_picture_image.bySize.cart_default.url}" />
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- product line body: label, discounts, price, attributes, customizations -->
|
||||
<div class="product-line-grid-body col-md-4 col-xs-8">
|
||||
<div class="product-line-info">
|
||||
<a class="label" href="{$product.url}" data-id_customization="{$product.id_customization|intval}">{$product.name}</a>
|
||||
</div>
|
||||
|
||||
<div class="product-line-info product-price h5 {if $product.has_discount}has-discount{/if}">
|
||||
{if $product.has_discount}
|
||||
<div class="product-discount">
|
||||
<span class="regular-price">{$product.regular_price}</span>
|
||||
{if $product.discount_type === 'percentage'}
|
||||
<span class="discount discount-percentage">
|
||||
-{$product.discount_percentage_absolute}
|
||||
</span>
|
||||
{else}
|
||||
<span class="discount discount-amount">
|
||||
-{$product.discount_to_display}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="current-price">
|
||||
<span class="price">{$product.price}</span>
|
||||
{if $product.unit_price_full}
|
||||
{if $dimension_text}
|
||||
<div class="unit-price-cart">{$currency}{$unit_price|string_format:"%.2f"} per {$dimension_unit|escape:'htmlall':'UTF-8'}</div>
|
||||
{else}
|
||||
<div class="unit-price-cart">{$product.unit_price_full}</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info {$attribute|lower}">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<!-- product line right content: actions (quantity, delete), price -->
|
||||
<div class="product-line-grid-right product-line-actions col-md-5 col-xs-12">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 hidden-md-up"></div>
|
||||
<div class="col-md-10 col-xs-6">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-6 qty" style="width: 60%;margin-left: -25px;">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift-quantity">{$product.quantity}</span>
|
||||
{else}
|
||||
<input
|
||||
class="js-cart-line-product-quantity"
|
||||
style="width: 4rem;"
|
||||
data-down-url="{$product.down_quantity_url}"
|
||||
data-up-url="{$product.up_quantity_url}"
|
||||
data-update-url="{$product.update_quantity_url}"
|
||||
data-product-id="{$product.id_product|intval}"
|
||||
unique-product-id="{$product.id_product|escape:'javascript':'UTF-8'}-{$product.id_product_attribute|escape:'javascript':'UTF-8'}-{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
type="number"
|
||||
value="{if isset($dimension_text)}{$dimension_quantity|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}"
|
||||
name="product-quantity-spin"
|
||||
/>
|
||||
{if isset($dimension_text)}
|
||||
<div class="input-group-append" style="height: 40px;line-height: 40px;">
|
||||
<span class="input-group-text small-text text-muted">{$dimension_unit|escape:'htmlall':'UTF-8'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-2 price">
|
||||
<span class="product-price">
|
||||
<strong>
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift">{l s='Gift' d='Shop.Theme.Checkout'}</span>
|
||||
{else}
|
||||
{$product.total}
|
||||
{/if}
|
||||
</strong>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-2 text-xs-right">
|
||||
<div class="cart-line-product-actions">
|
||||
<a
|
||||
class = "remove-from-cart"
|
||||
rel = "nofollow"
|
||||
href = "{$product.remove_from_cart_url}"
|
||||
data-link-action = "delete-from-cart"
|
||||
data-id-product = "{$product.id_product|escape:'javascript':'UTF-8'}"
|
||||
data-id-product-attribute = "{$product.id_product_attribute|escape:'javascript':'UTF-8'}"
|
||||
data-id-customization = "{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
>
|
||||
{if !isset($product.is_gift) || !$product.is_gift}
|
||||
<i class="material-icons float-xs-left">delete</i>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{block name='hook_cart_extra_product_actions'}
|
||||
{hook h='displayCartExtraProductActions' product=$product}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
{foreach from=$customization.fields item="field"}
|
||||
{assign var="dimension_text" value=" "|explode:$field.text}
|
||||
<div class="alert medium-alert alert-info">
|
||||
<p style="float:left;">{$field.label} </p>
|
||||
<div class="value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if isset($dimension_text)}
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var id_product = {$product.id_product|intval};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getdimensiondata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
results = data;
|
||||
id_product=id_product;
|
||||
//console.table(results);
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof results !== 'undefined' && results.length > 0) {
|
||||
var displayquantity = results[0]['displayquantity'];
|
||||
|
||||
if ((results[0]) && (displayquantity == 'decimalok')) {
|
||||
if (results[0]['step_width'])
|
||||
stepvalue = results[0]['step_width'];
|
||||
else
|
||||
stepvalue = results[0]['step'];
|
||||
|
||||
if(!stepvalue)
|
||||
stepvalue = 1;
|
||||
|
||||
switch(results[0]['calculationtype']) {
|
||||
case "weight":
|
||||
if (results[0]['minweight'])
|
||||
minvalue = results[0]['minweight'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxweight'])
|
||||
maxvalue = results[0]['maxweight'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
default:
|
||||
if (results[0]['minwidth'])
|
||||
minvalue = results[0]['minwidth'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxwidth'])
|
||||
maxvalue = results[0]['maxwidth'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('min', parseFloat(minvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('max', parseFloat(maxvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('step', parseFloat(stepvalue));
|
||||
}
|
||||
}
|
||||
|
||||
if (displayquantity == "decimalok") {
|
||||
window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"] = $("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val();
|
||||
setInterval(function(){
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val(parseFloat(window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"]).toFixed(4));
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
@@ -0,0 +1,48 @@
|
||||
{**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2018 PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_detailed_product'}
|
||||
<div class="cart-overview js-cart" data-refresh-url="{url entity='cart' params=['ajax' => true, 'action' => 'refresh']}">
|
||||
{if $cart.products}
|
||||
<ul class="cart-items">
|
||||
{foreach from=$cart.products item=product}
|
||||
<li class="cart-item">
|
||||
{block name='cart_detailed_product_line'}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
{include file='checkout/_partials/cart-detailed-product-line-override.tpl' product=$product}
|
||||
{else}
|
||||
{include file='checkout/_partials/cart-detailed-product-line.tpl' product=$product}
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/block}
|
||||
</li>
|
||||
{if is_array($product.customizations) && $product.customizations|count >1}<hr>{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<span class="no-items">{l s='There are no more items in your cart' d='Shop.Theme.Checkout'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,60 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
{block name='cart_summary_product_line'}
|
||||
<div class="media-left">
|
||||
<a href="{$product.url}" title="{$product.name}">
|
||||
<img class="media-object" src="{$product.cover.small.url}" alt="{$product.name}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="product-name">{$product.name}</span>
|
||||
{* <span class="product-quantity">x{$product.quantity}</span> *}
|
||||
{* MEG Venture *}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<span class="product-quantity">x{if isset($dimension_text)}{$dimension_quantity|string_format:"%.2f"} {$dimension_unit|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}</span>
|
||||
{* MEG Venture *}
|
||||
<span class="product-price float-xs-right">{$product.price}</span>
|
||||
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info product-line-info-secondary text-muted">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
<br/>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,83 @@
|
||||
{**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2018 PrestaShop SA
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<section id="js-checkout-summary" class="card js-cart" data-refresh-url="{$urls.pages.cart}?ajax=1&action=refresh">
|
||||
<div class="card-block">
|
||||
{block name='hook_checkout_summary_top'}
|
||||
{hook h='displayCheckoutSummaryTop'}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_products'}
|
||||
<div class="cart-summary-products">
|
||||
|
||||
<p>{$cart.summary_string}</p>
|
||||
|
||||
<p>
|
||||
<a href="#" data-toggle="collapse" data-target="#cart-summary-product-list">
|
||||
{l s='show details' d='Shop.Theme.Actions'}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{block name='cart_summary_product_list'}
|
||||
<div class="collapse" id="cart-summary-product-list">
|
||||
<ul class="media-list">
|
||||
{foreach from=$cart.products item=product}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<li class="media cart-summary-product">{include file='checkout/_partials/cart-summary-product-line-override.tpl' product=$product}</li>
|
||||
{else}
|
||||
<li class="media">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li>
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_subtotals'}
|
||||
{foreach from=$cart.subtotals item="subtotal"}
|
||||
{if $subtotal && $subtotal.type !== 'tax'}
|
||||
<div class="cart-summary-line cart-summary-subtotals" id="cart-subtotal-{$subtotal.type}">
|
||||
<span class="label">{$subtotal.label}</span>
|
||||
<span class="value">{$subtotal.value}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
|
||||
{block name='cart_summary_voucher'}
|
||||
{include file='checkout/_partials/cart-voucher.tpl'}
|
||||
{/block}
|
||||
|
||||
<hr class="separator">
|
||||
|
||||
{block name='cart_summary_totals'}
|
||||
{include file='checkout/_partials/cart-summary-totals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,239 @@
|
||||
{* MEG Venture *}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
var id_product = {$product.id_product|intval};
|
||||
var id_customization = {if ($product.id_customization)}{$product.id_customization|escape:'javascript'}{else}0{/if};
|
||||
if(id_customization != 0) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product,
|
||||
id_customization:id_customization
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getcustomizationdata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
customization_data = data;
|
||||
id_product=id_product;
|
||||
//console.table(customization_data);
|
||||
//if (parseFloat(customization_data[0]['converted_ea']).toFixed(2) != $("[unique-product-id-cart={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val()) {
|
||||
// location.reload();
|
||||
//}
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{$product_price = $product.price|regex_replace:'/[^0-9,.]+/':''}
|
||||
{$currency = $product.price|regex_replace:'/[A-Za-z0-9.,]+/':''}
|
||||
{$unit_price = $product_price|floatval / $dimension_quantity|floatval}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/if}
|
||||
{* MEG Venture *}
|
||||
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-3">
|
||||
<span class="product-image media-middle">
|
||||
{if $product.cover} <a href="{$product.url}"><img src="{$product.cover.bySize.cart_default.url}"
|
||||
alt="{$product.name|escape:'quotes'}"
|
||||
class="img-fluid"></a>{/if}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col col-info">
|
||||
<div class="pb-1">
|
||||
<a href="{$product.url}">{$product.name}</a>
|
||||
</div>
|
||||
|
||||
{if isset($product.attributes) && $product.attributes}
|
||||
<div class="product-attributes text-muted pb-1">
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="row align-items-center mt-2 no-gutters">
|
||||
<div class="col mr-2">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<input
|
||||
class="form-control block-cart-product-quantity-gift"
|
||||
type="number"
|
||||
value="{$product.quantity}"
|
||||
disabled
|
||||
/>
|
||||
{else}
|
||||
<input
|
||||
class="block-cart-product-quantity form-control js-cart-line-product-quantity"
|
||||
data-down-url="{$product.down_quantity_url}"
|
||||
data-up-url="{$product.up_quantity_url}"
|
||||
data-update-url="{$product.update_quantity_url}"
|
||||
data-product-id="{$product.id_product}"
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}unique-product-id-cart="{$product.id_product|escape:'javascript':'UTF-8'}-{$product.id_product_attribute|escape:'javascript':'UTF-8'}-{$product.id_customization|escape:'javascript':'UTF-8'}"{/if}
|
||||
data-link-place="cart-preview"
|
||||
type="number"
|
||||
value="{if (isset($dimension_text) && (Configuration::get('squaremeter_cartupdate') == 'on'))}{$dimension_quantity|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}"
|
||||
name="product-quantity-spin"
|
||||
min="{$product.minimal_quantity}"
|
||||
/>
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
{if isset($dimension_text)}
|
||||
<div class="input-group-append" style="height: 36.5px;">
|
||||
<span class="input-group-text small-text text-muted">{$dimension_unit|escape:'htmlall':'UTF-8'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<span>{$product.price}</span>
|
||||
{else}
|
||||
<span class="text-muted">x</span> <span>{$product.price}</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="col col-auto">
|
||||
<a class="remove-from-cart"
|
||||
rel="nofollow"
|
||||
href="{$product.remove_from_cart_url}"
|
||||
data-link-action="delete-from-cart"
|
||||
data-link-place="cart-preview"
|
||||
data-id-product="{$product.id_product|escape:'javascript'}"
|
||||
data-id-product-attribute="{$product.id_product_attribute|escape:'javascript'}"
|
||||
data-id-customization="{$product.id_customization|escape:'javascript'}"
|
||||
title="{l s='remove from cart' d='Shop.Theme.Actions'}"
|
||||
>
|
||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<div class="clearfix"></div>
|
||||
{if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
{foreach from=$customization.fields item="field"}
|
||||
{assign var="dimension_text" value=" "|explode:$field.text}
|
||||
<div class="alert medium-alert alert-info" style="width: 100%;">
|
||||
<p style="float:left;">{$field.label} </p>
|
||||
<div class="value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if (isset($dimension_text) && (Configuration::get('squaremeter_cartupdate') == 'on'))}
|
||||
<script type="text/javascript">
|
||||
var id_product = {$product.id_product|intval};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getdimensiondata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
results = data;
|
||||
id_product=id_product;
|
||||
//console.table(results);
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof results !== 'undefined' && results.length > 0) {
|
||||
var displayquantity = results[0]['displayquantity'];
|
||||
|
||||
if ((results[0]) && (displayquantity == 'decimalok')) {
|
||||
if (results[0]['step_width'])
|
||||
stepvalue = results[0]['step_width'];
|
||||
else
|
||||
stepvalue = results[0]['step'];
|
||||
|
||||
if(!stepvalue)
|
||||
stepvalue = 1;
|
||||
|
||||
switch(results[0]['calculationtype']) {
|
||||
case "weight":
|
||||
if (results[0]['minweight'])
|
||||
minvalue = results[0]['minweight'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxweight'])
|
||||
maxvalue = results[0]['maxweight'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
default:
|
||||
if (results[0]['minwidth'])
|
||||
minvalue = results[0]['minwidth'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxwidth'])
|
||||
maxvalue = results[0]['maxwidth'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$("[unique-product-id-cart={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('min', parseFloat(minvalue));
|
||||
$("[unique-product-id-cart={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('max', parseFloat(maxvalue));
|
||||
$("[unique-product-id-cart={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('step', parseFloat(stepvalue));
|
||||
}
|
||||
}
|
||||
|
||||
if (displayquantity == "decimalok") {
|
||||
window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"] = $("[unique-product-id-cart={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val();
|
||||
setInterval(function(){
|
||||
$("[unique-product-id-cart={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val(parseFloat(window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"]).toFixed(2));
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.input-group.bootstrap-touchspin {
|
||||
float:left;
|
||||
width:75px;
|
||||
}
|
||||
</style>
|
||||
{/if}
|
||||
@@ -0,0 +1,270 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{$product_price = $product.price|regex_replace:'/[^0-9,.]+/':''}
|
||||
{$currency = $product.price|regex_replace:'/[A-Za-z0-9.,]+/':''}
|
||||
{$unit_price = $product_price|floatval / $dimension_quantity|floatval}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<div class="product-line-grid row align-items-center small-gutters">
|
||||
|
||||
|
||||
<!-- product left body: description -->
|
||||
<div class="product-line-grid-body col-12 col-sm-6 col-md-6">
|
||||
<div class="row align-items-center small-gutters">
|
||||
<div class="col product-image">
|
||||
|
||||
<a href="{$product.url}" data-id_customization="{$product.id_customization|intval}">
|
||||
{if $product.cover}
|
||||
<img src="{$product.cover.bySize.cart_default.url}" alt="{$product.name|escape:'quotes'}"
|
||||
class="img-fluid">
|
||||
{else}
|
||||
<img src="{$urls.no_picture_image.bySize.cart_default.url}" alt="{$product.name|escape:'quotes'}"
|
||||
class="img-fluid"/>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="col col-9">
|
||||
<div class="product-line-info">
|
||||
<a class="label" href="{$product.url}"
|
||||
data-id_customization="{$product.id_customization|intval}">{$product.name}</a>
|
||||
</div>
|
||||
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info product-line-info-secondary text-muted">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- product left body: description -->
|
||||
<div class="col-12 col-sm-6 col-md-6 product-line-grid-right product-line-actions">
|
||||
<div class="row align-items-center small-gutters justify-content-end">
|
||||
<!-- product unit-->
|
||||
<div class="col col-auto col-md unit-price">
|
||||
{if $product.has_discount}
|
||||
<span class="product-discount">
|
||||
{* <span class="regular-price">{$product.regular_price}</span> *}
|
||||
{if $product.discount_type === 'percentage'}
|
||||
<span class="discount discount-percentage mr-1">
|
||||
-{$product.discount_percentage_absolute}
|
||||
</span>
|
||||
{else}
|
||||
<span class="discount discount-amount mr-1">
|
||||
-{$product.discount_to_display}
|
||||
</span>
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
<span class="value">{$product.price}</span>
|
||||
{if $product.unit_price_full}
|
||||
{if $dimension_text}
|
||||
<div class="unit-price-cart">{$currency}{$unit_price|string_format:"%.2f"} per {$dimension_unit|escape:'htmlall':'UTF-8'}</div>
|
||||
{else}
|
||||
<div class="unit-price-cart">{$product.unit_price_full}</div>
|
||||
{/if}
|
||||
{* <div class="unit-price-cart">{$product.unit_price_full}</div> *}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="col col-auto col-md qty">
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift-quantity">{$product.quantity}</span>
|
||||
{else}
|
||||
<input
|
||||
class="js-cart-line-product-quantity"
|
||||
style="font-size: 14px;padding:0;"
|
||||
data-down-url="{$product.down_quantity_url}"
|
||||
data-up-url="{$product.up_quantity_url}"
|
||||
data-update-url="{$product.update_quantity_url}"
|
||||
data-product-id="{$product.id_product}"
|
||||
unique-product-id="{$product.id_product|escape:'javascript':'UTF-8'}-{$product.id_product_attribute|escape:'javascript':'UTF-8'}-{$product.id_customization|escape:'javascript':'UTF-8'}"
|
||||
type="number"
|
||||
value="{if isset($dimension_text)}{$dimension_quantity|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}"
|
||||
name="product-quantity-spin"
|
||||
/>
|
||||
{if isset($dimension_text)}
|
||||
<div class="input-group-append" style="height: 40px;line-height: 40px;float:right;">
|
||||
<span class="input-group-text small-text text-muted">{$dimension_unit|escape:'htmlall':'UTF-8'}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col col-auto col-md price">
|
||||
<span class="product-price">
|
||||
<strong>
|
||||
{if isset($product.is_gift) && $product.is_gift}
|
||||
<span class="gift">{l s='Gift' d='Shop.Theme.Checkout'}</span>
|
||||
{else}
|
||||
{$product.total}
|
||||
{/if}
|
||||
</strong>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="col col-auto">
|
||||
<div class="cart-line-product-actions">
|
||||
<a
|
||||
class="remove-from-cart"
|
||||
rel="nofollow"
|
||||
href="{$product.remove_from_cart_url}"
|
||||
data-link-action="delete-from-cart"
|
||||
data-id-product="{$product.id_product|escape:'javascript'}"
|
||||
data-id-product-attribute="{$product.id_product_attribute|escape:'javascript'}"
|
||||
data-id-customization="{$product.id_customization|escape:'javascript'}"
|
||||
>
|
||||
{if !isset($product.is_gift) || !$product.is_gift}
|
||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{block name='hook_cart_extra_product_actions'}
|
||||
{hook h='displayCartExtraProductActions' product=$product}
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{if is_array($product.customizations) && $product.customizations|count}
|
||||
<br>
|
||||
{block name='cart_detailed_product_line_customization'}
|
||||
{foreach from=$product.customizations item="customization"}
|
||||
{foreach from=$customization.fields item="field"}
|
||||
{assign var="dimension_text" value=" "|explode:$field.text}
|
||||
<div class="alert medium-alert alert-info" style="width: 100%;">
|
||||
<p style="float:left;">{$field.label} </p>
|
||||
<div class="value">
|
||||
{if $field.type == 'text'}
|
||||
{if (int)$field.id_module}
|
||||
{$field.text nofilter}
|
||||
{else}
|
||||
{$field.text}
|
||||
{/if}
|
||||
{elseif $field.type == 'image'}
|
||||
<img src="{$field.image.small.url}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/block}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if isset($dimension_text)}
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var id_product = {$product.id_product|intval};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id_product:id_product
|
||||
},
|
||||
url: "index.php?fc=module&module=squaremeter&controller=getdimensiondata",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data) {
|
||||
results = data;
|
||||
id_product=id_product;
|
||||
//console.table(results);
|
||||
},
|
||||
error: function (jqXHR, exception) {
|
||||
console.log(jqXHR);
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof results !== 'undefined' && results.length > 0) {
|
||||
var displayquantity = results[0]['displayquantity'];
|
||||
|
||||
if ((results[0]) && (displayquantity == 'decimalok')) {
|
||||
if (results[0]['step_width'])
|
||||
stepvalue = results[0]['step_width'];
|
||||
else
|
||||
stepvalue = results[0]['step'];
|
||||
|
||||
if(!stepvalue)
|
||||
stepvalue = 1;
|
||||
|
||||
switch(results[0]['calculationtype']) {
|
||||
case "weight":
|
||||
if (results[0]['minweight'])
|
||||
minvalue = results[0]['minweight'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxweight'])
|
||||
maxvalue = results[0]['maxweight'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
default:
|
||||
if (results[0]['minwidth'])
|
||||
minvalue = results[0]['minwidth'];
|
||||
else
|
||||
minvalue = '';
|
||||
if (results[0]['maxwidth'])
|
||||
maxvalue = results[0]['maxwidth'];
|
||||
else
|
||||
maxvalue = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('min', parseFloat(minvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('max', parseFloat(maxvalue));
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").attr('step', parseFloat(stepvalue));
|
||||
}
|
||||
}
|
||||
|
||||
if (displayquantity == "decimalok") {
|
||||
window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"] = $("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val();
|
||||
setInterval(function(){
|
||||
$("[unique-product-id={$product.id_product|intval}-{$product.id_product_attribute|intval}-{$product.id_customization|intval}]").val(parseFloat(window["q" + "{$product.id_product|intval}-" + "{$product.id_product_attribute|intval}-" + "{$product.id_customization|intval}"]).toFixed(4));
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.cart-item .bootstrap-touchspin {
|
||||
max-width:80px;
|
||||
float:left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,63 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_detailed_product'}
|
||||
<div class="cart-overview js-cart" data-refresh-url="{url entity='cart' params=['ajax' => true, 'action' => 'refresh']}">
|
||||
{if $cart.products}
|
||||
<ul class="cart-items">
|
||||
<li class="cart-item-header hidden-sm-down">
|
||||
<div class="row small-gutters">
|
||||
<div class="col-6">{l s='Product' d='Shop.Theme.Checkout'}</div>
|
||||
<div class="col-6">
|
||||
<div class="row small-gutters">
|
||||
<div class="col">{l s='Price' d='Shop.Theme.Checkout'}</div>
|
||||
<div class="col">{l s='Qty' d='Shop.Theme.Checkout'}</div>
|
||||
<div class="col">{l s='Total' d='Shop.Theme.Checkout'}</div>
|
||||
<div class="col col-auto"><i class="fa fa-trash-o invisible" aria-hidden="true"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{foreach from=$cart.products item=product}
|
||||
<li class="cart-item">
|
||||
{block name='cart_detailed_product_line'}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
{include file='checkout/_partials/cart-detailed-product-line-override.tpl' product=$product}
|
||||
{else}
|
||||
{include file='checkout/_partials/cart-detailed-product-line.tpl' product=$product}
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/block}
|
||||
</li>
|
||||
{if is_array($product.customizations) && $product.customizations|count >1}
|
||||
<hr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<div class="alert alert-warning">{l s='There are no more items in your cart' d='Shop.Theme.Checkout'}</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,64 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name='cart_summary_product_line'}
|
||||
<div class="media-left mr-3 align-self-center">
|
||||
{if $product.cover}
|
||||
<a href="{$product.url}" title="{$product.name}">
|
||||
{if $product.cover}
|
||||
<img class="media-object img-fluid" src="{$product.cover.small.url}" alt="{$product.name|escape:'quotes'}">
|
||||
{else}
|
||||
<img class="media-object img-fluid" src="{$urls.no_picture_image.bySize.small_default.url}" alt="{$product.name|escape:'quotes'}">
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="media-body align-self-center">
|
||||
<a href="{$product.url}" title="{$product.name}"><span class="product-name">{$product.name}</span></a>
|
||||
{foreach from=$product.attributes key="attribute" item="value"}
|
||||
<div class="product-line-info product-line-info-secondary text-muted">
|
||||
<span class="label">{$attribute}:</span>
|
||||
<span class="value">{$value}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
{* MEG Venture *}
|
||||
{if isset($dimension_data)}
|
||||
{foreach from=$dimension_data item="ddata"}
|
||||
{foreach from=$customization_added_to_cart item="cdata"}
|
||||
{if $cdata.0.id_customization == $product.id_customization}
|
||||
{if $ddata.0.displayquantity == 'decimalok'}
|
||||
{$dimension_text = $cdata.0.value}
|
||||
{$dimension_quantity = $cdata.0.total_dimension}
|
||||
{$dimension_unit = $cdata.0.unittype_module}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<span class="pull-right"><span class="product-quantity text-muted">x{if isset($dimension_text)}{$dimension_quantity|string_format:"%.2f"} {$dimension_unit|escape:'htmlall':'UTF-8'}{else}{$product.quantity}{/if}</span> {$product.price}</span>
|
||||
{* MEG Venture *}
|
||||
{* <span class="pull-right"><span class="product-quantity text-muted">x{$product.quantity}</span> {$product.price}</span> *}
|
||||
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,79 @@
|
||||
{**
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<section id="js-checkout-summary" class="card cart-summary js-cart"
|
||||
data-refresh-url="{$urls.pages.cart}?ajax=1&action=refresh">
|
||||
<div class="card-body">
|
||||
|
||||
{block name='hook_checkout_summary_top'}
|
||||
{hook h='displayCheckoutSummaryTop'}
|
||||
{/block}
|
||||
|
||||
{block name='cart_summary_products'}
|
||||
<div class="cart-summary-products">
|
||||
|
||||
<div>{$cart.summary_string}
|
||||
<a href="#" data-toggle="collapse" class="text-muted pull-right" data-target="#cart-summary-product-list">
|
||||
{l s='show details' d='Shop.Theme.Actions'} <i class="fa fa-angle-down" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{block name='cart_summary_product_list'}
|
||||
<div class="collapse" id="cart-summary-product-list">
|
||||
<ul class="media-list">
|
||||
{foreach from=$cart.products item=product}
|
||||
{*MEG Venture*}
|
||||
{if (Configuration::get('squaremeter_cartupdate') == 'on')}
|
||||
<li class="media cart-summary-product">{include file='checkout/_partials/cart-summary-product-line-override.tpl' product=$product}</li>
|
||||
{else}
|
||||
<li class="media cart-summary-product">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li>
|
||||
{/if}
|
||||
{*MEG Venture*}
|
||||
{/foreach}
|
||||
</ul>
|
||||
<div class="text-right"><a href="{url entity=cart params=['action' => 'show']}"><span class="step-edit"><i class="fa fa-pencil" aria-hidden="true"></i> {l s='edit' d='Shop.Theme.Actions'}</span></a></div>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
{block name='cart_summary_subtotals'}
|
||||
{include file='checkout/_partials/cart-summary-subtotals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
<hr>
|
||||
|
||||
{block name='cart_summary_totals'}
|
||||
{include file='checkout/_partials/cart-summary-totals.tpl' cart=$cart}
|
||||
{/block}
|
||||
|
||||
<hr>
|
||||
|
||||
{block name='cart_summary_voucher'}
|
||||
{include file='checkout/_partials/cart-voucher.tpl'}
|
||||
{/block}
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2021 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This module is not a free module and all rights are reserved. It is prohibited to sell or redistribute this module for any purpose. Each license can be used only in one website. For multishop environment, a new license is required for each e-shop managed.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author MEG Venture <info@megventure.com>
|
||||
* @copyright 2007-2021 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
Reference in New Issue
Block a user