first commit

This commit is contained in:
2024-11-05 12:22:50 +01:00
commit e5682a3912
19641 changed files with 2948548 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
require_once(dirname(__FILE__).'../../../config/config.inc.php');
require_once(dirname(__FILE__).'../../../init.php');
$id_cart = (int)(Tools::getValue('id_cart'));
$value = (int)(Tools::getValue('value'));
if(!empty($id_cart) and !empty($value)){
$choice = Db::getInstance()->ExecuteS('SELECT document_type FROM `'._DB_PREFIX_.'invoice_bill` WHERE id_cart = '.$id_cart);
if(count($choice) == 0)
{
Db::getInstance()->insert('invoice_bill', array(
'id_cart' => $id_cart,
'document_type' => $value
));
} else {
Db::getInstance()->update('invoice_bill',
array('document_type'=>$value),
'id_cart = '.(int) $id_cart
);
}
}
?>

View File

@@ -0,0 +1,13 @@
<form action="#" method="POST" id="invoice_bill">
<input type="hidden" value="{$id_cart}" name="invoice_bill_id" id="invoice_bill_id"/>
<h5>Wybierz typ dokumentu</h5>
<label>
<input type="radio" value="1" name="invoice_bill" {if $type == 1} checked {/if}/>
{l s='Invoice' mod='paragonfaktura'}
</label>
<label>
<input type="radio" value="2" name="invoice_bill" {if $type == 2} checked {/if} style="margin-left: 30px;"/>
{l s='Bill' mod='paragonfaktura'}
</label>
</form>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>paragonfaktura</name>
<displayName><![CDATA[Paragon Faktura 1.7]]></displayName>
<version><![CDATA[1.0]]></version>
<description><![CDATA[Invoice or bill]]></description>
<author><![CDATA[Cypis.net]]></author>
<tab><![CDATA[billing_invoicing]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>paragonfaktura</name>
<displayName><![CDATA[Paragon Faktura 1.7]]></displayName>
<version><![CDATA[1.0.1]]></version>
<description><![CDATA[Wybierz typ dokumentu w trakcie zakup&oacute;w]]></description>
<author><![CDATA[Cypis.net]]></author>
<tab><![CDATA[billing_invoicing]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,11 @@
<?php
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: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,655 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title> Ticket </title>
<!--[if !mso]><!-- --><meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]--><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
#outlook a {
padding: 0;
}
.ReadMsgBody {
width: 100%;
}
.ExternalClass {
width: 100%;
}
.ExternalClass * {
line-height: 100%;
}
body {
margin: 0;
padding: 0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
table,
td {
border-collapse: collapse;
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
}
img {
border: 0;
height: auto;
line-height: 100%;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
p {
display: block;
margin: 13px 0;
}
</style>
<!--[if !mso]><!--><style type="text/css">
@media only screen and (max-width:480px) {
@-ms-viewport {
width: 320px;
}
@viewport {
width: 320px;
}
}
</style>
<!--<![endif]--><!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]--><!--[if lte mso 11]>
<style type="text/css">
.outlook-group-fix { width:100% !important; }
</style>
<![endif]--><style type="text/css">
</style>
<style type="text/css">
.shadow {
box-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.1);
}
.label {
font-weight: 700;
}
.warning {
font-weight: 700;
font-size: 16px;
}
a {
color: #25B9D7;
text-decoration: underline;
font-weight: 600;
}
a.light {
font-weight: 400;
}
span.strong {
font-weight: 600;
}
@media only screen and (max-width: 480px) {
body,
.no-bg {
background-color: #fff !important;
}
.left p {
text-align: left;
display: inline-block
}
}
</style>
<style type="text/css">
#outlook a {
padding: 0;
}
.ReadMsgBody {
width: 100%;
}
.ExternalClass {
width: 100%;
}
.ExternalClass * {
line-height: 100%;
}
body {
margin: 0;
padding: 0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
table,
td {
border-collapse: collapse;
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
}
img {
border: 0;
height: auto;
line-height: 100%;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
p {
display: block;
margin: 13px 0;
}
</style>
<style type="text/css">
@media only screen and (max-width:480px) {
@-ms-viewport {
width: 320px;
}
@viewport {
width: 320px;
}
}
</style>
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i);
</style>
<style type="text/css">
@media only screen and (min-width:480px) {
.mj-column-per-100 {
width: 100% !important;
max-width: 100%;
}
.mj-column-px-25 {
width: 25px !important;
max-width: 25px;
}
}
</style>
<style type="text/css">
</style>
<style type="text/css">
.shadow {
box-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.1);
}
.label {
font-weight: 700;
}
.warning {
font-weight: 700;
font-size: 16px;
}
a {
color: #25B9D7;
text-decoration: underline;
font-weight: 600;
}
a.light {
font-weight: 400;
}
span.strong {
font-weight: 600;
}
@media only screen and (max-width: 480px) {
body,
.no-bg {
background-color: #fff !important;
}
.left p {
text-align: left;
display: inline-block
}
}
</style>
</head>
<body style="margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; background-color: #eeeeee;" bgcolor="#eeeeee">
<div style="background-color: #eeeeee;" bgcolor="#eeeeee"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td height="40" style="vertical-align:top;height:40px;">
<![endif]-->
<div style="height: 40px;" height="40">&nbsp;</div>
<!-- [if mso | IE]>
</td></tr></table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="shadow-outlook wrapper-container-outlook" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div class="shadow wrapper-container" style="box-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.1); background: #ffffff; background-color: #ffffff; margin: 0px auto; border-radius: 4px; max-width: 604px;" bgcolor="#ffffff">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background: #ffffff; background-color: #ffffff; width: 100%; border-radius: 4px;" bgcolor="#ffffff" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 0 0 30px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<![endif]--> <!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<![endif]--> <!-- LOGO BEGINING --> <!-- [if mso | IE]>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 45px 25px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:554px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top;" width="100%">
<tbody>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; word-break: break-word;"><img src="https://eosc.arbatec.de/img/cms/stadtecken_logo_pik.png" alt="" width="54" height="51" /></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- LOGO ENDING --> <!-- [if mso | IE]>
</table>
<![endif]--> <!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 0 25px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:554px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"><!-- TITLE BEGINING -->
<tbody>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0; padding-bottom: 20px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 20px; font-weight: 600; line-height: 25px; text-align: left; color: #363a41;" align="left">Hallo {firstname} {lastname},</div>
</td>
</tr>
<!-- TITLE ENDING --><!-- BORDER BEGINING --></tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 0 50px 40px; text-align: left; vertical-align: top;" align="left"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:25px;"
>
<![endif]-->
<div class="mj-column-px-25 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top;" width="100%">
<tbody>
<tr>
<td class="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0; padding-right: 0; padding-left: 0; word-break: break-word;">
<p style="display: block; border-top: solid 3px #505050; font-size: 1; margin: 0px auto; width: 25px;" width="25"></p>
<!-- [if mso | IE]>
<table
align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 3px #505050;font-size:1;margin:0px auto;width:25px;" role="presentation" width="25px"
>
<tr>
<td style="height:0;line-height:0;">
&nbsp;
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- BORDER ENDING --> <!-- SUBTITLE BEGINING --> <!-- [if mso | IE]>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 0 25px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:554px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tbody>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0px; padding-bottom: 0px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 16px; font-weight: 600; line-height: 25px; text-align: left; color: #363a41;" align="left">Order ID {order_name} - Document</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- SUBTITLE ENDING --> <!-- BOX BEGINING --> <!-- [if mso | IE]>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 15px 50px 40px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:504px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #fefefe; border: 1px solid #DFDFDF; vertical-align: top; padding-top: 10px; padding-bottom: 10px;" bgcolor="#fefefe">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tbody>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 14px; line-height: 25px; text-align: left; color: #363a41;" align="left">{info}.</div>
</td>
</tr>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 14px; line-height: 25px; text-align: left; color: #363a41;" align="left"></div>
</td>
</tr>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0px; word-break: break-word;">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- BOX ENDING --> <!-- [if mso | IE]>
</table>
<![endif]--> <!-- [if mso | IE]>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--> <!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<![endif]--> <!-- SHOP NAME BEGINING --> <!-- [if mso | IE]>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 20px 0; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:604px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top;" width="100%">
<tbody>
<tr>
<td align="center" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 14px; line-height: 25px; text-align: center; color: #363a41;" align="center"><a href="{shop_url}" style="text-decoration: underline; color: #656565; font-size: 16px; font-weight: 600;">{shop_name}</a></div>
</td>
</tr>
<tr>
<td align="center" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 12px; line-height: 25px; text-align: center; color: #656565;" align="center"></div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- SHOP NAME ENDING --> <!-- [if mso | IE]>
</table>
<![endif]--></div>
</body>
</html>

