Skip to content

Commit

Permalink
Revert "Feature/ps fixes market validator (#35)"
Browse files Browse the repository at this point in the history
This reverts commit b096545.
  • Loading branch information
eduardoconekta authored Aug 17, 2017
1 parent b096545 commit bb02068
Show file tree
Hide file tree
Showing 19 changed files with 1,183 additions and 1,080 deletions.
164 changes: 76 additions & 88 deletions conekta_prestashop.php

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions controllers/front/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,22 @@ public function postProcess()
$customer = new Customer($cart->id_customer);
$conekta = new Conekta_Prestashop();

foreach (Module::getPaymentModules() as $module) {
if ($module['name'] == 'conekta_prestashop') {
foreach (Module::getPaymentModules() as $module)
{
if ($module['name'] == 'conekta_prestashop')
{
$authorized = true;
break;
}
}
if (!$authorized) {
if (!$authorized)
{
die($this->module->getTranslator()
->trans('This payment method is not available.', array(), 'Modules.Conekta_Prestashop.Shop'));
}

if (!Validate::isLoadedObject($customer)) {
if (!Validate::isLoadedObject($customer))
{
Tools::redirect('index.php?controller=order&step=1');
}

Expand All @@ -48,4 +52,4 @@ public function postProcess()

$this->setTemplate('module:conekta_prestashop/views/templates/front/payment_return.tpl');
}
}
}
143 changes: 143 additions & 0 deletions mails/en/conektabanorte.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message from {shop_name}</title>


<style> @media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:308px!important;margin:auto!important;}
.table {width:285px!important;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 293px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}

}
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
.table {width:450px!important;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}
@media only screen and (max-device-width: 480px) {
body {width:308px!important;margin:auto!important;}
.table {width:285px;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}

.table-recap{width: 285px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
}
</style>

</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
<tr>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
<td align="center" style="padding:7px 0">
<table class="table" bgcolor="#ffffff" style="width:100%">
<tr>
<td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
<a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
<img src="{shop_logo}" alt="{shop_name}" />
</a>
</td>
</tr>

<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Hello {firstname} {lastname},</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Thank you for shopping with {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Order {order_name}&nbsp;-&nbsp;Awaiting Payment Notification</p>
<span style="color:#777">
Your order has been placed successfully and will be <strong>shipped as soon as notification of your payment is received </strong>. </span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
You have selected to pay via BANORTE payment method. </p>
<span style="color:#777">
Here are the details needed complete the payment:<br />
<span style="color:#333"><strong>Amount:</strong></span> {total_paid}<br />
<span style="color:#333"> </span>
<br />
<span style="color:#333"><strong>Reference Number: {reference}</strong></span>
<span style="color:#333"><strong>Service Name: {service_name}</strong></span>
<span style="color:#333"><strong>Service Number: {service_number}</strong></span>
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>



<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>

</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
</tr>
</table>
</body>
</html>
169 changes: 88 additions & 81 deletions mails/en/conektaefectivo.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,54 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Message from {shop_name}</title>
<style>
@media only screen and (max-width: 300px){


<style> @media only screen and (max-width: 300px){
body {
width:218px !important;
margin:auto !important;
}
.table {width:195px !important;margin:auto !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}
span.title{font-size:20px !important;line-height: 23px !important}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}
td.box p{font-size: 12px !important;font-weight: bold !important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 200px!important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
.space_address{display: none !important;}
}
@media only screen and (min-width: 301px) and (max-width: 500px) {
@media only screen and (min-width: 301px) and (max-width: 500px) {
body {width:308px!important;margin:auto!important;}
.table {width:285px!important;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
.table {width:285px!important;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr {
display: block !important;
}
.table-recap{width: 293px !important;}
.table-recap tr td, .conf_body td{text-align:center !important;}

}
@media only screen and (min-width: 501px) and (max-width: 768px) {
@media only screen and (min-width: 501px) and (max-width: 768px) {
body {width:478px!important;margin:auto!important;}
.table {width:450px!important;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
.table {width:450px!important;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
}
@media only screen and (max-device-width: 480px) {
@media only screen and (max-device-width: 480px) {
body {width:308px!important;margin:auto!important;}
.table {width:285px;margin:auto!important;}
.table {width:285px;margin:auto!important;}
.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}

.table-recap{width: 285px!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.table-recap tr td, .conf_body td{text-align:center!important;}
.address{display: block !important;margin-bottom: 10px !important;}
.space_address{display: none !important;}
.space_address{display: none !important;}
}
</style>
</style>

</head>
<body style="-webkit-text-size-adjust:none;background-color:#fff;width:650px;font-family:Open-sans, sans-serif;color:#555454;font-size:13px;line-height:18px;margin:auto">
<table class="table table-mail" style="width:100%;margin-top:10px;-moz-box-shadow:0 0 5px #afafaf;-webkit-box-shadow:0 0 5px #afafaf;-o-box-shadow:0 0 5px #afafaf;box-shadow:0 0 5px #afafaf;filter:progid:DXImageTransform.Microsoft.Shadow(color=#afafaf,Direction=134,Strength=5)">
Expand All @@ -64,67 +66,72 @@
</a>
</td>
</tr>
<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Hello {firstname} {lastname},</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Thank you for shopping with {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Order {order_name}&nbsp;-&nbsp;Awaiting Cash Payment Notification</p>
<span style="color:#777">
Your order has been placed successfully and will be <strong>shipped as soon as notification of your payment is received </strong>. </span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
You have selected to pay with a cash payment method. </p>
<span style="color:#777">
Here are the details needed complete the payment:<br />
<span style="color:#333"><strong>Amount:</strong></span> {total_paid}<br />
<span style="color:#333"><strong>Barcode:</strong></span>
<br><img src="{barcode_url}"><br />
<span style="color:#333"><strong>Reference: {barcode}</strong></span>
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>

<tr>
<td align="center" class="titleblock" style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight:500;font-size:28px;text-transform:uppercase;line-height:33px">Hello {firstname} {lastname},</span><br/>
<span class="subtitle" style="font-weight:500;font-size:16px;text-transform:uppercase;line-height:25px">Thank you for shopping with {shop_name}!</span>
</font>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p data-html-only="1" style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
Order {order_name}&nbsp;-&nbsp;Awaiting Cash Payment Notification</p>
<span style="color:#777">
Your order has been placed successfully and will be <strong>shipped as soon as notification of your payment is received </strong>. </span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>
<tr>
<td class="box" style="border:1px solid #D6D4D4;background-color:#f8f8f8;padding:7px 0">
<table class="table" style="width:100%">
<tr>
<td width="10" style="padding:7px 0">&nbsp;</td>
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<p style="border-bottom:1px solid #D6D4D4;margin:3px 0 7px;text-transform:uppercase;font-weight:500;font-size:18px;padding-bottom:10px">
You have selected to pay with a cash payment method. </p>
<span style="color:#777">
Here are the details needed complete the payment:<br />
<span style="color:#333"><strong>Amount:</strong></span> {total_paid}<br />
<span style="color:#333"><strong>Barcode:</strong></span>
<br><img src="{barcode_url}"><br />
<span style="color:#333"><strong>Reference: {barcode}</strong></span>
</span>
</font>
</td>
<td width="10" style="padding:7px 0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>



<tr>
<td class="space_footer" style="padding:0!important">&nbsp;</td>
</tr>

</table>
</td>
<td class="space" style="width:20px;padding:7px 0">&nbsp;</td>
Expand Down
Loading

0 comments on commit bb02068

Please sign in to comment.