113 lines
4.8 KiB
Smarty
113 lines
4.8 KiB
Smarty
{*
|
|
* Module Name: Perimeter / Length / Surface (Area) / Volume / Weight Calculator for Prestashop
|
|
* Module URI: Please contact with info@megventure.com
|
|
* Description: A utility to calculate quantity in perimeter, length, area, volume or weight units
|
|
* Version: 5.5.0
|
|
* Author: MEG Venture
|
|
*
|
|
* Copyright 2013, MEG Venture (info@megventure.com)
|
|
*
|
|
* This program is not a free software: you can't redistribute it and/or modify
|
|
* it. All rights reserved.
|
|
*
|
|
*
|
|
* This copyright notice and licence should be retained in all modules based on this framework.
|
|
* This does not affect your rights to assert copyright over your own original work.
|
|
*}
|
|
|
|
<!-- Square Meter Calculation Module -->
|
|
{if ($page_name == 'cart')}
|
|
<script src="{$module_dir|escape:'html':'UTF-8'}views/js/jquery-1.12.4.js"></script>
|
|
<script>
|
|
//jQuery().ready(function($) {
|
|
// unitPriceRemove();
|
|
//});
|
|
|
|
$(document).on('change', '.js-cart-line-product-quantity', function (event) {
|
|
initial = setTimeout(function() {
|
|
unitPriceRemove();
|
|
clearTimeout(initial);
|
|
}, 1500);
|
|
});
|
|
|
|
$(document).on('click', '.input-group-btn-vertical', function (event) {
|
|
initial = setTimeout(function() {
|
|
unitPriceRemove();
|
|
clearTimeout(initial);
|
|
}, 1500);
|
|
});
|
|
|
|
//function unitPriceRemove() {
|
|
// $('.unit-price-cart').hide();
|
|
//}
|
|
</script>
|
|
{/if}
|
|
|
|
{if ($page_name == 'product')}
|
|
{if $design_type == 'design2'} {*Design 2*}
|
|
{if ($admintab_type == 'linear')}
|
|
<script>
|
|
$(document).ready(function () {
|
|
{if !$admintab_widthcheck}
|
|
$('#quantity_wanted_alt').spinner({ min: {$admintab_minwidth|escape:'html':'UTF-8'}, max: {$admintab_maxwidth|escape:'html':'UTF-8'}, step:{if $step_width}{$step_width|escape:'html':'UTF-8'}{else}{$step|escape:'html':'UTF-8'}{/if}, showOn: 'both' });
|
|
{/if}
|
|
$('#quantity').spinner({ min: 1, showOn: 'both' });
|
|
});
|
|
</script>
|
|
{/if}
|
|
{if ($admintab_type == 'surface') || ($admintab_type == 'perimeter')}
|
|
<script>
|
|
$(document).ready(function () {
|
|
{if !$admintab_widthcheck}
|
|
$('#directinput').spinner({ min: {$admintab_minwidth|escape:'html':'UTF-8'}, max: {$admintab_maxwidth|escape:'html':'UTF-8'}, step:{if $step_width}{$step_width|escape:'html':'UTF-8'}{else}{$step|escape:'html':'UTF-8'}{/if}, showOn: 'both' });
|
|
{if !$admintab_directinput}
|
|
$('#quantity_wanted_alt').spinner({ min: {$admintab_minwidth|escape:'html':'UTF-8'}, max: {$admintab_maxwidth|escape:'html':'UTF-8'}, step:{if $step_width}{$step_width|escape:'html':'UTF-8'}{else}{$step|escape:'html':'UTF-8'}{/if}, showOn: 'both' });
|
|
{/if}
|
|
{/if}
|
|
{if !$admintab_heightcheck}
|
|
{if !$admintab_directinput}
|
|
$('#quantity_wanted_alth').spinner({ min: {$admintab_minheight|escape:'html':'UTF-8'}, max: {$admintab_maxheight|escape:'html':'UTF-8'}, step:{if $step_height}{$step_height|escape:'html':'UTF-8'}{else}{$step|escape:'html':'UTF-8'}{/if}, showOn: 'both' });
|
|
{/if}
|
|
{/if}
|
|
$('#quantity').spinner({ min: 1, showOn: 'both' });
|
|
});
|
|
</script>
|
|
{/if}
|
|
{if ($admintab_type == 'volume')}
|
|
<script>
|
|
$(document).ready(function () {
|
|
{if !$admintab_widthcheck}
|
|
$('#directinput').spinner({ min: {$admintab_minwidth|escape:'html':'UTF-8'}, max: {$admintab_maxwidth|escape:'html':'UTF-8'}, step:{if $step_width}{$step_width|escape:'html':'UTF-8'}{else}{$step|escape:'html':'UTF-8'}{/if}, showOn: 'both' });
|
|
{if !$admintab_directinput}
|
|
$('#quantity_wanted_alt').spinner({ min: {$admintab_minwidth|escape:'html':'UTF-8'}, max: {$admintab_maxwidth|escape:'html':'UTF-8'}, step:{if $step_width}{$step_width|escape:'html':'UTF-8'}{else}{$step|escape:'html':'UTF-8'}{/if}, showOn: 'both' });
|
|
{/if}
|
|
{/if}
|
|
{if !$admintab_heightcheck}
|
|
{if !$admintab_directinput}
|
|
$('#quantity_wanted_alth').spinner({ min: {$admintab_minheight|escape:'html':'UTF-8'}, max: {$admintab_maxheight|escape:'html':'UTF-8'}, step:{if $step_height}{$step_height|escape:'html':'UTF-8'}{else}{$step|escape:'html':'UTF-8'}{/if}, showOn: 'both' });
|
|
{/if}
|
|
{/if}
|
|
{if !$admintab_depthcheck}
|
|
{if !$admintab_directinput}
|
|
$('#quantity_wanted_altd').spinner({ min: {$admintab_mindepth|escape:'html':'UTF-8'}, max: {$admintab_maxdepth|escape:'html':'UTF-8'}, step:{if $step_depth}{$step_depth|escape:'html':'UTF-8'}{else}{$step|escape:'html':'UTF-8'}{/if}, showOn: 'both' });
|
|
{/if}
|
|
{/if}
|
|
$('#quantity').spinner({ min: 1, showOn: 'both' });
|
|
});
|
|
</script>
|
|
{/if}
|
|
{if ($admintab_type == 'weight')}
|
|
<script>
|
|
$(document).ready(function () {
|
|
{if !$admintab_weightcheck}
|
|
$('#quantity_wanted_alt').spinner({ min: {$admintab_minweight|escape:'html':'UTF-8'}, max: {$admintab_maxweight|escape:'htmlall':'UTF-8'}, step:{$step|escape:'htmlall':'UTF-8'}, showOn: 'both' });
|
|
{/if}
|
|
$('#quantity').spinner({ min: 1, showOn: 'both' });
|
|
});
|
|
</script>
|
|
{/if}
|
|
{/if}
|
|
{/if}
|
|
<!-- Square Meter Calculation Module -->
|
|
|