View File

@@ -0,0 +1,12 @@
{shop_url}
Hello {firstname} {lastname},
Order ID {order_name} - Document type
{info}.
[{shop_name}]({shop_url})

View File

@@ -0,0 +1,655 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title> Ticket </title>
<!--[if !mso]><!-- --><meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]--><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
#outlook a {
padding: 0;
}
.ReadMsgBody {
width: 100%;
}
.ExternalClass {
width: 100%;
}
.ExternalClass * {
line-height: 100%;
}
body {
margin: 0;
padding: 0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
table,
td {
border-collapse: collapse;
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
}
img {
border: 0;
height: auto;
line-height: 100%;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
p {
display: block;
margin: 13px 0;
}
</style>
<!--[if !mso]><!--><style type="text/css">
@media only screen and (max-width:480px) {
@-ms-viewport {
width: 320px;
}
@viewport {
width: 320px;
}
}
</style>
<!--<![endif]--><!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]--><!--[if lte mso 11]>
<style type="text/css">
.outlook-group-fix { width:100% !important; }
</style>
<![endif]--><style type="text/css">
</style>
<style type="text/css">
.shadow {
box-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.1);
}
.label {
font-weight: 700;
}
.warning {
font-weight: 700;
font-size: 16px;
}
a {
color: #25B9D7;
text-decoration: underline;
font-weight: 600;
}
a.light {
font-weight: 400;
}
span.strong {
font-weight: 600;
}
@media only screen and (max-width: 480px) {
body,
.no-bg {
background-color: #fff !important;
}
.left p {
text-align: left;
display: inline-block
}
}
</style>
<style type="text/css">
#outlook a {
padding: 0;
}
.ReadMsgBody {
width: 100%;
}
.ExternalClass {
width: 100%;
}
.ExternalClass * {
line-height: 100%;
}
body {
margin: 0;
padding: 0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
table,
td {
border-collapse: collapse;
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
}
img {
border: 0;
height: auto;
line-height: 100%;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
p {
display: block;
margin: 13px 0;
}
</style>
<style type="text/css">
@media only screen and (max-width:480px) {
@-ms-viewport {
width: 320px;
}
@viewport {
width: 320px;
}
}
</style>
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i);
</style>
<style type="text/css">
@media only screen and (min-width:480px) {
.mj-column-per-100 {
width: 100% !important;
max-width: 100%;
}
.mj-column-px-25 {
width: 25px !important;
max-width: 25px;
}
}
</style>
<style type="text/css">
</style>
<style type="text/css">
.shadow {
box-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.1);
}
.label {
font-weight: 700;
}
.warning {
font-weight: 700;
font-size: 16px;
}
a {
color: #25B9D7;
text-decoration: underline;
font-weight: 600;
}
a.light {
font-weight: 400;
}
span.strong {
font-weight: 600;
}
@media only screen and (max-width: 480px) {
body,
.no-bg {
background-color: #fff !important;
}
.left p {
text-align: left;
display: inline-block
}
}
</style>
</head>
<body style="margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; background-color: #eeeeee;" bgcolor="#eeeeee">
<div style="background-color: #eeeeee;" bgcolor="#eeeeee"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td height="40" style="vertical-align:top;height:40px;">
<![endif]-->
<div style="height: 40px;" height="40">&nbsp;</div>
<!-- [if mso | IE]>
</td></tr></table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="shadow-outlook wrapper-container-outlook" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div class="shadow wrapper-container" style="box-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.1); background: #ffffff; background-color: #ffffff; margin: 0px auto; border-radius: 4px; max-width: 604px;" bgcolor="#ffffff">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background: #ffffff; background-color: #ffffff; width: 100%; border-radius: 4px;" bgcolor="#ffffff" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 0 0 30px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<![endif]--> <!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<![endif]--> <!-- LOGO BEGINING --> <!-- [if mso | IE]>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 45px 25px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:554px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top;" width="100%">
<tbody>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; word-break: break-word;"><img src="https://eosc.arbatec.de/img/cms/stadtecken_logo_pik.png" alt="" width="54" height="51" /></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- LOGO ENDING --> <!-- [if mso | IE]>
</table>
<![endif]--> <!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 0 25px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:554px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"><!-- TITLE BEGINING -->
<tbody>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0; padding-bottom: 20px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 20px; font-weight: 600; line-height: 25px; text-align: left; color: #363a41;" align="left">Hallo {firstname} {lastname},</div>
</td>
</tr>
<!-- TITLE ENDING --><!-- BORDER BEGINING --></tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 0 50px 40px; text-align: left; vertical-align: top;" align="left"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:25px;"
>
<![endif]-->
<div class="mj-column-px-25 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top;" width="100%">
<tbody>
<tr>
<td class="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0; padding-right: 0; padding-left: 0; word-break: break-word;">
<p style="display: block; border-top: solid 3px #505050; font-size: 1; margin: 0px auto; width: 25px;" width="25"></p>
<!-- [if mso | IE]>
<table
align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 3px #505050;font-size:1;margin:0px auto;width:25px;" role="presentation" width="25px"
>
<tr>
<td style="height:0;line-height:0;">
&nbsp;
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- BORDER ENDING --> <!-- SUBTITLE BEGINING --> <!-- [if mso | IE]>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 0 25px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:554px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tbody>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0px; padding-bottom: 0px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 16px; font-weight: 600; line-height: 25px; text-align: left; color: #363a41;" align="left">Order ID {order_name} - Document</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- SUBTITLE ENDING --> <!-- BOX BEGINING --> <!-- [if mso | IE]>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 15px 50px 40px; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:504px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #fefefe; border: 1px solid #DFDFDF; vertical-align: top; padding-top: 10px; padding-bottom: 10px;" bgcolor="#fefefe">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tbody>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 14px; line-height: 25px; text-align: left; color: #363a41;" align="left">{info}.</div>
</td>
</tr>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 14px; line-height: 25px; text-align: left; color: #363a41;" align="left"></div>
</td>
</tr>
<tr>
<td align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0px; word-break: break-word;">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- BOX ENDING --> <!-- [if mso | IE]>
</table>
<![endif]--> <!-- [if mso | IE]>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--> <!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<![endif]--> <!-- SHOP NAME BEGINING --> <!-- [if mso | IE]>
<tr>
<td
class="" width="604px"
>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:604px;" width="604"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin: 0px auto; max-width: 604px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tbody>
<tr>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; direction: ltr; font-size: 0px; padding: 20px 0; text-align: center; vertical-align: top;" align="center"><!-- [if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:604px;"
>
<![endif]-->
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 100%;" align="left" width="100%">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; vertical-align: top;" width="100%">
<tbody>
<tr>
<td align="center" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 14px; line-height: 25px; text-align: center; color: #363a41;" align="center"><a href="{shop_url}" style="text-decoration: underline; color: #656565; font-size: 16px; font-weight: 600;">{shop_name}</a></div>
</td>
</tr>
<tr>
<td align="center" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0; word-break: break-word;">
<div style="font-family: Open sans, arial, sans-serif; font-size: 12px; line-height: 25px; text-align: center; color: #656565;" align="center"></div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
<![endif]--></td>
</tr>
</tbody>
</table>
</div>
<!-- [if mso | IE]>
</td>
</tr>
</table>
</td>
</tr>
<![endif]--> <!-- SHOP NAME ENDING --> <!-- [if mso | IE]>
</table>
<![endif]--></div>
</body>
</html>

