Initial commit

This commit is contained in:
2019-11-20 07:44:43 +01:00
commit 5bf49c4a81
41188 changed files with 5459177 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#gcorderform_block_left {
box-shadow: 2px 2px 11px 0 rgba(0, 0, 0, .1);
background: #fff;
padding: 1.5625rem 1.25rem;
margin-bottom: 1.5625rem
}
#gcorderform_block_left img {
margin: 20px auto;
display: block;
}
#gcorderform_block_left p {
padding-bottom:0;
font-weight:bold;
text-align: right
}

View File

@@ -0,0 +1,482 @@
#gcorderform_block_left {
box-shadow: 2px 2px 11px 0 rgba(0, 0, 0, .1);
background: #fff;
padding: 1.5625rem 1.25rem;
margin-bottom: 1.5625rem
}
#gcorderform_block_left img {
margin: 20px auto;
display: block;
}
#gcorderform_block_left p {
padding-bottom:0;
font-weight:bold;
text-align: right
}
#categories {
display: block;
margin: 0 auto;
}
#help_them {
padding: 20px 0px;
}
#help_them.block {
width: 80%;
margin: 0 auto;
}
#help_them .help_step {
clear: both;
height: 25px;
line-height: 22px;
margin: 5px 0;
padding-left: 35px;
display: block;
}
#help_them #help_step1 {
background: transparent url('../img/step1.jpg') no-repeat;
background-position: top left;
}
#help_them #help_step2 {
background: transparent url('../img/step2.jpg') no-repeat;
background-position: top left;
}
#help_them #help_step3 {
background: transparent url('../img/step3.jpg') no-repeat;
background-position: top left;
}
/* 15 */
.orderform_content .orderform_table_15 input.exclusive {
font-size: 13px;
font-weight: bold;
color: white;
}
.orderform_content .orderform_table_15 tr {
background-color: #f8f8f8;
height: 35px;
border: none;
}
.orderform_content .orderform_table_15 tr.alternate,
.orderform_content .orderform_table_15 tr.last {
background-color: white;
}
.orderform_content .orderform_table_15 .last {
height: 48px;
}
.orderform_content .orderform_table_15 .head th
{
text-align : center;
padding: 6px 11px;
font-size: 12px;
color: white;
text-shadow: 0 1px 0 black;
text-transform: uppercase;
background-color: #383838;
font-weight: bold;
}
.orderform_content .orderform_table_15 .head th.ref {
width:10%;
}
.orderform_content .orderform_table_15 .head th.name {
width:55%;
}
.orderform_content .orderform_table_15 .head th.stock {
width:10%;
}
.orderform_content .orderform_table_15 .head th.quantity {
width:13%;
}
.orderform_content .orderform_table_15 {
width:100%;
}
.orderform_content .orderform_table_15 .head th.price {
width: 12%;
}
.orderform_content .orderform_table_15 tr td {
text-align: center;
}
.orderform_content .orderform_table_15 tr td.name {
text-align: left;
}
.orderform_content .orderform_table_15 tr td.price {
text-align: right;
padding-right: 11px;
}
.orderform_content .orderform_table_15 tr td.quantity {
margin:0!important;
padding:0!important
}
.orderform_content .orderform_table_15 tr td.quantity .cart_quantity_button {
margin-left: 8%;
float: left;
margin-top: 5%;
}
.orderform_content .orderform_table_15 tr td.quantity input {
background-color:white;
border:1px solid #b4b4b4;
margin-right:12px;
padding:0;
margin-top: 4px;
width:28px;
float:right;
height:23px;
text-align:center;
font-size:1.2em;
font-weight:bold;
}
.orderform_content .orderform_table_15 tr td.quantity a {
float:left;
display:block;
clear:left;
width:14px;
height:9px;
overflow:hidden;
line-height:0;
padding-top:3px;
}
.orderform_content .orderform_table_15 tr td.quantity a:hover {
text-decoration: none;
}
.orderform_content .orderform_table_15 tr td.quantity a img{
border: none;
}
.min {
display: none;
}
.quantity .quantity_wanted {
text-align: center;
}
.orderform_content .orderform_table_15 tr td p, .orderform_content .orderform_table_15 tr td, .orderform_content .orderform_table_15 tr td span {
font-size: 11px;
line-height: 18px;
padding: 0;
}
.orderform_content .orderform_table_15 tr td.name span.title {
overflow: hidden;
position: relative;
font-weight: bold;
}
/* 16 */
.order_content .orderform_table_16 thead th.ref
{
width:13%;
}
.order_content .orderform_table_16 thead th.name
{
padding-left:2%;
width: 59%;
}
.orderform_content .orderform_table_16 thead th.quantity
{
padding-left:1%;
width:12%;
}
.orderform_content .orderform_table_16 thead th.price
{
padding-left:1%;
width:12%;
}
.orderform_content .orderform_table_16 input,
.orderform_content .orderform_table_16 select{
text-align: center;
}
.orderform_content .orderform_table_16 tr td.quantity a
{
float: left;
margin-right: 3px;
}
.orderform_content .orderform_table_16 tr td.quantity a + a {
margin-right: 0;
}
.orderform_content .orderform_table_16 tr td.quantity input
{
height: 27px;
line-height: 27px;
padding: 0;
text-align: center;
width: 57px;
margin-left: 0;
margin-bottom: 3px;
}
.orderform_content .orderform_table_16 tr td.name p, .orderform_content .orderform_table_16 tr td.ref p
{
margin: 0;
}
.orderform_content .orderform_table_16 tr td.name p.title
{
overflow:hidden;
position:relative;
}
.orderform_content .orderform_table_16 tfoot tr {
background-color: transparent;
}
/* 17 */
.order_content .orderform_table_17 thead th.ref
{
width:13%;
}
.order_content .orderform_table_17 thead th.name
{
padding-left:2%;
width: 59%;
}
.orderform_content .orderform_table_17 thead th.quantity
{
padding-left:1%;
width:12%;
}
.orderform_content .orderform_table_17 thead th.price
{
padding-left:1%;
width:12%;
}
.orderform_content .orderform_table_17 input,
.orderform_content .orderform_table_17 select{
text-align: center;
}
.orderform_content .orderform_table_17 tr td.quantity a
{
float: left;
margin-right: 3px;
}
.orderform_content .orderform_table_17 tr td.quantity a + a {
margin-right: 0;
}
.orderform_content .orderform_table_17 tr td.quantity input
{
text-align: center;
width: 57px;
}
.orderform_content .orderform_table_17 tr td.name p, .orderform_content .orderform_table_17 tr td.ref p
{
margin: 0;
}
.orderform_content .orderform_table_17 tr td.name p.title
{
overflow:hidden;
position:relative;
}
.orderform_content .orderform_table_17 tfoot tr {
background-color: transparent;
}
.image img {
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-o-transition: all .5s ease;
-ms-transition: all .5s ease;
transition: all .5s ease;
display: block;
position: relative;
}
#ofsubcategories {
padding: 15px 0 0px 0; }
#ofsubcategories p.subcategory-heading {
font-weight: bold;
color: #333333;
margin: 0 0 15px 0; }
#ofsubcategories ul {
margin: 0 0 0 -20px; }
#ofsubcategories ul li {
float: left;
width: 100px;
margin: 0 0 13px 33px;
text-align: center;
height: 130px; }
#ofsubcategories ul li .subcategory-image {
padding: 0 0 8px 0; }
#ofsubcategories ul li .subcategory-image a {
display: block;
cursor: pointer;
padding: 9px;
border: 1px solid #d6d4d4; }
#ofsubcategories ul li .subcategory-image a img {
max-width: 100%;
vertical-align: top; }
#ofsubcategories ul li .subcategory-name {
font: 600 12px/16px "Open Sans", sans-serif;
color: #555454;
cursor: pointer;
text-transform: uppercase; }
#ofsubcategories ul li .subcategory-name:hover {
color: #515151; }
#ofsubcategories ul li .cat_desc {
display: none; }
#ofsubcategories ul li:hover .subcategory-image a {
border: 1px solid #333333;
}
#ofsubcategoriesn2 {
display: none;
width: 100%;
padding: 20px;
background-color: #eeeeee;
margin-bottom: 10px;
}
#ofsubcategoriesn2 p.subcategory-heading {
font-weight: bold;
color: #333333;
margin: 0 0 15px 0; }
#ofsubcategoriesn2 ul {
margin: 0 ;
width:80%;
float:left;
}
#ofsubcategoriesn2 ul li a.img {
background-color: #FFF;
}
#ofsubcategoriesn2 ul li {
float: left;
width: 100px;
margin: 0 0 13px 33px;
text-align: center;
height: 130px; }
#ofsubcategoriesn2 ul li .subcategory-image {
padding: 0;
margin-bottom: 8px;
}
#ofsubcategoriesn2 ul li .subcategory-image a {
display: block;
cursor: pointer;
padding: 9px;
border: 1px solid #d6d4d4;
}
#ofsubcategoriesn2 ul li .subcategory-image a img {
max-width: 100%;
vertical-align: top; }
#ofsubcategoriesn2 ul li .subcategory-name {
font: 600 12px/16px "Open Sans", sans-serif;
color: #555454;
text-transform: uppercase;
}
#ofsubcategoriesn2 ul li .subcategory-name:hover {
color: #515151; }
#ofsubcategoriesn2 ul li .cat_desc {
display: none; }
#ofsubcategoriesn2 span.texte {
font: 600 15px/19px "Open Sans", sans-serif;
text-transform: uppercase;
color: #484848;
display: block;
width: 15%;
float:left;
}
#ofsubcategoriesn2 span.cat {
display: block;
}
#bigpic {
display: none;
visibility: hidden;
}
.bootstrap-touchspin input.form-control, .bootstrap-touchspin input.input-group {
padding: 1.3rem .5rem;
}
.enrouleur {
font-size: 20px;
cursor: pointer;
width: 20px;
height: 20px;
line-height: 18px;
color: white;
margin: 0 auto;
display: block;
font-weight: normal;
text-align: center;
border: 1px;
background-color: #43b754;
border-color: #74d578;
-webkit-border-radius: 2px;
-moz-border-radius: 20px;
-o-border-radius: 20px;
border-radius: 20px;
vertical-align: middle;
}
.declihidden {
display: none;
}
.casper {
visibility: hidden;
}
#add_to_cart_fix2 {
display: none;
}
.thenrouleur {
width: 5%;
text-align: center;
}
@media (min-width: 1250px) {
#add_to_cart_fix2 {
position: fixed;
top: 50%;
right: 2%;
}
}

View File

@@ -0,0 +1,20 @@
<?php
/**
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*/
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;

View File