View File

@@ -0,0 +1,12 @@
{shop_url}
Hello {firstname} {lastname},
Order ID {order_name} - Document type
{info}.
[{shop_name}]({shop_url})

View File

@@ -0,0 +1,407 @@
<?php
if (!defined('_PS_VERSION_'))
exit;
class paragonfaktura extends Module
{
public function __construct()
{
$this->name = 'paragonfaktura';
$this->tab = 'billing_invoicing';
$this->displayName = 'Paragon Faktura';
$this->version = '1.0.1';
$this->author = 'Cypis.net';
$this->need_instance = 1;
$this->bootstrap = true;
$this->ps_versions_compliancy = array('min' => '1.6.0', 'max' => '1.7');
$this->currencies = true;
$this->currencies_mode = 'checkbox';
$this->is_eu_compatible = 1;
parent::__construct();
$this->displayName = $this->l('Paragon Faktura 1.7');
$this->description = $this->l('Select sale document on checkout');
$this->confirm_uninstall = $this->l('Are you sure you want to uninstall? You will lose all your settings!');
}
/**
*
*
* @return
*/
public function install()
{
$db = Db::getInstance()->Execute('CREATE TABLE `'._DB_PREFIX_.'invoice_bill` ( `id_cart` INT(10) NOT NULL, `document_type` INT(1) NOT NULL, PRIMARY KEY (`id_cart`, `document_type`))');
Configuration::updateValue('IVBILL_DEFAULT', 2);
Configuration::updateValue('IVBILL_PLACE', 'hookdisplayPaymentTop');
return parent::install()
&& $this->registerHook('displayPaymentTop')
&& $this->registerHook('displayHeader')
&& $this->registerHook('customParagon')
&& $this->registerHook('actionValidateOrder')
&& $this->registerHook('displayAdminOrderSideBottom')
&& $this->registerHook('displayAdminOrderMainBottom')
&& $this->registerHook('displayAdminOrderTabContent')
&& $this->registerHook('displayAdminOrderContentOrder');
}
/**
*
*
* @return
*/
public function uninstall()
{
$db = Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'invoice_bill`;');
return parent::uninstall() && $db ;
}
/**
*
* @param undefined $params
*
* @return
*/
public function hookdisplayAdminOrderContentOrder($params){
$out='';
$order = new Order($params['order']->id);
$cart_id = Order::getCartIdStatic($params['order']->id);
$choice = Db::getInstance()->getRow('SELECT document_type FROM `'._DB_PREFIX_.'invoice_bill` WHERE id_cart = '.$cart_id);
if($choice)
{
$out = "<h3 style='margin-bottom:10px; border-bottom:1px solid #ccc;'>".$this->l('Sale document').": <span class='label label-info'><strong>".($choice['document_type']==1?$this->l('Invoice'):$this->l('Bill'))."</strong></span></h3>";
}
return $out;
}
public function hookdisplayAdminOrderSideBottom($params){
return "";
}
public function hookdisplayAdminOrderMainBottom($params){
return "";
}
public function hookdisplayAdminOrderTabContent($params){
$out='';
$order = new Order($params['id_order']);
$cart_id = Order::getCartIdStatic($params['id_order']);
$choice = Db::getInstance()->getRow('SELECT document_type FROM `'._DB_PREFIX_.'invoice_bill` WHERE id_cart = '.$cart_id);
if($choice)
{
$out = "<h3 style='margin-bottom:10px; border-bottom:1px solid #ccc;'>".$this->l('Sale document').": <span class='badge rounded badge-info'><strong>".($choice['document_type']==1?$this->l('Invoice'):$this->l('Bill'))."</strong></span></h3>";
}
return $out.$this->l('Order id').': '.$params['id_order'].' / '.$this->l('Cart id').': '.$cart_id;;
}
/**
*
*
* @return
*/
public function hookDisplayHeader(){
$this->context->controller->registerJavascript(
'paragonfaktura',
'modules/'.$this->name.'/save.js',
array('position' => 'bottom', 'priority' => 150)
);
}
public function hookCustomParagon($params){
$pl=Configuration::get('IVBILL_PLACE');
if($pl==='hookCustomParagon' )
{
$context = Context::getContext();
$invoice_bill = Configuration::get('IVBILL_DEFAULT');
$choice = Db::getInstance()->ExecuteS('SELECT document_type FROM `'._DB_PREFIX_.'invoice_bill` WHERE id_cart = '.$this->context->cookie->id_cart);
if($choice)
{
if(!empty($choice['document_type']))
$invoice_bill = $choice['document_type'];
else{
Db::getInstance()->update('invoice_bill', array(
'document_type' => $invoice_bill
), 'id_cart = '.(int)$this->context->cookie->id_cart);
}
}else{
Db::getInstance()->insert('invoice_bill', array(
'id_cart' => (int)$this->context->cookie->id_cart,
'document_type' => $invoice_bill,
));
}
$this->context->smarty->assign(
array(
'type' => $invoice_bill,
'id_cart' => $this->context->cookie->id_cart
)
);
return $this->display(__FILE__, 'cart.tpl');
}
}
/**
*
* @param undefined $params
*
* @return
*/
public function hookdisplayPaymentTop($params)
{
$pl=Configuration::get('IVBILL_PLACE');
if($pl=='hookdisplayPaymentTop')
{
$context = Context::getContext();
$invoice_bill = Configuration::get('IVBILL_DEFAULT');
$choice = Db::getInstance()->ExecuteS('SELECT document_type FROM `'._DB_PREFIX_.'invoice_bill` WHERE id_cart = '.$this->context->cookie->id_cart);
if($choice)
{
if(!empty($choice['document_type']))
$invoice_bill = $choice['document_type'];
else{
Db::getInstance()->update('invoice_bill', array(
'document_type' => $invoice_bill
), 'id_cart = '.(int)$this->context->cookie->id_cart);
}
}else{
Db::getInstance()->insert('invoice_bill', array(
'id_cart' => (int)$this->context->cookie->id_cart,
'document_type' => $invoice_bill,
));
}
$this->context->smarty->assign(
array(
'type' => $invoice_bill,
'id_cart' => $this->context->cookie->id_cart
)
);
return $this->display(__FILE__, 'cart.tpl');
}
}
/**
*
*
* @return
*/
public function getContent()
{
$output = null;
if (Tools::isSubmit('submit'.$this->name))
{
Configuration::updateValue('IVBILL_DEFAULT', $_POST['IVBILL_DEFAULT']);
Configuration::updateValue('IVBILL_PLACE', $_POST['IVBILL_PLACE']);
Configuration::updateValue('IVBILL_EMAIL', $_POST['IVBILL_EMAIL']);
$output .= $this->displayConfirmation($this->l('Settings updated'));
}
return $output.$this->displayForm()."<div class='panel'>".$this->l('For custom hook display use code').": <code>{hook h='CustomParagon'}</code> </div>";
}
/**
*
*
* @return
*/
public function displayForm()
{
// Get default language
$default_lang = (int)Configuration::get('PS_LANG_DEFAULT');
$options_place = array(
array(
'id_option' => 'hookdisplayPaymentTop',
'name' => $this->l('Payment section')
),
array(
'id_option' => 'hookCustomParagon',
'name' => $this->l('Custom section')
),
);
$options = array(
array(
'id_option' => 1,
'name' => $this->l('Invoice')
),
array(
'id_option' => 2,
'name' => $this->l('Bill')
),
);
// Init Fields form array
$fields_form[0]['form'] = array(
'legend' => array(
'title' => $this->l('Settings'),
),
'input' => array(
array(
'type' => 'select',
'label' => $this->l('Default sale document'),
'desc' => $this->l('Select default selected sale document'),
'name' => 'IVBILL_DEFAULT',
'required' => true,
'options' => array(
'query' => $options,
'id' => 'id_option',
'name' => 'name'
)
),
array(
'type' => 'select',
'label' => $this->l('Default sale isplay place'),
'desc' => $this->l('Select default display place'),
'name' => 'IVBILL_PLACE',
'required' => true,
'options' => array(
'query' => $options_place,
'id' => 'id_option',
'name' => 'name'
)
),
array(
'type' => 'switch',
'label' => $this->l('Send document info mail'),
'name' => 'IVBILL_EMAIL',
'is_bool' => true,
'desc' => $this->l('Send email with information about selected document type'),
'values' => array(
array(
'id' => 'active_on',
'value' => 1,
'label' => $this->l('Yes')
),
array(
'id' => 'active_off',
'value' => 0,
'label' => $this->l('No')
)
),
)
),
'submit' => array(
'title' => $this->l('Save'),
'class' => 'btn btn-default pull-right'
)
);
$helper = new HelperForm();
// Module, token and currentIndex
$helper->module = $this;
$helper->name_controller = $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
// Language
$helper->default_form_language = $default_lang;
$helper->allow_employee_form_lang = $default_lang;
// Title and toolbar
$helper->title = $this->displayName;
$helper->show_toolbar = true; // false -> remove toolbar
$helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen.
$helper->submit_action = 'submit'.$this->name;
$helper->toolbar_btn = array(
'save' =>
array(
'desc' => $this->l('Save'),
'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name.
'&token='.Tools::getAdminTokenLite('AdminModules'),
),
'back' => array(
'href' => AdminController::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminModules'),
'desc' => $this->l('Back to list')
)
);
// Load current value
$helper->fields_value['IVBILL_DEFAULT'] = Configuration::get('IVBILL_DEFAULT');
$helper->fields_value['IVBILL_PLACE'] = Configuration::get('IVBILL_PLACE');
$helper->fields_value['IVBILL_EMAIL'] = Configuration::get('IVBILL_EMAIL');
return $helper->generateForm($fields_form);
}
public function hookActionValidateOrder($params)
{
$cart = $params['cart']; // The cart object
$order_status = $params['orderStatus']; // The order status
$order = $params['order']; // And the order object
$choice = Db::getInstance()->getRow('SELECT document_type FROM `'._DB_PREFIX_.'invoice_bill` WHERE id_cart = '.$cart->id);
if($choice)
{
$out = "<h3 style='margin-bottom:10px; border-bottom:1px solid #ccc;'>".$this->l('Sale document').": <span class='label label-info'><strong>".($choice['document_type']==1?$this->l('Invoice'):$this->l('Bill'))."</strong></span></h3>";
}
if(Configuration::get('IVBILL_EMAIL')!=1)
return;
$to_email = $customer->email;
$iso = Language::getIsoById((int) Configuration::get('PS_LANG_DEFAULT'));
$dir_mail = false;
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/document.txt') &&
file_exists(dirname(__FILE__).'/mails/'.$iso.'/document.html')) {
$dir_mail = dirname(__FILE__).'/mails/';
}
if (file_exists(_PS_MAIL_DIR_.$iso.'/document.txt') &&
file_exists(_PS_MAIL_DIR_.$iso.'/document.html')) {
$dir_mail = _PS_MAIL_DIR_;
}
$context = Context::getContext();
$id_lang = (int) $context->language->id;
$id_shop = (int) $context->shop->id;
$template_vars = array(
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{shop_name}' => Configuration::get('PS_SHOP_NAME'),
'{order_name}' => $order->reference,
'{info}' => $out
);
//die( Configuration::get('PS_SHOP_EMAIL') );
if ($dir_mail) {
if (Validate::isEmail(Configuration::get('PS_SHOP_EMAIL')))
$out = Mail::Send(
$id_lang,
'document',
$this->l('Document picked for order')."#".$order->id." ".$order->reference,
$template_vars,
Configuration::get('PS_SHOP_EMAIL'),
null,
Configuration::get('PS_SHOP_EMAIL'),
Configuration::get('PS_SHOP_NAME'),
null,
null,
$dir_mail,
null,
$id_shop
);
}
return ;
}
}
?>

View File

@@ -0,0 +1,10 @@
$(document).ready(function(){
$('#invoice_bill input').click(function(){
var value = $('#invoice_bill input:checked').val();
var id_cart = $('#invoice_bill #invoice_bill_id').val();
$.post("/modules/paragonfaktura/ajax.php", { value: value, id_cart: id_cart }, function(data){
});
})
});

View File

@@ -0,0 +1,19 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{paragonfaktura}prestashop>cart_7f708b62db8f512bc1d1db2418249a5d'] = 'Wybierz typ dokumentu';
$_MODULE['<{paragonfaktura}prestashop>cart_466eadd40b3c10580e3ab4e8061161ce'] = 'Faktura';
$_MODULE['<{paragonfaktura}prestashop>cart_d92c25d41fcd9f8ab35545ef34b1e7ed'] = 'Paragon';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_9cb8f8dc776e1c2dc8740df54f09c724'] = 'Paragon Faktura 1.7';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_5595821bb6355d52fd898d493f24dea1'] = 'Wybierz typ dokumentu w trakcie zakupów';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_533937acf0e84c92e787614bbb16a7a0'] = 'Czy jesteś pewien że chcesz odinstalować?';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_a3e1e3ac9a5596105aca41ff7079edea'] = 'Dokument sprzedaży ';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_466eadd40b3c10580e3ab4e8061161ce'] = 'Faktura';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_d92c25d41fcd9f8ab35545ef34b1e7ed'] = 'Paragon';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_c888438d14855d7d96a2724ee9c306bd'] = 'Zapisano ustawienia';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_f4f70727dc34561dfde1a3c529b6205c'] = 'Ustawienia';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_7afa1e884f4676671558d774b19af796'] = 'Domyślny typ dokumentu';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_2f82b091959a6af0d09d5f9092f45121'] = 'Wybierz domyślny typ dokumentu';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_c9cc8cce247e49bae79f15173ce97354'] = 'Zapisz';
$_MODULE['<{paragonfaktura}prestashop>paragonfaktura_630f6dc397fe74e52d5189e2c80f282b'] = 'Wróć';