@@ -0,0 +1,213 @@
/* Preload img */
body:after {
content: url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png);
display: none;
}
body.lb-disable-scrolling {
overflow: hidden;
}
.lightboxOverlay {
position: absolute;
top: 0;
left: 0;
z-index: 9999;
background-color: black;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
opacity: 0.8;
display: none;
}
.lightbox {
position: absolute;
left: 0;
width: 100%;
z-index: 10000;
text-align: center;
line-height: 0;
font-weight: normal;
}
.lightbox .lb-image {
display: block;
height: auto;
max-width: inherit;
max-height: none;
border-radius: 3px;
/* Image border */
border: 4px solid white;
}
.lightbox a img {
border: none;
}
.lb-outerContainer {
position: relative;
*zoom: 1;
width: 250px;
height: 250px;
margin: 0 auto;
border-radius: 4px;
/* Background color behind image.
This is visible during transitions. */
background-color: white;
}
.lb-outerContainer:after {
content: "";
display: table;
clear: both;
}
.lb-loader {
position: absolute;
top: 43%;
left: 0;
height: 25%;
width: 100%;
text-align: center;
line-height: 0;
}
.lb-cancel {
display: block;
width: 32px;
height: 32px;
margin: 0 auto;
background: url(../img/loading.gif) no-repeat;
}
.lb-nav {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 10;
}
.lb-container > .nav {
left: 0;
}
.lb-nav a {
outline: none;
background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
}
.lb-prev, .lb-next {
height: 100%;
cursor: pointer;
display: block;
}
.lb-nav a.lb-prev {
width: 34%;
left: 0;
float: left;
background: url(../img/prev.png) left 48% no-repeat;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
-webkit-transition: opacity 0.6s;
-moz-transition: opacity 0.6s;
-o-transition: opacity 0.6s;
transition: opacity 0.6s;
}
.lb-nav a.lb-prev:hover {
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
}
.lb-nav a.lb-next {
width: 64%;
right: 0;
float: right;
background: url(../img/next.png) right 48% no-repeat;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
-webkit-transition: opacity 0.6s;
-moz-transition: opacity 0.6s;
-o-transition: opacity 0.6s;
transition: opacity 0.6s;
}
.lb-nav a.lb-next:hover {
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
}
.lb-dataContainer {
margin: 0 auto;
padding-top: 5px;
*zoom: 1;
width: 100%;
-moz-border-radius-bottomleft: 4px;
-webkit-border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px;
-moz-border-radius-bottomright: 4px;
-webkit-border-bottom-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.lb-dataContainer:after {
content: "";
display: table;
clear: both;
}
.lb-data {
padding: 0 4px;
color: #ccc;
}
.lb-data .lb-details {
width: 85%;
float: left;
text-align: left;
line-height: 1.1em;
}
.lb-data .lb-caption {
font-size: 13px;
font-weight: bold;
line-height: 1em;
}
.lb-data .lb-caption a {
color: #4ae;
}
.lb-data .lb-number {
display: block;
clear: left;
padding-bottom: 1em;
font-size: 12px;
color: #999999;
}
.lb-data .lb-close {
display: block;
float: right;
width: 30px;
height: 30px;
background: url(../img/close.png) top right no-repeat;
text-align: right;
outline: none;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
opacity: 0.7;
-webkit-transition: opacity 0.2s;
-moz-transition: opacity 0.2s;
-o-transition: opacity 0.2s;
transition: opacity 0.2s;
}
.lb-data .lb-close:hover {
cursor: pointer;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,20 @@
<?php
/**
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*/
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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,20 @@
<?php
/**
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*/
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;

View File

@@ -0,0 +1,20 @@
<?php
/**
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*/
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;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,20 @@
<?php
/**
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*/
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;

View File

@@ -0,0 +1,41 @@
{*
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*}
<script type='text/javascript'>
$(document).ready(function () {
$('div#stop_rating p.stop a').click(function () {
$('div#stop_rating').hide(500);
$.ajax({
type: 'GET',
url: window.location + '&stop_rating=1'
});
return false;
});
});
</script>
<div id="stop_rating" class="row text-center">
<div style="margin-top: 20px; margin-bottom: 20px; padding: 0 .7em; text-align: center;">
<p class="invite">
{l s='You are satisfied with our module and want to encourage us to add new features ?' mod='gcorderform'}
<br/>
<a href="http://addons.prestashop.com/ratings.php" target="_blank">
<strong>
{l s='Please rate it on Prestashop Addons, and give us 5 stars !' mod='gcorderform'}
</strong>
</a>
</p>
<p class="stop" style="display: block;">
<a style="cursor: pointer">
[{l s='No thanks, I don\'t want to help you. Close this dialog.' mod='gcorderform'}]
</a>
</p>
</div>
</div>

View File

@@ -0,0 +1,165 @@
{*
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*
*}
{extends file='page.tpl'}
{block name='page_content'}
{capture name=path}{l s='Order Form' mod='gcorderform'}{/capture}
<!-- MODULE GcOrderForm -->
<style>
.image img:hover {
width: {$gcof_big_size.width|intval}px;
height: {$gcof_big_size.height|intval}px;
}
</style>
<div class="orderform_content table-responsive">
<div id="help_them" class="block">
<div class="block_content">
<div class="help_step" id="help_step1">{l s='Select category of your choice' mod='gcorderform'}</div>
<div class="help_step" id="help_step2">{l s='Fill the order form' mod='gcorderform'}</div>
<div class="help_step" id="help_step3">{l s='Add your product to cart' mod='gcorderform'}</div>
</div>
</div>
<select id="categories">
<option value="0">{l s='All categories' mod='gcorderform'}</option>
{foreach from=$gcof_categories item=categorie}
<option value="{$categorie.id_category|intval}">{$categorie.name|escape:'html':'UTF-8'}</option>
{/foreach}
</select>
<br/>
<table class="orderform_table_{$gcof_psversion|escape:'html':'UTF-8'} table table-hover" cellspacing="0">
<thead>
<tr class="head">
{if $gcof_image == 1}
<th class="image item">{l s='Image' mod='gcorderform'}</th>
{/if}
<th class="ref first_item">{l s='Ref.' mod='gcorderform'}</th>
<th class="name item">{l s='Name' mod='gcorderform'}</th>
{if $gcof_stock == 1}
<th class="stock">{l s='Stock' mod='gcorderform'}</th>
{/if}
<th class="quantity item">{l s='Quantity' mod='gcorderform'}</th>
<th class="price last_item">{l s='Price' mod='gcorderform'}</th>
</tr>
</thead>
<tbody>
{foreach from=$gcof_products item=product name=myLoop}
{if !is_array($product.declinaison) && $product.declinaison|substr:0:15 == "ProdSansDecli##"}
<tr class="item">
{if $gcof_image == 1}
<td class="image">
<img src="{$product.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</td>
{/if}
<td class="ref"><p class="ref">{$product.reference|escape:'html':'UTF-8'}</p></td>
<td class="name">
{if $gcof_link == 1}
<a href="{$product.link|escape:'html':'UTF-8'}">
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
</a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="0" class="id_product_attribute"/>
</td>
{if $gcof_stock == 1}
<td class="stock">{$product.quantityavailable|intval}</td>
{/if}
<td class="quantity text-center">
<div class="product-quantity clearfix">
<div class="qty">
<input
type="text"
name="qty"
class="quantity_wanted input-group"
value="0"
min="0"
max="99999"
>
</div>
</div>
<span class="min"></span>
</td>
<td class="price">
{$product.price|escape:'html':'UTF-8'}
</td>
</tr>
{else}
{foreach from=$product.declinaison item=decli name=myLoop2}
<tr class="item">
{if $gcof_image == 1}
<td class="image">
<img src="{$decli.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</td>
{/if}
<td class="ref"><p class="ref">{$decli.reference|escape:'html':'UTF-8'}</p></td>
<td class="name">
{if $gcof_link == 1}
<a href="{$decli.link|escape:'html':'UTF-8'}"><span class="title">{$product.name|escape:'html':'UTF-8'}</span>
<span class="decli-name">{$decli.libelle|escape:'html':'UTF-8'}</span>
</a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
<span class="decli-name">{$decli.libelle|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="{$decli.id_product_attribute|intval}" class="id_product_attribute"/>
</td>
{if $gcof_stock == 1}
<td class="stock">{$decli.quantityavailable|intval}</td>
{/if}
<td class="quantity text-center">
<div class="product-quantity clearfix">
<div class="qty">
{if $decli.minimal_quantity|intval > 0}
<input
type="text"
name="qty"
class="quantity_wanted input-group"
value="0"
min="{$decli.minimal_quantity|intval}"
max="99999"
>
{else}
<input
type="text"
name="qty"
class="quantity_wanted input-group"
value="0"
min="0"
max="99999"
>
{/if}
</div>
</div>
<span class="min">{$decli.minimal_quantity|intval}</span>
</td>
<td class="price">{$decli.price|escape:'html':'UTF-8'}</td>
</tr>
{/foreach}
{/if}
{/foreach}
</tbody>
<tfoot>
<tr class="last">
<td colspan="3" class="add_lines"></td>
<td colspan="3" class="text-center">
<button id="add_to_cart_fix" class="btn btn-primary" data-button-action="add-to-cart"><i
class="material-icons">&#xE547;</i>{l s='Add to cart' mod='gcorderform'}</button>
</td>
</tr>
</tfoot>
</table>
<img id="bigpic" class="hack156"/>
</div>
<!-- /MODULE GcOrderForm -->
{/block}

View File

@@ -0,0 +1,236 @@
{*
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*
*}
{extends file='page.tpl'}
{block name='page_content'}
{capture name=path}{l s='Order Form' mod='gcorderform'}{/capture}
<!-- MODULE GcOrderForm -->
<div class="orderform_content table-responsive">
<div id="ofsubcategories">
<ul class="clearfix">
{foreach from=$gcof_categories item=categorie}
<li>
<div class="subcategory-image">
<a rel='{$categorie.id_category|intval}' title='{$categorie.name|escape:'html':'UTF-8'}' class='img filter'>
<img class="replace-2x catimage filter"
src="{$link->getCatImageLink($categorie.link_rewrite, $categorie.id_category, 'order_form_cat_default')|escape:'html':'UTF-8'}"
alt="{$categorie.name|escape:'html':'UTF-8'}" width="{$gcof_cat_size.width|intval}"
height="{$gcof_cat_size.height|intval}"/></a>
</a>
</div>
<h5 class="subcategory-name">{$categorie.name|escape:'html':'UTF-8'}</h5>
</li>
{/foreach}
</ul>
</div>
<br/>
<div id="ofsubcategoriesn2" class="clearfix">
<span class="texte">
{l s='Subcategories of' mod='gcorderform'}<br/>
<span class="cat">something</span>
</span>
<ul class="clearfix">
</ul>
</div>
<br/>
<table class="orderform_table_{$gcof_psversion|escape:'html':'UTF-8'} table table-hover" width="100%" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr class="head">
{if $gcof_image == 1}
<th class="image first_item">{l s='Image' mod='gcorderform'}</th>
{/if}
<th class="ref item">{l s='Ref.' mod='gcorderform'}</th>
<th class="name item">{l s='Name' mod='gcorderform'}</th>
<th class="thenrouleur item">{l s='Products combination' mod='gcorderform'}</th>
{if $gcof_stock == 1}
<th class="stock">{l s='Stock' mod='gcorderform'}</th>
{/if}
<th class="quantity item">{l s='Quantity' mod='gcorderform'}</th>
<th class="price last_item">{l s='Price' mod='gcorderform'}</th>
</tr>
</thead>
<tbody>
{foreach from=$gcof_products item=product name=myLoop}
{if !is_array($product.declinaison) && $product.declinaison|substr:0:15 == "ProdSansDecli##"}
<tr class="item">
{if $gcof_image == 1}
<td class="image">
{if $product.big != ''}
<a href="{$product.big|escape:'html':'UTF-8'}"
data-lightbox="{$product.name|escape:'html':'UTF-8'}{$product.id_product|intval}"
data-title="{$product.name|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}">
<img src="{$product.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</a>
{/if}
</td>
{/if}
<td class="ref"><p class="ref">{$product.reference|escape:'html':'UTF-8'}</p></td>
<td class="name">
{if $gcof_link == 1}
<a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
</a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="0" class="id_product_attribute"/>
</td>
<td>&nbsp;</td>
{if $gcof_stock == 1}
<td class="stock">{$product.quantityavailable|intval}</td>
{/if}
<td class="quantity text-center">
<div class="product-quantity clearfix">
<div class="qty">
{if $product.minimal_quantity|intval > 0}
<input
type="text"
name="qty"
class="quantity_wanted input-group"
value="0"
min="{$product.minimal_quantity|intval}"
max="99999"
>
{else}
<input
type="text"
name="qty"
class="quantity_wanted input-group"
value="0"
min="0"
max="99999"
>
{/if}
</div>
</div>
<span class="min">{$product.minimal_quantity|intval}</span>
</td>
<td class="price">{$product.price|escape:'html':'UTF-8'}</td>
</tr>
{else}
<tr class="item">
{if $gcof_image == 1}
<td class="image">
{if $product.big != ''}
<a href="{$product.big|escape:'html':'UTF-8'}"
data-lightbox="{$product.name|escape:'html':'UTF-8'}{$product.id_product|intval}"
data-title="{$product.name|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}">
<img src="{$product.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</a>
{/if}
</td>
{/if}
<td class="ref"><p class="ref"></p></td>
<td class="name">
{if $gcof_link == 1}
<a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
</a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="0" class="id_product_attribute"/>
</td>
<td class="rollup"><span class="enrouleur" id="{$product.id_product|intval}">+</span></td>
{if $gcof_stock == 1}
<td class="stock"></td>
{/if}
<td class="quantity text-center">
</td>
<td class="price"></td>
</tr>
{foreach from=$product.declinaison item=decli name=myLoop2}
<tr class="item declihidden decliline{$product.id_product|intval}">
{if $gcof_image == 1}
<td class="image">
{if $decli.big != ''}
<a href="{$decli.big|escape:'html':'UTF-8'}"
data-lightbox="{$product.name|escape:'html':'UTF-8'} {$decli.libelle|escape:'html':'UTF-8'}{$decli.id_product_attribute|intval}"
data-title="{$product.name|escape:'html':'UTF-8'} {$decli.libelle|escape:'html':'UTF-8'}"
title="{$product.name|escape:'html':'UTF-8'} {$decli.libelle|escape:'html':'UTF-8'}">
<img src="{$decli.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</a>
{/if}
</td>
{/if}
<td class="ref"><p class="ref">{$decli.reference|escape:'html':'UTF-8'}</p></td>
<td class="name">
{if $gcof_link == 1}
<a class="product_img_link" href="{$decli.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
<span class="decli-name">{$decli.libelle|escape:'html':'UTF-8'}</span>
</a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
<span class="decli-name">{$decli.libelle|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="{$decli.id_product_attribute|intval}" class="id_product_attribute"/>
</td>
<td>&nbsp;</td>
{if $gcof_stock == 1}
<td class="stock">{$decli.quantityavailable|intval}</td>
{/if}
<td class="quantity text-center">
<div class="product-quantity clearfix">
<div class="qty">
{if $decli.minimal_quantity|intval > 0}
<input
type="text"
name="qty"
class="quantity_wanted input-group"
value="0"
min="{$decli.minimal_quantity|intval}"
max="99999"
>
{else}
<input
type="text"
name="qty"
class="quantity_wanted input-group"
value="0"
min="0"
max="99999"
>
{/if}
</div>
</div>
<span class="min">{$decli.minimal_quantity|intval}</span>
</td>
<td class="price">{$decli.price|escape:'html':'UTF-8'}</td>
</tr>
{/foreach}
{/if}
{/foreach}
</tbody>
<tfoot>
<tr class="last">
<td colspan="3" class="add_lines"></td>
<td colspan="3" class="text-center">
<button id="add_to_cart_fix" class="btn btn-primary" data-button-action="add-to-cart"><i
class="material-icons">&#xE547;</i>{l s='Add to cart' mod='gcorderform'}</button>
</td>
</tr>
</tfoot>
</table>
<img id="bigpic" class="hack156"/>
</div>
<!-- /MODULE GcOrderForm -->
{/block}

View File

@@ -0,0 +1,373 @@
{*
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*
*}
{capture name=path}{l s='Order Form' mod='gcorderform'}{/capture}
<!-- MODULE GcOrderForm -->
<style>
.image img:hover {
width: {$gcof_big_size.width|intval}px;
height: {$gcof_big_size.height|intval}px;
}
</style>
<div class="orderform_content table-responsive">
<div id="help_them" class="block">
<div class="block_content">
<div class="help_step" id="help_step1">{l s='Select category of your choice' mod='gcorderform'}</div>
<div class="help_step" id="help_step2">{l s='Fill the order form' mod='gcorderform'}</div>
<div class="help_step" id="help_step3">{l s='Add your product to cart' mod='gcorderform'}</div>
</div>
</div>
<select id="categories">
<option value="0">{l s='All categories' mod='gcorderform'}</option>
{foreach from=$gcof_categories item=categorie}
<option value="{$categorie.id_category|intval}">{$categorie.name|escape:'html':'UTF-8'}</option>
{/foreach}
</select>
<br/>
<table class="orderform_table_{$gcof_psversion|escape:'html':'UTF-8'} table table-hover table-striped" cellspacing="0">
<thead>
<tr class="head">
{if $gcof_image == 1}
<th class="image item">{l s='Image' mod='gcorderform'}</th>
{/if}
<th class="ref first_item">{l s='Ref.' mod='gcorderform'}</th>
<th class="name item">{l s='Name' mod='gcorderform'}</th>
{if $gcof_stock == 1}
<th class="stock">{l s='Stock' mod='gcorderform'}</th>
{/if}
<th class="quantity item">{l s='Quantity' mod='gcorderform'}</th>
<th class="price last_item">{l s='Price' mod='gcorderform'}</th>
</tr>
</thead>
<tbody>
{foreach from=$gcof_products item=product name=myLoop}
{if !is_array($product.declinaison) && $product.declinaison|substr:0:15 == "ProdSansDecli##"}
<tr class="item">
{if $gcof_image == 1}
<td class="image">
<img src="{$product.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</td>
{/if}
<td class="ref"><p class="ref">{$product.reference|escape:'html':'UTF-8'}</p></td>
<td class="name">
{if $gcof_link == 1}
<a href="{$product.link|escape:'html':'UTF-8'}"><span class="title">{$product.name|escape:'html':'UTF-8'}</span></a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="0" class="id_product_attribute"/>
</td>
{if $gcof_stock == 1}
<td class="stock">{$product.quantityavailable|intval}</td>
{/if}
<td class="quantity text-center">
<input type="text" name="qty" size="4" autocomplete="off" class="form-control grey quantity_wanted text" value="0">
{if $gcof_quantity_buttons == 1}
{if $gcof_psversion == '16'}
<div class="clearfix">
<a rel="nofollow" class="qtydown btn btn-default button-minus" href="#"
title="{l s='Subtract' mod='gcorderform'}">
<span><i class="icon-minus"></i></span>
</a>
<a rel="nofollow" class="qtyup btn btn-default button-plus" href="#"
title="{l s='Add' mod='gcorderform'}">
<span><i class="icon-plus"></i></span>
</a>
</div>
{else}
<div class="cart_quantity_button">
<a rel="nofollow" class="qtyup" href="#"><img src="{$gcof_img_dir|escape:'html':'UTF-8'}quantity_up.gif"
alt="{l s='Add' mod='gcorderform'}" width="14"
height="9"></a>
<a rel="nofollow" class="qtydown" href="#"><img src="{$gcof_img_dir|escape:'html':'UTF-8'}quantity_down.gif"
width="14"
height="9"
alt="{l s='Subtract' mod='gcorderform'}"></a>
</div>
{/if}
{/if}
<span class="min">{$product.minimal_quantity|intval}</span>
</td>
<td class="price">
{$product.price|escape:'html':'UTF-8'}
</td>
</tr>
{else}
{foreach from=$product.declinaison item=decli name=myLoop2}
<tr class="item">
{if $gcof_image == 1}
<td class="image">
<img src="{$decli.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</td>
{/if}
<td class="ref"><p class="ref">{$decli.reference|escape:'html':'UTF-8'}</p></td>
<td class="name">
{if $gcof_link == 1}
<a href="{$decli.link|escape:'html':'UTF-8'}">
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
<span class="decli-name">{$decli.libelle|escape:'html':'UTF-8'}</span>
</a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
<span class="decli-name">{$decli.libelle|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="{$decli.id_product_attribute|intval}" class="id_product_attribute"/>
</td>
{if $gcof_stock == 1}
<td class="stock">{$decli.quantityavailable|intval}</td>
{/if}
<td class="quantity text-center">
<input type="text" name="qty" size="4" autocomplete="off" class="form-control grey quantity_wanted text"
value="0">
{if $gcof_quantity_buttons == 1}
{if $gcof_psversion == '16'}
<div class="clearfix">
<a rel="nofollow" class="qtydown btn btn-default button-minus" href="#"
title="{l s='Subtract' mod='gcorderform'}">
<span><i class="icon-minus"></i></span>
</a>
<a rel="nofollow" class="qtyup btn btn-default button-plus" href="#"
title="{l s='Add' mod='gcorderform'}">
<span><i class="icon-plus"></i></span>
</a>
</div>
{else}
<div class="cart_quantity_button">
<a rel="nofollow" class="qtyup" href="#"><img src="{$gcof_img_dir|escape:'html':'UTF-8'}quantity_up.gif"
alt="{l s='Add' mod='gcorderform'}" width="14"
height="9"></a>
<a rel="nofollow" class="qtydown" href="#"><img src="{$gcof_img_dir|escape:'html':'UTF-8'}quantity_down.gif"
width="14" height="9"
alt="{l s='Subtract' mod='gcorderform'}"></a>
</div>
{/if}
{/if}
<span class="min">{$decli.minimal_quantity|intval}</span>
</td>
<td class="price">{$decli.price|escape:'html':'UTF-8'}</td>
</tr>
{/foreach}
{/if}
{/foreach}
</tbody>
<tfoot>
<tr class="last">
<td colspan="3" class="add_lines"></td>
<td colspan="2" class="text-center">
{if $gcof_psversion == "16"}
<p id="add_to_cart_fix" class="button btn btn-default button-medium">
<span>{l s='Add to cart' mod='gcorderform'}<i class="icon-chevron-right right"></i></span>
</p>
{else}
<p id="add_to_cart_fix" class="buttons_bottom_block">
<input type="submit" name="Submit" value="{l s='Add to cart' mod='gcorderform'}" class="exclusive"/>
</p>
{/if}
</td>
</tr>
</tfoot>
</table>
<img id="bigpic" style="display: none; visibility: hidden" class="hack156"/>
</div>
<script type="text/javascript">
var gcof_empty = {$gcof_empty|intval};
var gcof_psversion = '{$gcof_psversion|escape:'html':'UTF-8'}';
var gcof_stock = {$gcof_stock|intval};
var gcof_image = {$gcof_image|intval};
var gcof_link = {$gcof_link|intval};
{if $gcof_image}
var gcof_image_size_width = {$gcof_image_size.width|intval};
var gcof_image_size_height = {$gcof_image_size.height|intval};
{/if}
var gcof_img_dir = '{$gcof_img_dir|escape:'html':'UTF-8'}';
var gcof_url = "{$gcof_url|escape:'html':'UTF-8'}";
var gcof_quantitybuttons = {$gcof_quantity_buttons|intval};
// <![CDATA[
{literal}
$(document).ready(function () {
$('#categories').change(function () {
$.ajax({
url: gcof_url,
type: "GET",
dataType: 'json',
data: "id_category=" + $('#categories').val(),
success: function (data) {
var cell_image, cell_reference, cell_name, cell_decli, cell_stock, cell_quantity, cell_price, row;
$('.orderform_content table tbody tr').remove();
$.each(data, function (index, element) {
if ((!$.isArray(element.declinaison)) && (element.declinaison.substr(0, 15) == "ProdSansDecli##")) {
if (gcof_image == 1)
cell_image = '<td class="image"><img src="' + element.big + '" alt="' + element.name + '" width="' + gcof_image_size_width + '" height="' + gcof_image_size_height + '" /></td>';
cell_reference = '<td class="ref"><p class="ref">' + element.reference + '</p></td>';
if (gcof_link == 1)
cell_name = '<td class="name"><a href="' + element.link + '"><span class="title">' + element.name + '</span></a>';
else
cell_name = '<td class="name"><span class="title">' + element.name + '</span>';
cell_name += '<input type="hidden" value="' + element.id_product + '" class="id_product"/><input type="hidden" value="0" class="id_product_attribute"/></td>';
if (gcof_stock == 1)
cell_stock = '<td class="stock">' + element.quantityavailable + '</td>';
cell_quantity = '<td class="quantity text-center"><input type="text" name="qty" size="4" autocomplete="off" class="form-control grey quantity_wanted text" value="0">';
if (gcof_quantitybuttons == 1) {
if (gcof_psversion == '16') {
cell_quantity += '<div class="clearfix" id="quantity_button"><a rel="nofollow" class="qtydown btn btn-default button-minus" href="#" title="Add"><span><i class="icon-minus"></i></span></a><a rel="nofollow" class="qtyup btn btn-default button-plus" href="#" title="Add"><span><i class="icon-plus"></i></span></a></div>';
}
else {
cell_quantity += '<div class="cart_quantity_button"><a rel="nofollow" class="qtyup" href="#"><img src="' + gcof_img_dir + 'quantity_up.gif" width="14" height="9"></a><a rel="nofollow" class="qtydown" href="#"><img src="' + gcof_img_dir + 'quantity_down.gif" width="14" height="9" /></a></div>';
}
}
cell_quantity += '<span class="min">' + element.minimal_quantity + '</span></td>';
cell_price = '<td class="price">' + element.price + '</td>';
row = '<tr class="item">';
if (gcof_image == 1)
row = row + cell_image;
row = row + cell_reference + cell_name;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').append(newRow);
BindCheckMinimal(newRow.find('.quantity_wanted'));
} else {
$.each(element.declinaison, function (index2, elementdecli) {
if (gcof_image == 1)
cell_image = '<td class="image"><img src="' + elementdecli.big + '" alt="' + element.name + '" width="' + gcof_image_size_width + '" height="' + gcof_image_size_height + '" /></td>';
cell_reference = '<td class="ref"><p class="ref">' + elementdecli.reference + '</p></td>';
if (gcof_link == 1)
cell_name = '<td class="name"><a href="' + elementdecli.link + '"><span class="title">' + element.name + '</span> <span class="decli-name">' + elementdecli.libelle + '</span></a>';
else
cell_name = '<td class="name"><span class="title">' + element.name + '</span> <span class="decli-name">' + elementdecli.libelle + '</span>';
cell_name += '<input type="hidden" value="' + element.id_product + '" class="id_product"/><input type="hidden" value="' + elementdecli.id_product_attribute + '" class="id_product_attribute"/></td>';
if (gcof_stock == 1)
cell_stock = '<td class="stock">' + elementdecli.quantityavailable + '</td>';
cell_quantity = '<td class="quantity text-center"><input type="text" name="qty" size="4" autocomplete="off" class="form-control grey quantity_wanted text" value="0">';
if (gcof_quantitybuttons == 1) {
if (gcof_psversion == '16') {
cell_quantity += '<div class="clearfix" id="quantity_button"><a rel="nofollow" class="qtydown btn btn-default button-minus" href="#" title="Add"><span><i class="icon-minus"></i></span></a><a rel="nofollow" class="qtyup btn btn-default button-plus" href="#" title="Add"><span><i class="icon-plus"></i></span></a></div>';
}
else {
cell_quantity += '<div class="cart_quantity_button"><a rel="nofollow" class="qtyup" href="#"><img src="' + gcof_img_dir + 'quantity_up.gif" width="14" height="9"></a><a rel="nofollow" class="qtydown" href="#"><img src="' + gcof_img_dir + 'quantity_down.gif" width="14" height="9"></a></div>';
}
}
cell_quantity += '<span class="min">' + elementdecli.minimal_quantity + '</span></td>';
cell_price = '<td class="price">' + elementdecli.price + '</td>';
row = '<tr class="item">';
if (gcof_image == 1)
row = row + cell_image;
row = row + cell_reference + cell_name;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').prepend(newRow);
BindCheckMinimal(newRow.find('.quantity_wanted'));
});
}
});
}
});
});
$('.qtyup').unbind('click').live('click', function () {
qtyUp($(this));
return false;
});
$('.qtydown').unbind('click').live('click', function () {
qtyDown($(this));
return false;
});
$('.quantity_wanted').unbind('keyup').live('keyup', function () {
checkMinimalQuantityOrderForm($(this));
});
$('#add_to_cart_fix').unbind('click').click(function () {
$('.orderform_content tbody tr').each(function () {
if ($(this).find('.quantity input').val() > 0) {
var currentRow = $(this);
ajaxCart.add(currentRow.find('.name .id_product').val(), currentRow.find('.name .id_product_attribute').val(), false, this, currentRow.find('.quantity input').val(), null);
if (gcof_empty == 1)
currentRow.find('.quantity input').val("0");
}
});
return false;
});
});
function checkMinimalQuantityOrderForm(myObject) {
laligne = myObject.parent();
if (parseInt($(laligne).find('.quantity_wanted').val()) < parseInt($(laligne).find('.min').text())) {
$(laligne).find('.quantity_wanted').val("0");
return false;
}
else
$(laligne).find('.quantity_wanted').css('border', '1px solid #b4b4b4');
return true;
}
function qtyDown(myObject) {
var laquantiteencours = myObject.parent().parent().find('.quantity_wanted');
if (parseInt(laquantiteencours.val()) == parseInt(myObject.parent().parent().find('.min').text())) {
laquantiteencours.val("0");
laquantiteencours.css('border', '1px solid #b4b4b4');
}
else {
if (laquantiteencours.val() == 0) {
laquantiteencours.css('border', '1px solid red');
}
else {
laquantiteencours.val(parseInt(laquantiteencours.val()) - 1);
laquantiteencours.css('border', '1px solid #b4b4b4');
}
}
}
function qtyUp(myObject) {
var laquantiteencours = myObject.parent().parent().find('.quantity_wanted');
if (( laquantiteencours.val() == 0 ) || ( laquantiteencours.val() < parseInt(myObject.parent().parent().find('.min').text()) )) {
laquantiteencours.val(parseInt(myObject.parent().parent().find('.min').text()))
laquantiteencours.css('border', '1px solid #b4b4b4');
}
else {
laquantiteencours.val(parseInt(laquantiteencours.val()) + 1);
laquantiteencours.css('border', '1px solid #b4b4b4');
}
}
function BindCheckMinimal(myObject) {
$(myObject).bind("keyup", function (e) {
checkMinimalQuantityOrderForm($(this));
});
}
{/literal}
// ]]>
</script>
<!-- /MODULE GcOrderForm -->

View File

@@ -0,0 +1,649 @@
{*
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*
*}
{capture name=path}{l s='Order Form' mod='gcorderform'}{/capture}
<!-- MODULE GcOrderForm -->
<div class="orderform_content table-responsive">
<div id="ofsubcategories">
<ul class="clearfix">
{foreach from=$gcof_categories item=categorie}
<li>
<div class="subcategory-image">
<a rel='{$categorie.id_category|intval}' title='{$categorie.name|escape:'html':'UTF-8'}' class='img filter'>
<img class="replace-2x catimage"
src="{$link->getCatImageLink($categorie.link_rewrite, $categorie.id_category, 'order_form_cat_default')|escape:'html':'UTF-8'}"
alt="{$categorie.name|escape:'html':'UTF-8'}" width="{$gcof_cat_size.width|intval}" height="{$gcof_cat_size.height|intval}"/></a>
</a>
</div>
<h5 class="subcategory-name">{$categorie.name|escape:'html':'UTF-8'}</h5>
</li>
{/foreach}
</ul>
</div>
<br/>
<div id="ofsubcategoriesn2" class="clearfix">
<span class="texte">
{l s='Subcategories of' mod='gcorderform'}<br/>
<span class="cat">something</span>
</span>
<ul class="clearfix">
</ul>
</div>
<br/>
<table class="orderform_table_{$gcof_psversion|escape:'html':'UTF-8'} table table-hover table-striped" width="100%" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr class="head">
{if $gcof_image == 1}
<th class="image first_item">{l s='Image' mod='gcorderform'}</th>
{/if}
<th class="ref item">{l s='Ref.' mod='gcorderform'}</th>
<th class="name item">{l s='Name' mod='gcorderform'}</th>
<th class="thenrouleur item">{l s='Products combination' mod='gcorderform'}</th>
{if $gcof_stock == 1}
<th class="stock">{l s='Stock' mod='gcorderform'}</th>
{/if}
<th class="quantity item">{l s='Quantity' mod='gcorderform'}</th>
<th class="price last_item">{l s='Price' mod='gcorderform'}</th>
</tr>
</thead>
<tbody>
{foreach from=$gcof_products item=product name=myLoop}
{if !is_array($product.declinaison) && $product.declinaison|substr:0:15 == "ProdSansDecli##"}
<tr class="item">
{if $gcof_image == 1}
<td class="image">
{if $product.big != ''}
<a href="{$product.big|escape:'html':'UTF-8'}"
data-lightbox="{$product.name|escape:'html':'UTF-8'}{$product.id_product|intval}"
data-title="{$product.name|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}">
<img src="{$product.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</a>
{/if}
</td>
{/if}
<td class="ref"><p class="ref">{$product.reference|escape:'html':'UTF-8'}</p></td>
<td class="name">
{if $gcof_link}
<a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}"
itemprop="url">
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
</a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="0" class="id_product_attribute"/>
</td>
<td>&nbsp;</td>
{if $gcof_stock == 1}
<td class="stock">{$product.quantityavailable|intval}</td>
{/if}
<td class="quantity text-center">
<input type="text" name="qty" size="4" autocomplete="off" class="form-control grey quantity_wanted text" value="0">
{if $gcof_quantity_buttons == 1}
{if $gcof_psversion == '16'}
<div class="clearfix" id="quantity_button">
<a rel="nofollow" class="qtydown btn btn-default button-minus" href="#"
title="{l s='Subtract' mod='gcorderform'}">
<span><i class="icon-minus"></i></span>
</a>
<a rel="nofollow" class="qtyup btn btn-default button-plus" href="#"
title="{l s='Add' mod='gcorderform'}">
<span><i class="icon-plus"></i></span>
</a>
</div>
{else}
<div class="cart_quantity_button">
<a rel="nofollow" class="qtyup" href="#"><img src="{$gcof_img_dir|escape:'html':'UTF-8'}quantity_up.gif"
alt="{l s='Add' mod='gcorderform'}" width="14"
height="9"></a>
<a rel="nofollow" class="qtydown" href="#"><img src="{$gcof_img_dir|escape:'html':'UTF-8'}quantity_down.gif"
width="14"
height="9"
alt="{l s='Subtract' mod='gcorderform'}"></a>
</div>
{/if}
{/if}
<span class="min">{$product.minimal_quantity|intval}</span>
</td>
<td class="price">{$product.price|escape:'html':'UTF-8'}</td>
</tr>
{else}
<tr class="item">
{if $gcof_image == 1}
<td class="image">
{if $product.big != ''}
<a href="{$product.big|escape:'html':'UTF-8'}"
data-lightbox="{$product.name|escape:'html':'UTF-8'}{$product.id_product|intval}"
data-title="{$product.name|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}">
<img src="{$product.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</a>
{/if}
</td>
{/if}
<td class="ref"><p class="ref"></p></td>
<td class="name">
{if $gcof_link}
<a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}"
itemprop="url">
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
</a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="0" class="id_product_attribute"/>
</td>
<td class="rollup"><span class="enrouleur" id="{$product.id_product|intval}">+</span></td>
{if $gcof_stock == 1}
<td class="stock"></td>
{/if}
<td class="quantity text-center">
</td>
<td class="price"></td>
</tr>
{foreach from=$product.declinaison item=decli name=myLoop2}
<tr class="item declihidden decliline{$product.id_product|intval}">
{if $gcof_image == 1}
<td class="image">
{if $decli.big != ''}
<a href="{$decli.big|escape:'html':'UTF-8'}"
data-lightbox="{$product.name|escape:'html':'UTF-8'} {$decli.libelle|escape:'html':'UTF-8'}{$decli.id_product_attribute|intval}"
data-title="{$product.name|escape:'html':'UTF-8'} {$decli.libelle|escape:'html':'UTF-8'}"
title="{$product.name|escape:'html':'UTF-8'} {$decli.libelle|escape:'html':'UTF-8'}">
<img src="{$decli.big|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}"
width="{$gcof_image_size.width|intval}" height="{$gcof_image_size.height|intval}"/>
</a>
{/if}
</td>
{/if}
<td class="ref"><p class="ref">{$decli.reference|escape:'html':'UTF-8'}</p></td>
<td class="name">
{if $gcof_link}
<a href="{$decli.link|escape:'html':'UTF-8'}">
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
<span class="decli-name">{$decli.libelle|escape:'html':'UTF-8'}</span>
</a>
{else}
<span class="title">{$product.name|escape:'html':'UTF-8'}</span>
<span class="decli-name">{$decli.libelle|escape:'html':'UTF-8'}</span>
{/if}
<input type="hidden" value="{$product.id_product|intval}" class="id_product"/>
<input type="hidden" value="{$decli.id_product_attribute|intval}" class="id_product_attribute"/>
</td>
<td>&nbsp;</td>
{if $gcof_stock == 1}
<td class="stock">{$decli.quantityavailable|intval}</td>
{/if}
<td class="quantity text-center">
<input type="text" name="qty" size="4" autocomplete="off" class="form-control grey quantity_wanted text"
value="0">
{if $gcof_quantity_buttons == 1}
{if $gcof_psversion == '16'}
<div class="clearfix" id="quantity_button">
<a rel="nofollow" class="qtydown btn btn-default button-minus" href="#"
title="{l s='Subtract' mod='gcorderform'}">
<span><i class="icon-minus"></i></span>
</a>
<a rel="nofollow" class="qtyup btn btn-default button-plus" href="#"
title="{l s='Add' mod='gcorderform'}">
<span><i class="icon-plus"></i></span>
</a>
</div>
{else}
<div class="cart_quantity_button">
<a rel="nofollow" class="qtyup" href="#"><img src="{$gcof_img_dir|escape:'html':'UTF-8'}quantity_up.gif"
alt="{l s='Add' mod='gcorderform'}" width="14"
height="9"></a>
<a rel="nofollow" class="qtydown" href="#"><img src="{$gcof_img_dir|escape:'html':'UTF-8'}quantity_down.gif"
width="14" height="9"
alt="{l s='Subtract' mod='gcorderform'}"></a>
</div>
{/if}
{/if}
<span class="min">{$decli.minimal_quantity|intval}</span>
</td>
<td class="price">{$decli.price|escape:'html':'UTF-8'}</td>
</tr>
{/foreach}
{/if}
{/foreach}
</tbody>
<tfoot>
<tr class="last">
<td colspan="3" class="add_lines"></td>
<td colspan="4" class="text-center">
{if $gcof_psversion == '16'}
<p id="add_to_cart_fix" class="button btn btn-default button-medium">
<span>{l s='Add to cart' mod='gcorderform'}<i class="icon-chevron-right right"></i></span>
</p>
{else}
<p id="add_to_cart_fix" class="buttons_bottom_block">
<input type="submit" name="Submit" value="{l s='Add to cart' mod='gcorderform'}" class="exclusive"/>
</p>
{/if}
</td>
</tr>
</tfoot>
</table>
<img id="bigpic" style="display: none; visibility: hidden" class="hack156"/>
</div>
<script type="text/javascript">
var gcof_empty = {$gcof_empty|intval};
var gcof_psversion = '{$gcof_psversion|escape:'html':'UTF-8'}';
var gcof_stock = {$gcof_stock|intval};
var gcof_image = {$gcof_image|intval};
{if $gcof_image}
var image_size_width = {$gcof_image_size.width|intval};
var image_size_height = {$gcof_image_size.height|intval};
{/if}
var gcof_img_dir = '{$gcof_img_dir|escape:'html':'UTF-8'}';
var gcof_url = '{$link->getModuleLink('gcorderform', 'actions', ['process' => 'get'], {$gcof_ssl|intval})|escape:'html':'UTF-8'}';
var gcof_categories = '{$link->getModuleLink('gcorderform', 'actions', ['process' => 'categories'], {$gcof_ssl|intval})|escape:'html':'UTF-8'}';
var gcof_quantitybuttons = {$gcof_quantity_buttons|intval};
var gcof_confirmtxt = "{$gcof_confirmtxt|escape:'html':'UTF-8'}";
// <![CDATA[
{literal}
$(document).ready(function () {
$('#ofsubcategories').unbind('click').on('click', '.filter', function () {
if (checkFormFill()) {
hoverIt($(this));
if (!$(this).hasClass('n2')) {
displaySubCategories($(this));
}
if (!$(this).hasClass('n2')) {
refreshProductList($(this));
}
else {
refreshProductList($(this));
}
}
return false;
});
$('.name').unbind('click').on('click', '.product_img_link', function () {
checkFormFill();
return true;
});
$('.qtyup').unbind('click').live('click', function () {
qtyUp($(this));
return false;
});
$('.qtydown').unbind('click').live('click', function () {
qtyDown($(this));
return false;
});
$('.quantity_wanted').unbind('focusout').live('focusout', function () {
checkMinimalQuantityOrderForm($(this));
});
$('#add_to_cart_fix').unbind('click').click(function () {
$('tbody tr').each(function () {
if ($(this).find('.quantity_wanted').val() > 0) {
var currentRow = $(this);
ajaxCart.add(currentRow.find('.name .id_product').val(), currentRow.find('.name .id_product_attribute').val(), false, this, currentRow.find('.quantity input').val(), null);
if (gcof_empty == 1)
currentRow.find('.quantity input').val("0");
}
});
return false;
});
$('.rollup').unbind('click').on('click', '.enrouleur', function () {
var givemeyourid = $(this).attr("id");
$(this).parent().parent().parent().find('.decliline' + givemeyourid).slideToggle();
if ($(this).html() == '+') {
$(this).html('-');
$(this).css('line-height', '17px');
}
else {
$(this).html('+');
$(this).css('line-height', '20px');
}
return false;
});
});
function checkFormFill(myObject) {
var needconfirm = 0;
$('.orderform_content table tbody tr').each(function () {
if ($(this).find('.quantity input').val() > 0) {
needconfirm = 1;
return;
}
});
if (needconfirm == 1) {
if (confirm(gcof_confirmtxt)) {
$('tbody tr').each(function () {
if ($(this).find('.quantity_wanted').val() > 0) {
var currentRow = $(this);
ajaxCart.add(currentRow.find('.name .id_product').val(), currentRow.find('.name .id_product_attribute').val(), false, this, currentRow.find('.quantity input').val(), null);
if (gcof_empty == 1)
currentRow.find('.quantity input').val("0");
}
});
return true;
}
}
return true;
}
function displaySubCategories(myObject) {
lerel = myObject.attr('rel');
$.ajax({
url: gcof_categories,
type: "GET",
dataType: 'json',
data: "id_category=" + lerel,
success: function (data2) {
var element;
$('#ofsubcategoriesn2 ul li').remove();
if (data2 == null || data2.length == 0)
$('#ofsubcategoriesn2').slideUp();
else {
$('#ofsubcategoriesn2').slideDown();
$('#ofsubcategoriesn2').find('span.cat').html(myObject.attr('title'));
$.each(data2, function (index, element) {
element = '<li>' +
'<div class="subcategory-image">' +
'<a rel="' + element.id_category + '" title="' + element.name + '" class="img filter n2">' +
'<img class="replace-2x catimage" src="' + element.my_image + '" alt="' + element.name + '" width="80" height="80">' +
'</a>' +
'</div>' +
'<h5 class="subcategory-name">' + element.name + '</a></h5>' +
'</li>';
var newElement = $(element).clone();
$('#ofsubcategoriesn2 ul').append(newElement);
BindCat(newElement.find('.filter'));
BindRefresh(newElement.find('.filter'));
});
}
},
error: function (resultat, statut, erreur) {
$('#ofsubcategoriesn2').slideUp();
}
});
}
function refreshProductList(myObject) {
lerel = myObject.attr('rel');
$.ajax({
url: gcof_url,
type: "GET",
dataType: 'json',
data: "id_category=" + lerel,
success: function (data) {
var cell_image, cell_reference, cell_name, cell_decli, cell_stock, cell_quantity, cell_price, cell_enrouleur, row;
$('.orderform_content table tbody tr').remove();
$.each(data, function (index, element) {
if ((!$.isArray(element.declinaison)) && (element.declinaison.substr(0, 15) == "ProdSansDecli##")) {
if (gcof_image == 1) {
if (typeof element.big != "undefined")
cell_image = '<td class="image"><a href="' + element.big + '" data-lightbox="' + element.name + element.id_product + '" data-title="' + element.name + '" title="' + element.name + '"><img src="' + element.big + '" alt="' + element.name + '" width="' + image_size_width + '" height="' + image_size_height + '" /></a></td>';
else
cell_image = '<td class="image"></td>';
}
cell_reference = '<td class="ref"><p class="ref">' + element.reference + '</p></td>';
cell_name = '<td class="name"><a class="product_img_link" href="' + element.link + '" title="' + element.name + '"><span class="title">' + element.name + '</span><input type="hidden" value="' + element.id_product + '" class="id_product"/></a><input type="hidden" value="0" class="id_product_attribute"/></td>';
cell_enrouleur = '<td class="rollup">&nbsp;</td>'
if (gcof_stock == 1)
cell_stock = '<td class="stock">' + element.quantityavailable + '</td>';
cell_quantity = '<td class="quantity text-center"><input type="text" name="qty" size="4" autocomplete="off" class="form-control grey quantity_wanted text" value="0">';
if (gcof_quantitybuttons == 1) {
if (gcof_psversion == '16') {
cell_quantity += '<div ' +
'class="clearfix" id="quantity_button"><a rel="nofollow" class="qtydown btn btn-default ' +
'button-minus" href="#" title="Add"><span><i class="icon-minus"></i></span></a><a ' +
'rel="nofollow" class="qtyup btn btn-default button-plus" href="#" title="Add"><span><i ' +
'class="icon-plus"></i></span></a></div>';
}
else {
cell_quantity += '<div ' +
'class="cart_quantity_button"><a rel="nofollow" class="qtyup" href="#"><img ' +
'src="' + gcof_img_dir + 'quantity_up.gif" width="14" height="9"></a><a rel="nofollow" ' +
'class="qtydown" href="#"> <img src="' + gcof_img_dir + 'quantity_down.gif" width="14" height="9" ' +
'/> </a></div>';
}
}
cell_quantity += '<span class="min">' + element.minimal_quantity + '</span></td>';
cell_price = '<td class="price">' + element.price + '</td>';
row = '<tr class="item">';
if (gcof_image == 1)
row = row + cell_image;
row = row + cell_reference + cell_name + cell_enrouleur;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').append(newRow);
BindCheckMinimal(newRow.find('.quantity_wanted'));
} else {
if (gcof_image == 1) {
if (typeof element.big != "undefined")
cell_image = '<td class="image"><a href="' + element.big + '" data-lightbox="' + element.name + element.id_product + '" data-title="' + element.name + '" title="' + element.name + '"><img src="' + element.big + '" alt="' + element.name + '" width="' + image_size_width + '" height="' + image_size_height + '" /></a></td>';
else
cell_image = '<td class="image"></td>';
}
cell_reference = '<td class="ref"><p class="ref"></p></td>';
cell_name = '<td class="name"><a class="product_img_link" href="' + element.link + '" title="' + element.name + '"><span class="title">' + element.name + '</span></a><input type="hidden" value="' + element.id_product + '" class="id_product"/><input type="hidden" value="0" class="id_product_attribute"/></td>';
cell_enrouleur = '<td class="rollup"><span class="enrouleur" id="' + element.id_product + '">+</span></td>'
if (gcof_stock == 1)
cell_stock = '<td class="stock"></td>';
cell_quantity = '<td class="quantity text-center"></td>';
cell_price = '<td class="price"></td>';
row = '<tr class="item">';
if (gcof_image == 1)
row = row + cell_image;
row = row + cell_reference + cell_name + cell_enrouleur;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').append(newRow);
BindCheckMinimal(newRow.find('.quantity_wanted'));
$.each(element.declinaison, function (index2, elementdecli) {
if (gcof_image == 1) {
if (typeof elementdecli.big != "undefined")
cell_image = '<td class="image"><a href="' + elementdecli.big + '" data-lightbox="' + element.name + element.id_product + ' ' + elementdecli.libelle + '" data-title="' + element.name + ' ' + elementdecli.libelle + '" title="' + element.name + ' ' + elementdecli.libelle + '"><img src="' + elementdecli.big + '#" alt="' + element.name + '" width="' + image_size_width + '" height="' + image_size_height + '" /></a></td>';
else
cell_image = '<td class="image"></td>';
}
cell_reference = '<td class="ref"><p class="ref">' + elementdecli.reference + '</p></td>';
cell_name = '<td class="name"><span class="title">' + element.name + '</span><input type="hidden" value="' + element.id_product + '" class="id_product"/> <span class="decli-name">' + elementdecli.libelle + '</span><input type="hidden" value="' + elementdecli.id_product_attribute + '" class="id_product_attribute"/></td>';
cell_enrouleur = '<td class="rollup">&nbsp;</td>'
if (gcof_stock == 1)
cell_stock = '<td class="stock">' + elementdecli.quantityavailable + '</td>';
cell_quantity = '<td class="quantity text-center"><input type="text" name="qty" size="4" autocomplete="off" class="form-control grey quantity_wanted text" value="0">';
if (gcof_quantitybuttons == 1) {
if (gcof_psversion == '16') {
cell_quantity += '<div ' +
'class="clearfix" id="quantity_button"><a rel="nofollow" class="qtydown btn btn-default ' +
'button-minus" href="#" title="Add"><span><i class="icon-minus"></i></span></a><a ' +
'rel="nofollow" class="qtyup btn btn-default button-plus" href="#" title="Add"><span><i ' +
'class="icon-plus"></i></span></a></div>';
}
else {
cell_quantity += '<div ' +
'class="cart_quantity_button"><a rel="nofollow" class="qtyup" href="#"><img ' +
'src="' + gcof_img_dir + 'quantity_up.gif" width="14" height="9"></a><a rel="nofollow" ' +
'class="qtydown" href="#"><img src="' + gcof_img_dir + 'quantity_down.gif" width="14" ' +
'height="9"></a></div>';
}
}
cell_quantity += '<span class="min">' + elementdecli.minimal_quantity + '</span></td>';
cell_price = '<td class="price">' + elementdecli.price + '</td>';
row = '<tr class="item declihidden decliline' + element.id_product + '">';
if (gcof_image == 1)
row = row + cell_image;
row = row + cell_reference + cell_name + cell_enrouleur;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').append(newRow);
BindCheckMinimal(newRow.find('.quantity_wanted'));
});
}
BindEnrouleur(newRow.find('.enrouleur'));
});
}
});
}
function hoverIt(myObject) {
$('.subcategory-image').each(function () {
$(this).css('border', '1px solid #d6d4d4');
});
if (myObject.hasClass('n2')) {
myObject.parent().css('border', '1px solid #333333');
}
else {
myObject.parent().css('border', '1px solid #333333');
}
}
function qtyUp(myObject) {
var laquantiteencours = myObject.parent().parent().find('.quantity_wanted');
var lemin = parseInt(myObject.parent().parent().find('.min').text());
if (lemin > 1) {
if (laquantiteencours.val() > 0) {
laquantiteencours.val(parseInt(laquantiteencours.val()) + 1);
} else {
laquantiteencours.val(lemin);
}
} else {
laquantiteencours.val(parseInt(laquantiteencours.val()) + 1);
}
laquantiteencours.css('border', '1px solid #b4b4b4');
}
function qtyDown(myObject) {
var laquantiteencours = myObject.parent().parent().find('.quantity_wanted');
if (parseInt(laquantiteencours.val()) == parseInt(myObject.parent().parent().find('.min').text())) {
laquantiteencours.val("0");
laquantiteencours.css('border', '1px solid #b4b4b4');
}
else {
if (laquantiteencours.val() == 0) {
laquantiteencours.css('border', '1px solid red');
}
else {
laquantiteencours.val(parseInt(laquantiteencours.val()) - 1);
laquantiteencours.css('border', '1px solid #b4b4b4');
}
}
}
function checkMinimalQuantityOrderForm(myObject) {
laligne = myObject.parent();
if (parseInt($(laligne).find('.quantity_wanted').val()) < parseInt($(laligne).find('.min').text())) {
$(laligne).find('.quantity_wanted').val("0");
return false;
}
else
$(laligne).find('.quantity_wanted').css('border', '1px solid #b4b4b4');
return true;
}
function BindCheckMinimal(myObject) {
$(myObject).bind("focusout", function (e) {
checkMinimalQuantityOrderForm($(this));
});
}
function BindCat(myObject) {
$(myObject).bind("click", function (e) {
hoverIt($(this));
});
}
function Refresh(myObject) {
if (!myObject.hasClass('n2')) {
refreshProductList(myObject.parent());
}
else {
refreshProductList(myObject);
}
}
function BindRefresh(myObject) {
$(myObject).bind("click", function (e) {
Refresh(myObject);
});
}
function BindEnrouleur(myObject) {
$(myObject).bind('click', function () {
Enrouleur(myObject);
});
}
function Enrouleur(myObject) {
var givemeyourid = myObject.attr("id");
myObject.parent().parent().parent().find('.decliline' + givemeyourid).slideToggle();
if (myObject.html() == '+') {
myObject.html('-');
myObject.css('line-height', '17px');
}
else {
myObject.html('+');
myObject.css('line-height', '20px');
}
return false;
}
{/literal}
// ]]>
</script>
<!-- /MODULE GcOrderForm -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*/
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;

View File

@@ -0,0 +1,20 @@
<?php
/**
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*/
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;

View File

@@ -0,0 +1,170 @@
{*
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*
*}
<script type="text/javascript">
prestashop.blockcart.showModal = 0;
var gcof_empty = {$gcof_empty|intval};
var gcof_stock = {$gcof_stock|intval};
var gcof_image = {$gcof_image|intval};
var gcof_link = {$gcof_link|intval};
{if $gcof_image}
var gcof_image_size_width = {$gcof_image_size.width|intval};
var gcof_image_size_height = {$gcof_image_size.height|intval};
{/if}
var gcof_url = "{$gcof_url|escape:'html':'UTF-8'}";
var gcof_cart_url = "{$cart_url|escape:'html':'UTF-8'}";
var gcof_quantitybuttons = {$gcof_quantity_buttons|intval};
// <![CDATA[
{literal}
$(document).ready(function () {
$('#categories').change(function () {
$.ajax({
url: gcof_url,
type: "GET",
dataType: 'json',
data: "id_category=" + $('#categories').val(),
success: function (data) {
var cell_image, cell_reference, cell_name, cell_decli, cell_stock, cell_quantity, cell_price, row;
$('.orderform_content table tbody tr').remove();
$.each(data, function (index, element) {
if ((!$.isArray(element.declinaison)) && (element.declinaison.substr(0, 15) == "ProdSansDecli##")) {
if (gcof_image == 1)
cell_image = '<td class="image"><img src="' + element.big + '" alt="' + element.name + '" width="' + gcof_image_size_width + '" height="' + gcof_image_size_height + '" /></td>';
cell_reference = '<td class="ref"><p class="ref">' + element.reference + '</p></td>';
if (gcof_link == 1)
cell_name = '<td class="name"><a href="' + element.link + '"><span class="title">' + element.name + '</span></a>';
else
cell_name = '<td class="name"><span class="title">' + element.name + '</span>';
cell_name += '<input type="hidden" value="' + element.id_product + '" class="id_product"/><input type="hidden" value="0" class="id_product_attribute"/></td>';
if (gcof_stock == 1)
cell_stock = '<td class="stock">' + element.quantityavailable + '</td>';
if (element.minimal_quantity > 0)
cell_quantity = '<td class="quantity text-center"><div class="product-quantity clearfix"><div class="qty"><input type="text" name="qty" class="quantity_wanted input-group" value="0" min="' + element.minimal_quantity + '" max="99999"></div></div>';
else
cell_quantity = '<td class="quantity text-center"><div class="product-quantity clearfix"><div class="qty"><input type="text" name="qty" class="quantity_wanted input-group" value="0" min="0" max="99999"></div></div>';
cell_quantity += '<span class="min">' + element.minimal_quantity + '</span></td>';
cell_price = '<td class="price">' + element.price + '</td>';
row = '<tr class="item">';
if (gcof_image == 1)
row = row + cell_image;
row = row + cell_reference + cell_name;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').append(newRow);
} else {
$.each(element.declinaison, function (index2, elementdecli) {
if (gcof_image == 1)
cell_image = '<td class="image"><img src="' + elementdecli.big + '" alt="' + element.name + '" width="' + gcof_image_size_width + '" height="' + gcof_image_size_height + '" /></td>';
cell_reference = '<td class="ref"><p class="ref">' + elementdecli.reference + '</p></td>';
if (gcof_link == 1)
cell_name = '<td class="name"><a href="' + elementdecli.link + '"><span class="title">' + element.name + '</span> <span class="decli-name">' + elementdecli.libelle + '</span></a>';
else
cell_name = '<td class="name"><span class="title">' + element.name + '</span> <span class="decli-name">' + elementdecli.libelle + '</span>';
cell_name += '<input type="hidden" value="' + element.id_product + '" class="id_product"/><input type="hidden" value="' + elementdecli.id_product_attribute + '" class="id_product_attribute"/></td>';
if (gcof_stock == 1)
cell_stock = '<td class="stock">' + elementdecli.quantityavailable + '</td>';
if (elementdecli.minimal_quantity > 0)
cell_quantity = '<td class="quantity text-center"><div class="product-quantity clearfix"><div class="qty"><input type="text" name="qty" class="quantity_wanted input-group" value="0" min="' + elementdecli.minimal_quantity + '" max="99999"></div></div>';
else
cell_quantity = '<td class="quantity text-center"><div class="product-quantity clearfix"><div class="qty"><input type="text" name="qty" class="quantity_wanted input-group" value="0" min="0" max="99999"></div></div>';
cell_quantity += '<span class="min">' + elementdecli.minimal_quantity + '</span></td>';
cell_price = '<td class="price">' + elementdecli.price + '</td>';
row = '<tr class="item">';
if (gcof_image == 1)
row = row + cell_image;
row = row + cell_reference + cell_name;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').prepend(newRow);
});
}
});
if (gcof_quantitybuttons == 1)
createProductSpin();
}
});
});
$('#add_to_cart_fix').unbind('click').click(function () {
$('.orderform_content tbody tr').each(function () {
if ($(this).find('.quantity_wanted').val() > 0) {
var currentRow = $(this);
$.post(gcof_cart_url+'?rand=' + new Date().getTime(), {
action: "update",
id_product: parseInt(currentRow.find('.name .id_product').val()),
id_product_attribute: parseInt(currentRow.find('.name .id_product_attribute').val()),
ajax: true,
qty: parseInt(currentRow.find('.quantity_wanted').val()),
headers: {
"cache-control": "no-cache"
},
async: true,
token: prestashop["static_token"],
add: 1,
cache: false,
}, null, 'json').then(function (resp) {
prestashop.emit('updateCart', {
reason: {
idProduct: resp.id_product,
idProductAttribute: resp.id_product_attribute,
linkAction: 'add-to-cart'
}
});
});
if (gcof_empty == 1)
currentRow.find('.quantity input').val("0");
}
});
window.scrollTo(0, 0);
return false;
});
if (gcof_quantitybuttons == 1)
createProductSpin();
});
function createProductSpin() {
$('.orderform_content tr').each(function () {
var currentRow = $(this);
quantityInput = currentRow.find('.quantity_wanted');
quantityInput.TouchSpin({
verticalbuttons: true,
verticalupclass: 'material-icons touchspin-up',
verticaldownclass: 'material-icons touchspin-down',
buttondown_class: 'btn btn-touchspin js-touchspin',
buttonup_class: 'btn btn-touchspin js-touchspin',
min: 0,
max: 1000000
});
});
}
{/literal}
// ]]>
</script>

View File

@@ -0,0 +1,406 @@
{*
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*
*}
<script type="text/javascript">
prestashop.blockcart.showModal = 0;
var gcof_empty = {$gcof_empty|intval};
var ps = '{$gcof_psversion|escape:'html':'UTF-8'}';
var gcof_stock = {$gcof_stock|intval};
var gcof_image = {$gcof_image|intval};
{if $gcof_image}
var image_size_width = {$gcof_image_size.width|intval};
var image_size_height = {$gcof_image_size.height|intval};
{/if}
var gcof_img_dir = '{$gcof_img_dir|escape:'html':'UTF-8'}';
var gcof_url = '{$link->getModuleLink('gcorderform', 'actions', ['process' => 'get'], {$gcof_ssl|intval})|escape:'html':'UTF-8'}';
var gcof_cart_url = "{$cart_url|escape:'html':'UTF-8'}";
var gcof_categories = '{$link->getModuleLink('gcorderform', 'actions', ['process' => 'categories'], {$gcof_ssl|intval})|escape:'html':'UTF-8'}';
var gcof_quantitybuttons = {$gcof_quantity_buttons|intval};
var gcof_confirmtxt = "{$gcof_confirmtxt|escape:'html':'UTF-8'}";
// <![CDATA[
{literal}
$(document).ready(function () {
$('#ofsubcategories').unbind('click').on('click', '.filter', function () {
if (checkFormFill()) {
hoverIt($(this));
if (!$(this).hasClass('n2')) {
displaySubCategories($(this).parent());
}
if (!$(this).hasClass('n2')) {
refreshProductList($(this).parent());
}
else {
refreshProductList($(this));
}
}
return false;
});
$(".qty").unbind('change').on('change', '.quantity_wanted', function() {
checkMinimal($(this));
return true;
});
$('.name').unbind('click').on('click', '.product_img_link', function () {
checkFormFill();
return true;
});
$('#add_to_cart_fix').unbind('click').click(function () {
$('tbody tr').each(function () {
if ($(this).find('.quantity_wanted').val() > 0) {
var currentRow = $(this);
$.post(gcof_cart_url+'?rand=' + new Date().getTime(), {
action: "update",
id_product: parseInt(currentRow.find('.name .id_product').val()),
id_product_attribute: parseInt(currentRow.find('.name .id_product_attribute').val()),
ajax: true,
qty: parseInt(currentRow.find('.quantity_wanted').val()),
headers: {
"cache-control": "no-cache"
},
async: true,
token: prestashop["static_token"],
add: 1,
cache: false,
}, null, 'json').then(function (resp) {
prestashop.emit('updateCart', {
reason: {
idProduct: resp.id_product,
idProductAttribute: resp.id_product_attribute,
linkAction: 'add-to-cart'
}
});
});
if (gcof_empty == 1)
currentRow.find('.quantity input').val("0");
}
});
return false;
});
$('.rollup').unbind('click').on('click', '.enrouleur', function () {
var givemeyourid = $(this).attr("id");
$(this).parent().parent().parent().find('.decliline' + givemeyourid).slideToggle();
if ($(this).html() == '+') {
$(this).html('-');
$(this).css('line-height', '17px');
}
else {
$(this).html('+');
$(this).css('line-height', '20px');
}
return false;
});
if (gcof_quantitybuttons == 1)
createProductSpin();
});
function checkFormFill(myObject) {
var needconfirm = 0;
$('.orderform_content table tbody tr').each(function () {
if ($(this).find('.quantity input').val() > 0) {
needconfirm = 1;
return;
}
});
if (needconfirm == 1) {
if (confirm(gcof_confirmtxt)) {
$('tbody tr').each(function () {
if ($(this).find('.quantity_wanted').val() > 0) {
var currentRow = $(this);
$.post(gcof_cart_url+'?rand=' + new Date().getTime(), {
action: "update",
id_product: parseInt(currentRow.find('.name .id_product').val()),
id_product_attribute: parseInt(currentRow.find('.name .id_product_attribute').val()),
ajax: true,
qty: parseInt(currentRow.find('.quantity_wanted').val()),
headers: {
"cache-control": "no-cache"
},
async: true,
token: prestashop["static_token"],
add: 1,
cache: false,
}, null, 'json').then(function (resp) {
prestashop.emit('updateCart', {
reason: {
idProduct: resp.id_product,
idProductAttribute: resp.id_product_attribute,
linkAction: 'add-to-cart'
}
});
});
if (gcof_empty == 1)
currentRow.find('.quantity input').val("0");
}
});
return true;
}
}
return true;
}
function displaySubCategories(myObject) {
lerel = myObject.attr('rel');
$.ajax({
url: gcof_categories,
type: "GET",
dataType: 'json',
data: "id_category=" + lerel,
success: function (data2) {
var element;
$('#ofsubcategoriesn2 ul li').remove();
if (data2 == null || data2.length == 0)
$('#ofsubcategoriesn2').slideUp();
else {
$('#ofsubcategoriesn2').slideDown();
$('#ofsubcategoriesn2').find('span.cat').html(myObject.attr('title'));
$.each(data2, function (index, element) {
element = '<li>' +
'<div class="subcategory-image">' +
'<a rel="' + element.id_category + '" title="' + element.name + '" class="img filter n2">' +
'<img class="replace-2x catimage" src="' + element.my_image + '" alt="' + element.name + '" width="80" height="80">' +
'</a>' +
'</div>' +
'<h5 class="subcategory-name">' + element.name + '</a></h5>' +
'</li>';
var newElement = $(element).clone();
$('#ofsubcategoriesn2 ul').append(newElement);
BindCat(newElement.find('.filter'));
BindRefresh(newElement.find('.filter'));
});
}
},
error: function (resultat, statut, erreur) {
$('#ofsubcategoriesn2').slideUp();
}
});
}
function refreshProductList(myObject) {
lerel = myObject.attr('rel');
$.ajax({
url: gcof_url,
type: "GET",
dataType: 'json',
data: "id_category=" + lerel,
success: function (data) {
var cell_image, cell_reference, cell_name, cell_decli, cell_stock, cell_quantity, cell_price, cell_enrouleur, row;
$('.orderform_content table tbody tr').remove();
$.each(data, function (index, element) {
if ((!$.isArray(element.declinaison)) && (element.declinaison.substr(0, 15) == "ProdSansDecli##")) {
if (gcof_image == 1) {
if (typeof element.big != "undefined")
cell_image = '<td class="image"><a href="' + element.big + '" data-lightbox="' + element.name + element.id_product + '" data-title="' + element.name + '" title="' + element.name + '"><img src="' + element.big + '" alt="' + element.name + '" width="' + image_size_width + '" height="' + image_size_height + '" /></a></td>';
else
cell_image = '<td class="image"></td>';
} else {
cell_image = '<td class="image"></td>';
}
cell_reference = '<td class="ref"><p class="ref">' + element.reference + '</p></td>';
cell_name = '<td class="name"><a class="product_img_link" href="' + element.link + '" title="' + element.name + '"><span class="title">' + element.name + '</span><input type="hidden" value="' + element.id_product + '" class="id_product"/></a><input type="hidden" value="0" class="id_product_attribute"/></td>';
cell_enrouleur = '<td class="rollup">&nbsp;</td>'
if (gcof_stock == 1)
cell_stock = '<td class="stock">' + element.quantityavailable + '</td>';
if (element.minimal_quantity > 0)
cell_quantity = '<td class="quantity text-center"><div class="product-quantity clearfix"><div class="qty"><input type="text" name="qty" class="quantity_wanted input-group" value="0" min="' + element.minimal_quantity + '" max="99999"></div></div>';
else
cell_quantity = '<td class="quantity text-center"><div class="product-quantity clearfix"><div class="qty"><input type="text" name="qty" class="quantity_wanted input-group" value="0" min="0" max="99999"></div></div>';
cell_price = '<td class="price">' + element.price + '</td>';
row = '<tr class="item">';
row = row + cell_image;
row = row + cell_reference + cell_name + cell_enrouleur;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').append(newRow);
} else {
if (gcof_image == 1) {
if (typeof element.big != "undefined")
cell_image = '<td class="image"><a href="' + element.big + '" data-lightbox="' + element.name + element.id_product + '" data-title="' + element.name + '" title="' + element.name + '"><img src="' + element.big + '" alt="' + element.name + '" width="' + image_size_width + '" height="' + image_size_height + '" /></a></td>';
else
cell_image = '<td class="image"></td>';
} else {
cell_image = '<td class="image"></td>';
}
cell_reference = '<td class="ref"><p class="ref"></p></td>';
cell_name = '<td class="name"><a class="product_img_link" href="' + element.link + '" title="' + element.name + '"><span class="title">' + element.name + '</span></a><input type="hidden" value="' + element.id_product + '" class="id_product"/><input type="hidden" value="0" class="id_product_attribute"/></td>';
cell_enrouleur = '<td class="rollup"><span class="enrouleur" id="' + element.id_product + '">+</span></td>'
if (gcof_stock == 1)
cell_stock = '<td class="stock"></td>';
cell_quantity = '<td class="quantity text-center"></td>';
cell_price = '<td class="price"></td>';
row = '<tr class="item">';
row = row + cell_image;
row = row + cell_reference + cell_name + cell_enrouleur;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').append(newRow);
$.each(element.declinaison, function (index2, elementdecli) {
if (gcof_image == 1) {
if (typeof elementdecli.big != "undefined")
cell_image = '<td class="image"><a href="' + elementdecli.big + '" data-lightbox="' + element.name + element.id_product + ' ' + elementdecli.libelle + '" data-title="' + element.name + ' ' + elementdecli.libelle + '" title="' + element.name + ' ' + elementdecli.libelle + '"><img src="' + elementdecli.big + '#" alt="' + element.name + '" width="' + image_size_width + '" height="' + image_size_height + '" /></a></td>';
else
cell_image = '<td class="image"></td>';
} else {
cell_image = '<td class="image"></td>';
}
cell_reference = '<td class="ref"><p class="ref">' + elementdecli.reference + '</p></td>';
cell_name = '<td class="name"><span class="title">' + element.name + '</span><input type="hidden" value="' + element.id_product + '" class="id_product"/> <span class="decli-name">' + elementdecli.libelle + '</span><input type="hidden" value="' + elementdecli.id_product_attribute + '" class="id_product_attribute"/></td>';
cell_enrouleur = '<td class="rollup">&nbsp;</td>'
if (gcof_stock == 1)
cell_stock = '<td class="stock">' + elementdecli.quantityavailable + '</td>';
if (elementdecli.minimal_quantity > 0)
cell_quantity = '<td class="quantity text-center"><div class="product-quantity clearfix"><div class="qty"><input type="text" name="qty" class="quantity_wanted input-group" value="0" min="' + elementdecli.minimal_quantity + '" max="99999"></div></div>';
else
cell_quantity = '<td class="quantity text-center"><div class="product-quantity clearfix"><div class="qty"><input type="text" name="qty" class="quantity_wanted input-group" value="0" min="0" max="99999"></div></div>';
cell_price = '<td class="price">' + elementdecli.price + '</td>';
row = '<tr class="item declihidden decliline' + element.id_product + '">';
row = row + cell_image;
row = row + cell_reference + cell_name + cell_enrouleur;
if (gcof_stock == 1)
row = row + cell_stock;
row = row + cell_quantity + cell_price + '</tr>';
var newRow = $(row).clone();
$('.orderform_content table tbody').append(newRow);
});
}
BindEnrouleur(newRow.find('.enrouleur'));
BindCheckMinimal(newRow.find('.quantity_wanted'));
});
if (gcof_quantitybuttons == 1)
createProductSpin();
}
});
}
function checkMinimal(myObject) {
if (parseInt(myObject.val()) == (parseInt(myObject.attr('min'))-1)) {
myObject.val(0);
} else {
if (parseInt(myObject.val()) < parseInt(myObject.attr('min'))) {
myObject.val(parseInt(myObject.attr('min')));
}
}
}
function hoverIt(myObject) {
$('.subcategory-image a').each(function () {
$(this).css('border', '1px solid #d6d4d4');
});
if (myObject.hasClass('n2')) {
myObject.css('border', '1px solid #333333');
}
else {
myObject.parent().css('border', '1px solid #333333');
}
}
function BindCat(myObject) {
$(myObject).bind("click", function (e) {
hoverIt(myObject);
});
}
function Refresh(myObject) {
if (!myObject.hasClass('n2')) {
refreshProductList(myObject.parent());
}
else {
refreshProductList(myObject);
}
}
function BindRefresh(myObject) {
$(myObject).bind("click", function (e) {
Refresh(myObject);
});
}
function BindEnrouleur(myObject) {
$(myObject).bind('click', function () {
Enrouleur(myObject);
});
}
function BindCheckMinimal(myObject) {
$(myObject).bind('change', function() {
checkMinimal(myObject);
});
}
function Enrouleur(myObject) {
var givemeyourid = myObject.attr("id");
myObject.parent().parent().parent().find('.decliline' + givemeyourid).slideToggle();
if (myObject.html() == '+') {
myObject.html('-');
myObject.css('line-height', '17px');
}
else {
myObject.html('+');
myObject.css('line-height', '20px');
}
return false;
}
function createProductSpin() {
$('.orderform_content tr').each(function () {
var currentRow = $(this);
quantityInput = currentRow.find('.quantity_wanted');
quantityInput.TouchSpin({
verticalbuttons: true,
verticalupclass: 'material-icons touchspin-up',
verticaldownclass: 'material-icons touchspin-down',
buttondown_class: 'btn btn-touchspin js-touchspin',
buttonup_class: 'btn btn-touchspin js-touchspin',
min: 0,
max: 1000000
});
});
}
{/literal}
// ]]>
</script>

View File

@@ -0,0 +1,24 @@
{*
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*
*}
<div id="gcorderform_block_left">
<h4 class="text-uppercase h6 hidden-sm-down">{l s='Order quicker !' mod='gcorderform'}</h4>
<div class="block_content gcorderform_block">
<p class="quickorder_image">
<a href="{$link->getModuleLink('gcorderform')|escape:'html':'UTF-8'}" title="{l s='Go to Order Form' mod='gcorderform'}"><img
src="{$gcof_picture|escape:'html':'UTF-8'}"
alt="{l s='Order quicker !' mod='gcorderform'}"
title="{l s='Order quicker !' mod='gcorderform'}"
width="155" height="163"
class="img-responsive"/></a>
</p>
</div>
</div>

View File

@@ -0,0 +1,17 @@
{*
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*
*}
<a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="order-slips-link" href="{$link->getModuleLink('gcorderform', 'default')|escape:'html':'UTF-8'}">
<span class="link-item">
<i class="material-icons">fast_forward</i>
{l s='Order Form' mod='gcorderform'}
</span>
</a>

View File

@@ -0,0 +1,20 @@
<?php
/**
* GcOrderForm
*
* @author Grégory Chartier <hello@gregorychartier.fr>
* @copyright 2018 Grégory Chartier (https://www.gregorychartier.fr)
* @license Commercial license see license.txt
* @category Prestashop
* @category Module
*/
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;