Jump to content
sors

[MODULE][FREE] Universal Payment Module

Recommended Posts

This doesn't work for me. I am on version 1.6.08 and in  \admin\themes\default\template\controllers\orders\form.tpl I haven't goy this bit of code:

 

 

                    <div class="col-lg-4">
                        <select name="payment_module_name" id="payment_module_name">
                            {if !$PS_CATALOG_MODE}
                            {foreach from=$payment_modules item='module'}
                                
<option value="{$module->name}" {if isset($smarty.post.payment_module_name) && $module->name == $smarty.post.payment_module_name}selected="selected"{/if}>{$module->displayName}</option>
                            {/foreach}
                            {else}
                                
<option value="{l s='Back-office order'}">{l s='Back-office order'}</option>
                            {/if}
                        
</select>
                    </div>

 

This is my entire \admin\themes\default\template\controllers\orders\form.tpl :
 

 

{*

* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2014 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<script type="text/javascript">
var id_cart = {$cart->id|intval};
var id_customer = 0;
var changed_shipping_price = false;
var shipping_price_selected_carrier = '';
var current_index = '{$current}&token={$token}';
var admin_cart_link = '{$link->getAdminLink('AdminCarts')|addslashes}';
var cart_quantity = new Array();
var currencies = new Array();
var id_currency = '';
var id_lang = '';
//var txt_show_carts = '{l s='Show carts and orders for this customer.' js=1}';
//var txt_hide_carts = '{l s='Hide carts and orders for this customer.' js=1}';
var defaults_order_state = new Array();
var customization_errors = false;
var pic_dir = '{$pic_dir}';
var currency_format = 5;
var currency_sign = '';
var currency_blank = false;
var priceDisplayPrecision = {$smarty.const._PS_PRICE_DISPLAY_PRECISION_|intval};
 
{foreach from=$defaults_order_state key='module' item='id_order_state'}
defaults_order_state['{$module}'] = '{$id_order_state}';
{/foreach}
$(document).ready(function() {
 
$('#customer').typeWatch({
captureLength: 1,
highlight: true,
wait: 100,
callback: function(){ searchCustomers(); }
});
$('#product').typeWatch({
captureLength: 1,
highlight: true,
wait: 750,
callback: function(){ searchProducts(); }
});
$('#payment_module_name').change(function() {
var id_order_state = defaults_order_state[this.value];
if (typeof(id_order_state) == 'undefined')
id_order_state = defaults_order_state['other'];
$('#id_order_state').val(id_order_state);
});
$("#id_address_delivery").change(function() {
updateAddresses();
});
$("#id_address_invoice").change(function() {
updateAddresses();
});
$('#id_currency').change(function() {
updateCurrency();
});
$('#id_lang').change(function(){
updateLang();
});
$('#delivery_option,#carrier_recycled_package,#order_gift,#gift_message').change(function() {
updateDeliveryOption();
});
$('#shipping_price').change(function() {
if ($(this).val() != shipping_price_selected_carrier)
changed_shipping_price = true;
});
 
$('#payment_module_name').change();
$.ajaxSetup({ type:"post" });
$("#voucher").autocomplete('{$link->getAdminLink('AdminCartRules')|addslashes}', {
minChars: 3,
max: 15,
width: 250,
selectFirst: false,
scroll: false,
dataType: "json",
formatItem: function(data, i, max, value, term) {
return value;
},
parse: function(data) {
if (!data.found)
$('#vouchers_err').html('{l s='No voucher was found'}').show();
else
$('#vouchers_err').hide();
var mytab = new Array();
for (var i = 0; i < data.vouchers.length; i++)
mytab[mytab.length] = { data: data.vouchers, value: data.vouchers.name + (data.vouchers.code.length > 0 ? ' - ' + data.vouchers.code : '')};
return mytab;
},
extraParams: {
ajax: "1",
token: "{getAdminToken tab='AdminCartRules'}",
tab: "AdminCartRules",
action: "searchCartRuleVouchers"
}
}
)
.result(function(event, data, formatted) {
$('#voucher').val(data.name);
add_cart_rule(data.id_cart_rule);
});
{if $cart->id}
setupCustomer({$cart->id_customer|intval});
useCart('{$cart->id|intval}');
{/if}
 
$('.delete_product').live('click', function(e) {
e.preventDefault();
var to_delete = $(this).attr('rel').split('_');
deleteProduct(to_delete[1], to_delete[2], to_delete[3]);
});
$('.delete_discount').live('click', function(e) {
e.preventDefault();
deleteVoucher($(this).attr('rel'));
});
$('.use_cart').live('click', function(e) {
e.preventDefault();
useCart($(this).attr('rel'));
return false;
});
 
$('input:radio[name=free_shipping]').on('change',function() {
var free_shipping = $('input[name=free_shipping]:checked').val();
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "updateFreeShipping",
id_cart: id_cart,
id_customer: id_customer,
'free_shipping': free_shipping
},
success : function(res)
{
displaySummary(res);
}
});
});
 
$('.duplicate_order').live('click', function(e) {
e.preventDefault();
duplicateOrder($(this).attr('rel'));
});
$('.cart_quantity').live('change', function(e) {
e.preventDefault();
if ($(this).val() != cart_quantity[$(this).attr('rel')])
{
var product = $(this).attr('rel').split('_');
updateQty(product[0], product[1], product[2], $(this).val() - cart_quantity[$(this).attr('rel')]);
}
});
$('.increaseqty_product, .decreaseqty_product').live('click', function(e) {
e.preventDefault();
var product = $(this).attr('rel').split('_');
var sign = '';
if ($(this).hasClass('decreaseqty_product'))
sign = '-';
updateQty(product[0], product[1],product[2], sign+1);
});
$('#id_product').live('keydown', function(e) {
$(this).click();
return true;
});
$('#id_product, .id_product_attribute').live('change', function(e) {
e.preventDefault();
displayQtyInStock(this.id);
});
$('#id_product, .id_product_attribute').live('keydown', function(e) {
$(this).change();
return true;
});
$('.product_unit_price').live('change', function(e) {
e.preventDefault();
var product = $(this).attr('rel').split('_');
updateProductPrice(product[0], product[1], $(this).val());
});
$('#order_message').live('change', function(e) {
e.preventDefault();
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "updateOrderMessage",
id_cart: id_cart,
id_customer: id_customer,
message: $(this).val()
},
success : function(res)
{
displaySummary(res);
}
});
});
resetBind();
 
$('#customer').focus();
 
$('#submitAddProduct').on('click',function(){
addProduct();
});
 
$('#send_email_to_customer').on('click',function(){
sendMailToCustomer();
return false;
});
 
$('#products_found').hide();
$('#carts').hide();
 
$('#customer_part').on('click','button.setup-customer',function(e){
e.preventDefault();
setupCustomer($(this).data('customer'));
$(this).removeClass('setup-customer').addClass('change-customer').html('<i class="icon-refresh"></i> {l s="Change"}').blur();
$(this).closest('.customerCard').addClass('selected-customer');
$('.selected-customer .panel-heading').prepend('<i class="icon-ok text-success"></i>');
$('.customerCard').not('.selected-customer').remove();
$('#search-customer-form-group').hide();
});
 
$('#customer_part').on('click','button.change-customer',function(e){
e.preventDefault();
$('#search-customer-form-group').show();
$(this).blur();
});
});
 
function resetBind()
{
$('.fancybox').fancybox({
'type': 'iframe',
'width': '90%',
'height': '90%',
});
 
$('.fancybox_customer').fancybox({
'type': 'iframe',
'width': '90%',
'height': '90%',
'afterClose' : function () {
searchCustomers();
}
});
/*$("#new_address").fancybox({
onClosed: useCart(id_cart)
});*/
}
 
function add_cart_rule(id_cart_rule)
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "addVoucher",
id_cart_rule: id_cart_rule,
id_cart: id_cart,
id_customer: id_customer
},
success : function(res)
{
displaySummary(res);
$('#voucher').val('');
var errors = '';
if (res.errors.length > 0)
{
$.each(res.errors, function() {
errors += this+'<br/>';
});
$('#vouchers_err').html(errors).show();
}
else
$('#vouchers_err').hide();
}
});
}
 
function updateProductPrice(id_product, id_product_attribute, new_price)
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "updateProductPrice",
id_cart: id_cart,
id_product: id_product,
id_product_attribute: id_product_attribute,
id_customer: id_customer,
price: new Number(new_price.replace(",",".")).toFixed(4).toString()
},
success : function(res)
{
displaySummary(res);
}
});
}
 
function displayQtyInStock(id)
{
var id_product = $('#id_product').val();
if ($('#ipa_' + id_product + ' option').length)
var id_product_attribute = $('#ipa_' + id_product).val();
else
var id_product_attribute = 0;
 
$('#qty_in_stock').html(stock[id_product][id_product_attribute]);
}
 
function duplicateOrder(id_order)
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "duplicateOrder",
id_order: id_order,
id_customer: id_customer
},
success : function(res)
{
id_cart = res.cart.id;
$('#id_cart').val(id_cart);
displaySummary(res);
}
});
}
 
function useCart(id_new_cart)
{
id_cart = id_new_cart;
$('#id_cart').val(id_cart);
$('#id_cart').val(id_cart);
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: false,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "getSummary",
id_cart: id_cart,
id_customer: id_customer
},
success : function(res)
{
displaySummary(res);
}
});
}
 
function getSummary()
{
useCart(id_cart);
}
 
function deleteVoucher(id_cart_rule)
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "deleteVoucher",
id_cart_rule: id_cart_rule,
id_cart: id_cart,
id_customer: id_customer
},
success : function(res)
{
displaySummary(res);
}
});
}
 
function deleteProduct(id_product, id_product_attribute, id_customization)
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "deleteProduct",
id_product: id_product,
id_product_attribute: id_product_attribute,
id_customization: id_customization,
id_cart: id_cart,
id_customer: id_customer
},
success : function(res)
{
displaySummary(res);
}
});
}
 
function searchCustomers()
{
$.ajax({
type:"POST",
url : "{$link->getAdminLink('AdminCustomers')}",
async: true,
dataType: "json",
data : {
ajax: "1",
tab: "AdminCustomers",
action: "searchCustomers",
customer_search: $('#customer').val()},
success : function(res)
{
if(res.found)
{
var html = '';
$.each(res.customers, function() {
html += '<div class="customerCard col-lg-4">';
html += '<div class="panel">';
html += '<div class="panel-heading">'+this.firstname+' '+this.lastname;
html += '<span class="pull-right">#'+this.id_customer+'</span></div>';
html += '<span>'+this.email+'</span><br/>';
html += '<span class="text-muted">'+((this.birthday != '0000-00-00') ? this.birthday : '')+'</span><br/>';
html += '<div class="panel-footer">';
html += '<a href="{$link->getAdminLink('AdminCustomers')}&id_customer='+this.id_customer+'&viewcustomer&liteDisplaying=1" class="btn btn-default fancybox"><i class="icon-search"></i> {l s='Details'}</a>';
html += '<button type="button" data-customer="'+this.id_customer+'" class="setup-customer btn btn-default pull-right"><i class="icon-arrow-right"></i> {l s='Choose'}</button>';
html += '</div>';
html += '</div>';
html += '</div>';
});
}
else
html = '<div class="alert alert-warning"><i class="icon-warning-sign"></i> {l s='No customers found'}</div>';
$('#customers').html(html);
resetBind();
}
});
}
 
 
function setupCustomer(idCustomer)
{
$('#carts').show();
$('#products_part').show();
$('#vouchers_part').show();
$('#address_part').show();
$('#carriers_part').show();
$('#summary_part').show();
var address_link = $('#new_address').attr('href');
id_customer = idCustomer;
id_cart = 0;
$('#new_address').attr('href', address_link.replace(/id_customer=[0-9]+/, 'id_customer='+id_customer));
$.ajax({
type:"POST",
url : "{$link->getAdminLink('AdminCarts')|addslashes}",
async: false,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "searchCarts",
id_customer: id_customer,
id_cart: id_cart
},
success : function(res)
{
if(res.found)
{
var html_carts = '';
var html_orders = '';
$.each(res.carts, function() {
html_carts += '<tr>';
html_carts += '<td>'+this.id_cart+'</td>';
html_carts += '<td>'+this.date_add+'</td>';
html_carts += '<td>'+this.total_price+'</td>';
html_carts += '<td class="text-right">';
html_carts += '<a title="{l s='View this cart'}" class="fancybox btn btn-default" href="index.php?tab=AdminCarts&id_cart='+this.id_cart+'&viewcart&token={getAdminToken tab='AdminCarts'}&liteDisplaying=1#"><i class="icon-search"></i> {l s="Details"}</a>';
html_carts += ' <a href="#" title="{l s='Use this cart'}" class="use_cart btn btn-default" rel="'+this.id_cart+'"><i class="icon-arrow-right"></i> {l s="Use"}</a>';
html_carts += '</td>';
html_carts += '</tr>';
});
 
$.each(res.orders, function() {
html_orders += '<tr>';
html_orders += '<td>'+this.id_order+'</td><td>'+this.date_add+'</td><td>'+(this.nb_products ? this.nb_products : '0')+'</td><td>'+this.total_paid_real+'</span></td><td>'+this.payment+'</td><td>'+this.order_state+'</td>';
html_orders += '<td class="text-right">';
html_orders += '<a href="{$link->getAdminLink('AdminOrders')}&id_order='+this.id_order+'&vieworder&liteDisplaying=1#" title="{l s='View this order'}" class="fancybox btn btn-default"><i class="icon-search"></i> {l s="Details"}</a>';
html_orders += ' <a href="#" "title="{l s='Duplicate this order'}" class="duplicate_order btn btn-default" rel="'+this.id_order+'"><i class="icon-arrow-right"></i> {l s="Use"}</a>';
html_orders += '</td>';
html_orders += '</tr>';
});
$('#nonOrderedCarts table tbody').html(html_carts);
$('#lastOrders table tbody').html(html_orders);
}
if (res.id_cart)
{
id_cart = res.id_cart;
$('#id_cart').val(id_cart);
}
displaySummary(res);
resetBind();
}
});
}
 
function updateDeliveryOptionList(delivery_option_list)
{
var html = '';
if (delivery_option_list.length > 0)
{
$.each(delivery_option_list, function() {
html += '<option value="'+this.key+'" '+(($('#delivery_option').val() == this.key) ? 'selected="selected"' : '')+'>'+this.name+'</option>';
});
$('#carrier_form').show();
$('#delivery_option').html(html);
$('#carriers_err').hide();
}
else
{
$('#carrier_form').hide();
$('#carriers_err').show().html('{l s='No carrier can be applied to this order'}');
}
}
 
function searchProducts()
{
$('#products_part').show();
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminOrders')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{$token}",
tab: "AdminOrders",
action: "searchProducts",
id_cart: id_cart,
id_customer: id_customer,
id_currency: id_currency,
product_search: $('#product').val()},
success : function(res)
{
var products_found = '';
var attributes_html = '';
var customization_html = '';
stock = {};
 
if(res.found)
{
if (!customization_errors)
$('#products_err').addClass('hide');
else
customization_errors = false;
$('#products_found').show();
products_found += '<label class="control-label col-lg-3">{l s='Product'}</label><div class="col-lg-6"><select id="id_product" onclick="display_product_attributes();display_product_customizations();"></div>';
attributes_html += '<label class="control-label col-lg-3">{l s='Combination'}</label><div class="col-lg-6">';
$.each(res.products, function() {
products_found += '<option '+(this.combinations.length > 0 ? 'rel="'+this.qty_in_stock+'"' : '')+' value="'+this.id_product+'">'+this.name+(this.combinations.length == 0 ? ' - '+this.formatted_price : '')+'</option>';
attributes_html += '<select class="id_product_attribute" id="ipa_'+this.id_product+'" style="display:none;">';
var id_product = this.id_product;
stock[id_product] = new Array();
if (this.customizable == '1')
{
customization_html += '<div class="bootstrap"><div class="panel"><div class="panel-heading">{l s='Customization'}</div><form id="customization_'+id_product+'" class="id_customization" method="post" enctype="multipart/form-data" action="'+admin_cart_link+'" style="display:none;">';
customization_html += '<input type="hidden" name="id_product" value="'+id_product+'" />';
customization_html += '<input type="hidden" name="id_cart" value="'+id_cart+'" />';
customization_html += '<input type="hidden" name="action" value="updateCustomizationFields" />';
customization_html += '<input type="hidden" name="id_customer" value="'+id_customer+'" />';
customization_html += '<input type="hidden" name="ajax" value="1" />';
$.each(this.customization_fields, function() {
class_customization_field = "";
if (this.required == 1){ class_customization_field = 'required' };
customization_html += '<div class="form-group"><label class="control-label col-lg-3 ' + class_customization_field + '" for="customization_'+id_product+'_'+this.id_customization_field+'">';
customization_html += this.name+'</label><div class="col-lg-9">';
if (this.type == 0)
customization_html += '<input class="form-control customization_field" type="file" name="customization_'+id_product+'_'+this.id_customization_field+'" id="customization_'+id_product+'_'+this.id_customization_field+'">';
else if (this.type == 1)
customization_html += '<input class="form-control customization_field" type="text" name="customization_'+id_product+'_'+this.id_customization_field+'" id="customization_'+id_product+'_'+this.id_customization_field+'">';
customization_html += '</div></div>';
});
customization_html += '</form></div></div>';
}
 
$.each(this.combinations, function() {
attributes_html += '<option rel="'+this.qty_in_stock+'" '+(this.default_on == 1 ? 'selected="selected"' : '')+' value="'+this.id_product_attribute+'">'+this.attributes+' - '+this.formatted_price+'</option>';
stock[id_product][this.id_product_attribute] = this.qty_in_stock;
});
 
stock[this.id_product][0] = this.stock[0];
attributes_html += '</select>';
});
products_found += '</select></div>';
$('#products_found #product_list').html(products_found);
$('#products_found #attributes_list').html(attributes_html);
$('link[rel=stylesheet]').each(function (i, element) {
sheet = $(element).clone();
$('#products_found #customization_list').contents().find('head').append(sheet);
});
$('#products_found #customization_list').contents().find('body').html(customization_html);
display_product_attributes();
display_product_customizations();
$('#id_product').change();
}
else
{
$('#products_found').hide();
$('#products_err').html('{l s='No products found'}');
$('#products_err').removeClass('hide');
}
resetBind();
}
});
}
 
function display_product_customizations()
{
if ($('#products_found #customization_list').contents().find('#customization_'+$('#id_product option:selected').val()).children().length === 0)
$('#customization_list').hide();
else
{
$('#customization_list').show();
$('#products_found #customization_list').contents().find('.id_customization').hide();
$('#products_found #customization_list').contents().find('#customization_'+$('#id_product option:selected').val()).show();
$('#products_found #customization_list').css('height',$('#products_found #customization_list').contents().find('#customization_'+$('#id_product option:selected').val()).height()+95+'px');
}
}
 
function display_product_attributes()
{
if ($('#ipa_'+$('#id_product option:selected').val()+' option').length === 0)
$('#attributes_list').hide();
else
{
$('#attributes_list').show();
$('.id_product_attribute').hide();
$('#ipa_'+$('#id_product option:selected').val()).show();
}
}
 
function updateCartProducts(products, gifts, id_address_delivery)
{
var cart_content = '';
$.each(products, function() {
var id_product = Number(this.id_product);
var id_product_attribute = Number(this.id_product_attribute);
cart_quantity[Number(this.id_product)+'_'+Number(this.id_product_attribute)+'_'+Number(this.id_customization)] = this.cart_quantity;
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td><td><input type="text" rel="'+this.id_product+'_'+this.id_product_attribute+'" class="product_unit_price" value="' + this.numeric_price + '" /></td><td>';
cart_content += (!this.id_customization ? '<div class="input-group fixed-width-md"><div class="input-group-btn"><a href="#" class="btn btn-default increaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" ><i class="icon-caret-up"></i></a><a href="#" class="btn btn-default decreaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'"><i class="icon-caret-down"></i></a></div>' : '');
cart_content += (!this.id_customization ? '<input type="text" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" class="cart_quantity" value="'+this.cart_quantity+'" />' : '');
cart_content += (!this.id_customization ? '<div class="input-group-btn"><a href="#" class="delete_product btn btn-default" rel="delete_'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" ><i class="icon-remove text-danger"></i></a></div></div>' : '');
cart_content += '</td><td>' + formatCurrency(this.numeric_total, currency_format, currency_sign, currency_blank) + '</td></tr>';
 
if (this.id_customization && this.id_customization != 0)
{
$.each(this.customized_datas[this.id_product][this.id_product_attribute][id_address_delivery], function() {
var customized_desc = '';
if (this.datas[1].length)
{
$.each(this.datas[1],function() {
customized_desc += this.name + ': ' + this.value + '<br />';
id_customization = this.id_customization;
});
}
if (this.datas[0] && this.datas[0].length)
{
$.each(this.datas[0],function() {
customized_desc += this.name + ': <img src="' + pic_dir + this.value + '_small" /><br />';
id_customization = this.id_customization;
});
}
cart_content += '<tr><td></td><td>'+customized_desc+'</td><td></td><td></td><td>';
cart_content += '<div class="input-group fixed-width-md"><a href="#" class="btn btn-default increaseqty_product" rel="'+id_product+'_'+id_product_attribute+'_'+id_customization+'" ><i class="icon-caret-up"></i></a><br /><a href="#" class="btn btn-default decreaseqty_product" rel="'+id_product+'_'+id_product_attribute+'_'+id_customization+'"><i class="icon-caret-down"></i></a></div>';
cart_content += '<input type="text" rel="'+id_product+'_'+id_product_attribute+'_'+id_customization +'" class="cart_quantity" value="'+this.quantity+'" />';
cart_content += '<div class="input-group-btn"><a href="#" class="delete_product btn btn-default" rel="delete_'+id_product+'_'+id_product_attribute+'_'+id_customization+'" ><i class="icon-remove"></i></a>';
cart_content += '</div></div></td><td></td></tr>';
});
}
});
 
$.each(gifts, function() {
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td>';
cart_content += '<td>{l s='Gift'}</td><td>'+this.cart_quantity+'</td><td>{l s='Gift'}</td></tr>';
});
$('#customer_cart tbody').html(cart_content);
}
 
function updateCartVouchers(vouchers)
{
var vouchers_html = '';
if (typeof(vouchers) == 'object')
$.each(vouchers, function(){
vouchers_html += '<tr><td>'+this.name+'</td><td>'+this.description+'</td><td>'+this.value_real+'</td><td class="text-right"><a href="#" class="btn btn-default delete_discount" rel="'+this.id_discount+'"><i class="icon-remove text-danger"></i> {l s='Delete'}</a></td></tr>';
});
$('#voucher_list tbody').html($.trim(vouchers_html));
if ($('#voucher_list tbody').html().length == 0)
$('#voucher_list').hide();
else
$('#voucher_list').show();
}
 
function updateCartPaymentList(payment_list)
{
$('#payment_list').html(payment_list);
}
 
function fixPriceFormat(price)
{
if(price.indexOf(',') > 0 && price.indexOf('.') > 0) // if contains , and .
if(price.indexOf(',') < price.indexOf('.')) // if , is before .
price = price.replace(',','');  // remove ,
price = price.replace(' ',''); // remove any spaces
price = price.replace(',','.'); // remove , if price did not cotain both , and .
return price;
}
 
function displaySummary(jsonSummary)
{
currency_format = jsonSummary.currency.format;
currency_sign = jsonSummary.currency.sign;
currency_blank = jsonSummary.currency.blank;
priceDisplayPrecision = jsonSummary.currency.decimals ? 2 : 0;
 
updateCartProducts(jsonSummary.summary.products, jsonSummary.summary.gift_products, jsonSummary.cart.id_address_delivery);
updateCartVouchers(jsonSummary.summary.discounts);
updateAddressesList(jsonSummary.addresses, jsonSummary.cart.id_address_delivery, jsonSummary.cart.id_address_invoice);
 
if (!jsonSummary.summary.products.length || !jsonSummary.addresses.length || !jsonSummary.delivery_option_list)
$('#carriers_part,#summary_part').hide();
else
$('#carriers_part,#summary_part').show();
 
updateDeliveryOptionList(jsonSummary.delivery_option_list);
 
if (jsonSummary.cart.gift == 1)
$('#order_gift').attr('checked', true);
else
$('#carrier_gift').removeAttr('checked');
if (jsonSummary.cart.recyclable == 1)
$('#carrier_recycled_package').attr('checked', true);
else
$('#carrier_recycled_package').removeAttr('checked');
if (jsonSummary.free_shipping == 1)
$('#free_shipping').attr('checked', true);
else
$('#free_shipping_off').attr('checked', true);
 
$('#gift_message').html(jsonSummary.cart.gift_message);
if (!changed_shipping_price)
$('#shipping_price').html('<b>' + formatCurrency(parseFloat(jsonSummary.summary.total_shipping), currency_format, currency_sign, currency_blank) + '</b>');
shipping_price_selected_carrier = jsonSummary.summary.total_shipping;
 
$('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts_tax_exc), currency_format, currency_sign, currency_blank));
$('#total_shipping').html(formatCurrency(parseFloat(jsonSummary.summary.total_shipping_tax_exc), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax), currency_format, currency_sign, currency_blank));
$('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price_without_tax), currency_format, currency_sign, currency_blank));
$('#total_with_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price), currency_format, currency_sign, currency_blank));
$('#total_products').html(formatCurrency(parseFloat(jsonSummary.summary.total_products), currency_format, currency_sign, currency_blank));
id_currency = jsonSummary.cart.id_currency;
$('#id_currency option').removeAttr('selected');
$('#id_currency option[value='+id_currency+']').attr('selected', true);
id_lang = jsonSummary.cart.id_lang;
$('#id_lang option').removeAttr('selected');
$('#id_lang option[value='+id_lang+']').attr('selected', true);
$('#send_email_to_customer').attr('rel', jsonSummary.link_order);
$('#go_order_process').attr('href', jsonSummary.link_order);
$('#order_message').val(jsonSummary.order_message);
resetBind();
}
 
function updateQty(id_product, id_product_attribute, id_customization, qty)
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "updateQty",
id_product: id_product,
id_product_attribute: id_product_attribute,
id_customization: id_customization,
qty: qty,
id_customer: id_customer,
id_cart: id_cart,
},
success : function(res)
{
displaySummary(res);
var errors = '';
if (res.errors.length)
{
$.each(res.errors, function() {
errors += this + '<br />';
});
$('#products_err').removeClass('hide');
}
else
$('#products_err').addClass('hide');
$('#products_err').html(errors);
}
});
}
 
function resetShippingPrice()
{
$('#shipping_price').val(shipping_price_selected_carrier);
changed_shipping_price = false;
}
 
function addProduct()
{
var id_product = $('#id_product option:selected').val();
$('#products_found #customization_list').contents().find('#customization_'+id_product).submit();
if (customization_errors)
$('#products_err').removeClass('hide');
else
{
$('#products_err').addClass('hide');
updateQty(id_product, $('#ipa_'+id_product+' option:selected').val(), 0, $('#qty').val());
}
}
 
function updateCurrency()
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "updateCurrency",
id_currency: $('#id_currency option:selected').val(),
id_customer: id_customer,
id_cart: id_cart
},
success : function(res)
{
displaySummary(res);
}
});
}
 
function updateLang()
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "admincarts",
action: "updateLang",
id_lang: $('#id_lang option:selected').val(),
id_customer: id_customer,
id_cart: id_cart
},
success : function(res)
{
displaySummary(res);
}
});
}
 
function updateDeliveryOption()
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "updateDeliveryOption",
delivery_option: $('#delivery_option option:selected').val(),
gift: $('#order_gift').is(':checked')?1:0,
gift_message: $('#gift_message').val(),
recyclable: $('#carrier_recycled_package').is(':checked')?1:0,
id_customer: id_customer,
id_cart: id_cart
},
success : function(res)
{
displaySummary(res);
}
});
}
 
function sendMailToCustomer()
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminOrders')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminOrders'}",
tab: "AdminOrders",
action: "sendMailValidateOrder",
id_customer: id_customer,
id_cart: id_cart
},
success : function(res)
{
if (res.errors)
$('#send_email_feedback').removeClass('hide').removeClass('alert-success').addClass('alert-danger');
else
$('#send_email_feedback').removeClass('hide').removeClass('alert-danger').addClass('alert-success');
$('#send_email_feedback').html(res.result);
}
});
}
 
function updateAddressesList(addresses, id_address_delivery, id_address_invoice)
{
var addresses_delivery_options = '';
var addresses_invoice_options = '';
var address_invoice_detail = '';
var address_delivery_detail = '';
var delivery_address_edit_link = '';
var invoice_address_edit_link = '';
 
$.each(addresses, function() {
if (this.id_address == id_address_invoice)
{
address_invoice_detail = this.formated_address;
invoice_address_edit_link = "{$link->getAdminLink('AdminAddresses')}&id_address="+this.id_address+"&updateaddress&realedit=1&liteDisplaying=1&submitFormAjax=1#";
}
 
if(this.id_address == id_address_delivery)
{
address_delivery_detail = this.formated_address;
delivery_address_edit_link = "{$link->getAdminLink('AdminAddresses')}&id_address="+this.id_address+"&updateaddress&realedit=1&liteDisplaying=1&submitFormAjax=1#";
}
 
addresses_delivery_options += '<option value="'+this.id_address+'" '+(this.id_address == id_address_delivery ? 'selected="selected"' : '')+'>'+this.alias+'</option>';
addresses_invoice_options += '<option value="'+this.id_address+'" '+(this.id_address == id_address_invoice ? 'selected="selected"' : '')+'>'+this.alias+'</option>';
});
if (addresses.length == 0)
{
$('#addresses_err').show().html('{l s='You must add at least one address to process the order.'}');
$('#address_delivery, #address_invoice').hide();
}
else
{
$('#addresses_err').hide();
$('#address_delivery, #address_invoice').show();
}
 
$('#id_address_delivery').html(addresses_delivery_options);
$('#id_address_invoice').html(addresses_invoice_options);
$('#address_delivery_detail').html(address_delivery_detail);
$('#address_invoice_detail').html(address_invoice_detail);
$('#edit_delivery_address').attr('href', delivery_address_edit_link);
$('#edit_invoice_address').attr('href', invoice_address_edit_link);
}
 
function updateAddresses()
{
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
async: true,
dataType: "json",
data : {
ajax: "1",
token: "{getAdminToken tab='AdminCarts'}",
tab: "AdminCarts",
action: "updateAddresses",
id_customer: id_customer,
id_cart: id_cart,
id_address_delivery: $('#id_address_delivery option:selected').val(),
id_address_invoice: $('#id_address_invoice option:selected').val()
},
success : function(res)
{
updateDeliveryOption();
}
});
}
</script>
 
<div class="leadin">{block name="leadin"}{/block}</div>
<div class="panel form-horizontal" id="customer_part">
<div class="panel-heading">
<i class="icon-user"></i>
{l s='Customer'}
</div>
<div id="search-customer-form-group" class="form-group">
<label class="control-label col-lg-3">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Search for an existing customer by typing the first letters of his/her name.'}">
{l s='Search for a customer'}
</span>
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-6">
<div class="input-group">
<input type="text" id="customer" value="" />
<span class="input-group-addon">
<i class="icon-search"></i>
</span>
</div>
</div>
<div class="col-lg-6">
<span class="form-control-static">{l s='Or'} </span>
<a class="fancybox_customer btn btn-default" href="{$link->getAdminLink('AdminCustomers')|escape:'html':'UTF-8'}&addcustomer&liteDisplaying=1&submitFormAjax=1#">
<i class="icon-plus-sign-alt"></i>
{l s='Add new customer'}
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div id="customers"></div>
</div>
<div id="carts">
<button type="button" id="show_old_carts" class="btn btn-default pull-right" data-toggle="collapse" data-target="#old_carts_orders">
<i class="icon-caret-down"></i>
</button>
 
<ul id="old_carts_orders_navtab" class="nav nav-tabs">
<li class="active">
<a href="#nonOrderedCarts" data-toggle="tab">
<i class="icon-shopping-cart"></i>
{l s='Carts'}
</a>
</li>
<li>
<a href="#lastOrders" data-toggle="tab">
<i class="icon-credit-card"></i>
{l s='Orders'}
</a>
</li>
</ul>
<div id="old_carts_orders" class="tab-content panel collapse in">
<div id="nonOrderedCarts" class="tab-pane active">
<table class="table">
<thead>
<tr>
<th><span class="title_box">{l s='ID'}</span></th>
<th><span class="title_box">{l s='Date'}</span></th>
<th><span class="title_box">{l s='Total'}</span></th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="lastOrders" class="tab-pane">
<table class="table">
<thead>
<tr>
<th><span class="title_box">{l s='ID'}</span></th>
<th><span class="title_box">{l s='Date'}</span></th>
<th><span class="title_box">{l s='Products'}</span></th>
<th><span class="title_box">{l s='Total paid'}</span></th>
<th><span class="title_box">{l s='Payment'}</span></th>
<th><span class="title_box">{l s='Status'}</span></th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
 
 
<form class="form-horizontal" action="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&submitAdd{$table}=1" method="post" autocomplete="off">
<div class="panel" id="products_part" style="display:none;">
<div class="panel-heading">
<i class="icon-shopping-cart"></i>
{l s='Cart'}
</div>
<div class="form-group">
<label class="control-label col-lg-3">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Search for an existing product by typing the first letters of its name.'}">
{l s='Search for a product'}
</span>
</label>
<div class="col-lg-9">
<input type="hidden" value="" id="id_cart" name="id_cart" />
<div class="input-group">
<input type="text" id="product" value="" />
<span class="input-group-addon">
<i class="icon-search"></i>
</span>
</div>
</div>
</div>
 
<div id="products_found">
<hr/>
<div id="product_list" class="form-group"></div>
<div id="attributes_list" class="form-group"></div>
<!-- @TODO: please be kind refacto -->
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<iframe id="customization_list" seamless>
<html>
<head>
{if isset($css_files_orders)}
{foreach from=$css_files_orders key=css_uri item=media}
<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />
{/foreach}
{/if}
</head>
<body>
</body>
</html>
</iframe>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3" for="qty">{l s='Quantity'}</label>
<div class="col-lg-9">
<input type="text" name="qty" id="qty" class="form-control fixed-width-sm" value="1" />
<p class="help-block">{l s='In stock'} <span id="qty_in_stock"></span></p>
</div>
</div>
 
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<button type="button" class="btn btn-default" id="submitAddProduct" />
<i class="icon-ok text-success"></i>
{l s='Add to cart'}
</div>
</div>
</div>
 
<div id="products_err" class="hide alert alert-danger"></div>
 
<hr/>
 
<div class="row">
<div class="col-lg-12">
<table class="table" id="customer_cart">
<thead>
<tr>
<th><span class="title_box">{l s='Product'}</span></th>
<th><span class="title_box">{l s='Description'}</span></th>
<th><span class="title_box">{l s='Reference'}</span></th>
<th><span class="title_box">{l s='Unit price'}</span></th>
<th><span class="title_box">{l s='Quantity'}</span></th>
<th><span class="title_box">{l s='Price'}</span></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
 
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<div class="alert alert-warning">{l s='The prices are without taxes.'}</div>
</div>
</div>
 
<div class="form-group">
<label class="control-label col-lg-3" for="id_currency">
{l s='Currency'}
</label>
<script type="text/javascript">
{foreach from=$currencies item='currency'}
currencies['{$currency.id_currency}'] = '{$currency.sign}';
{/foreach}
</script>
<div class="col-lg-9">
<select id="id_currency" name="id_currency">
{foreach from=$currencies item='currency'}
<option rel="{$currency.iso_code}" value="{$currency.id_currency}">{$currency.name}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3" for="id_lang">
{l s='Language'}
</label>
<div class="col-lg-9">
<select id="id_lang" name="id_lang">
{foreach from=$langs item='lang'}
<option value="{$lang.id_lang}">{$lang.name}</option>
{/foreach}
</select>
</div>
</div>
</div>
 
<div class="panel" id="vouchers_part" style="display:none;">
<div class="panel-heading">
<i class="icon-ticket"></i>
{l s='Vouchers'}
</div>
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Search for a voucher'} 
</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-6">
<div class="input-group">
<input type="text" id="voucher" value="" />
<div class="input-group-addon">
<i class="icon-search"></i>
</div>
</div>
</div>
<div class="col-lg-6">
<span class="form-control-static">{l s='Or'} </span>
<a class="fancybox btn btn-default" href="{$link->getAdminLink('AdminCartRules')|escape:'html':'UTF-8'}&addcart_rule&liteDisplaying=1&submitFormAjax=1#">
<i class="icon-plus-sign-alt"></i>
{l s='Add new voucher'}
</a>
</div>
</div>
</div>
</div>
<div class="row">
<table class="table" id="voucher_list">
<thead>
<tr>
<th><span class="title_box">{l s='Name'}</span></th>
<th><span class="title_box">{l s='Description'}</span></th>
<th><span class="title_box">{l s='Value'}</span></th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="vouchers_err" class="alert alert-warning" style="display:none;"></div>
</div>
 
<div class="panel" id="address_part" style="display:none;">
<div class="panel-heading">
<i class="icon-envelope"></i>
{l s='Addresses'}
</div>
<div id="addresses_err" class="alert alert-warning" style="display:none;"></div>
 
<div class="row">
<div id="address_delivery" class="col-lg-6">
<h4>
<i class="icon-truck"></i>
{l s='Delivery'}
</h4>
<div class="row-margin-bottom">
<select id="id_address_delivery" name="id_address_delivery"></select>
</div>
<div class="well">
<a href="" id="edit_delivery_address" class="btn btn-default pull-right fancybox"><i class="icon-pencil"></i> {l s='Edit'}</a>
<div id="address_delivery_detail"></div>
</div>
</div>
<div id="address_invoice" class="col-lg-6">
<h4>
<i class="icon-file-text"></i>
{l s='Invoice'}
</h4>
<div class="row-margin-bottom">
<select id="id_address_invoice" name="id_address_invoice"></select>
</div>
<div class="well">
<a href="" id="edit_invoice_address" class="btn btn-default pull-right fancybox"><i class="icon-pencil"></i> {l s='Edit'}</a>
<div id="address_invoice_detail"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<a class="fancybox btn btn-default" id="new_address" href="{$link->getAdminLink('AdminAddresses')|escape:'html':'UTF-8'}&addaddress&id_customer=42&liteDisplaying=1&submitFormAjax=1#">
<i class="icon-plus-sign-alt"></i>
{l s='Add a new address'}
</a>
</div>
</div>
</div>
<div class="panel" id="carriers_part" style="display:none;">
<div class="panel-heading">
<i class="icon-truck"></i>
{l s='Shipping'}
</div>
<div id="carriers_err" style="display:none;" class="alert alert-warning"></div>
<div id="carrier_form">
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Delivery option'} 
</label>
<div class="col-lg-9">
<select name="delivery_option" id="delivery_option">
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3" for="shipping_price">
{l s='Shipping price'}
</label>
<div class="col-lg-9">
<p id="shipping_price" class="form-control-static" name="shipping_price"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3" for="free_shipping">
{l s='Free shipping'}
</label>
<div class="input-group col-lg-9 fixed-width-lg">
<span class="switch prestashop-switch">
<input type="radio" name="free_shipping" id="free_shipping" value="1">
<label for="free_shipping" class="radioCheck">
{l s='yes'}
</label>
<input type="radio" name="free_shipping" id="free_shipping_off" value="0" checked="checked">
<label for="free_shipping_off" class="radioCheck">
{l s='No'}
</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
 
{if $recyclable_pack}
<div class="form-group">
<div class="checkbox col-lg-9 col-offset-3">
<label for="carrier_recycled_package">
<input type="checkbox" name="carrier_recycled_package" value="1" id="carrier_recycled_package" />
{l s='Recycled package'}
</label>
</div>
</div>
{/if}
 
{if $gift_wrapping}
<div class="form-group">
<div class="checkbox col-lg-9 col-offset-3">
<label for="order_gift">
<input type="checkbox" name="order_gift" id="order_gift" value="1" />
{l s='Gift'}
</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3" for="gift_message">{l s='Gift message'}</label>
<div class="col-lg-9">
<textarea id="gift_message" class="form-control" cols="40" rows="4"></textarea>
</div>
</div>
{/if}
</div>
</div>
<div class="panel" id="summary_part" style="display:none;">
<div class="panel-heading">
<i class="icon-align-justify"></i>
{l s='Summary'}
</div>
 
<div id="send_email_feedback" class="hide alert"></div>
 
<div id="cart_summary" class="panel row-margin-bottom text-center">
<div class="row">
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total products'}</span><br/>
<span id="total_products" class="size_l text-success"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total vouchers'}</span><br/>
<span id="total_vouchers" class="size_l text-danger"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total shipping'}</span><br/>
<span id="total_shipping" class="size_l"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total taxes'}</span><br/>
<span id="total_taxes" class="size_l"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total without taxes'}</span><br/>
<span id="total_without_taxes" class="size_l"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus data-focus-primary">
<span>{l s='Total with taxes'}</span><br/>
<span id="total_with_taxes" class="size_l"></span>
</div>
</div>
</div>
</div>
 
<div class="row">
<div class="order_message_right col-lg-12">
<div class="form-group">
<label class="control-label col-lg-3" for="order_message">{l s='Order message'}</label>
<div class="col-lg-6">
<textarea name="order_message" id="order_message" rows="3" cols="45"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<a href="javascript:void(0);" id="send_email_to_customer" class="btn btn-default">
<i class="icon-credit-card"></i>
{l s='Send an email to the customer with the link to process the payment.'}
</a>
<a target="_blank" id="go_order_process" href="" class="btn btn-link">
{l s='Go on payment page to process the payment.'}
<i class="icon-external-link"></i>
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">{l s='Payment'}</label>
<div class="col-lg-9">
<select name="payment_module_name" id="payment_module_name">
{foreach from=$payment_modules item='module'}
<option value="{$module->name}" {if isset($smarty.post.payment_module_name) && $module->name == $smarty.post.payment_module_name}selected="selected"{/if}>{$module->displayName}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">{l s='Order status'}</label>
<div class="col-lg-9">
<select name="id_order_state" id="id_order_state">
{foreach from=$order_states item='order_state'}
<option value="{$order_state.id_order_state}" {if isset($smarty.post.id_order_state) && $order_state.id_order_state == $smarty.post.id_order_state}selected="selected"{/if}>{$order_state.name}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<button type="submit" name="submitAddOrder" class="btn btn-default" />
<i class="icon-check"></i>
{l s='Create the order'}
</button>
</div>
</div>
</div>
</div>
</div>
</form>
 
<div id="loader_container">
<div id="loader"></div>
</div>

Any thougthts?

Share this post


Link to post
Share on other sites

 

To add any payment name in \admin\themes\default\template\controllers\orders\form.tpl after

                    <div class="col-lg-4">

                        <select name="payment_module_name" id="payment_module_name">

                            {if !$PS_CATALOG_MODE}

                            {foreach from=$payment_modules item='module'}

                                <option value="{$module->name}" {if isset($smarty.post.payment_module_name) && $module->name == $smarty.post.payment_module_name}selected="selected"{/if}>{$module->displayName}</option>

                            {/foreach}

                            {else}

                                <option value="{l s='Back-office order'}">{l s='Back-office order'}</option>

                            {/if}

                        </select>

                    </div>

add

                    <div class="col-lg-5">

                        <input name="payment_name" id="payment_name" class="form-control">

                    </div>

 

I havent got that piece of code in my form.tpl

 

I am on version 1.6.08

 

Any thoughts?

Share this post


Link to post
Share on other sites

I think your PS has some issue .. as the code is both in my PS 1.6.8 installation on my server and on github (https://github.com/PrestaShop/PrestaShop/blob/1.6/admin-dev/themes/default/template/controllers/orders/form.tpl#L1495)

My Dashboard states: 

PRESTASHOP UPDATES
Your PrestaShop version is up to date

 

Can anyone tell me how I can reinstall PS (just to be certain that my shop has the right files) and use my current database?  I have searched the forums and googled with no luck.

Share this post


Link to post
Share on other sites

Just export your DB (make a complete backup) ... reinstall everything and then restore from the backup

Share this post


Link to post
Share on other sites

I havent got that piece of code in my form.tpl

 

I am on version 1.6.08

 

Any thoughts?

 

Do you have any other module installed? No overrides?

Share this post


Link to post
Share on other sites

Hi, I had installed this module, but nothing happen.

 

can't find where to configure

 

Thank you

Share this post


Link to post
Share on other sites

 

Universal Payment Module is module for creating an unlimited payment methods count through the admin tab withouth programming skills. With the help of the Universal Payment Module you can create a new payment method is as simple as adding a new category in the catalog or a new page in the CMS.

 

Download

If you download module from github, you must rename module folder to "universalpay"

Description

 

 

The module adds a new "Modules>Pay Systems" tab by which the creation and management of payment methods. When creating a new payment method you need to fill in the following fields:

  • Name - the name of the method of payment will be displayed in the properties of order in the admin panel;
  • Short description - the text displayed next to the logo, the list of payment systems in order;
  • Show - whether to display the payment system in order
  • Description - The text displayed when selecting this method of payment by the buyer. There may be instructions to transfer funds to your e-wallet, bank account for payment, or something else;
  • Description succes - text after pressing confirmation button;
  • Picture - the payment method logo that appears in the list of payment systems in order;
  • Order state - order state after creating.
  • Carriers - select carriers, the choice of which will be shown this method of payment.

Features

  • Creates an unlimited number of fully customizable methods of payment
  • Allows you to bind to a payment to carrier
  • Allow to set order state after creating
  • Confirmation button can be added on payment systems page (like Authorize.net AIM module)
  • It does not require programming skills.

attachicon.gif1.jpgattachicon.gif2.pngattachicon.gif3.jpgattachicon.gif4.jpgattachicon.gif5.jpgattachicon.gif6.png

 

Changes

V 1.8

+ rewritten to support PrestaShop 1.6

+ text improvment

+ %order_number% return order reference

+ Removed translations, since they no longer are valid, many strings changed.

 

v 1.7

+ added success message displayed in order details page. you can remove it on Modules/Positions tab

+ added user groups filter

v 1.4

+ carrier updating fixed

 

v 1.3

+ added confirmation button on payment systems page

 

v 1.2

+ added payment success page

+ added created order state

 

My other modules

 

Module not working with PS 1.5.6.2 dont let go to payment page after installation

Share this post


Link to post
Share on other sites

Uploaded it to the module section yet I can't seem to find it?

It's nowhere in the modules section so i can't install it

Share this post


Link to post
Share on other sites

Uploaded it to the module section yet I can't seem to find it?

It's nowhere in the modules section so i can't install it

If you download module from github, you must rename module folder to "universalpay"

Share this post


Link to post
Share on other sites

If you download module from github, you must rename module folder to "universalpay"

 

Whoops, so stupid of me.

It works, thank you very much!! 

 

Just out of interest, when I pay using this custom module any chance of getting an email with an attachment? 

Share this post


Link to post
Share on other sites

I am using PrestaShop 1.6.0.9 and downloaded the module from GitHub and renamed it: universalpay.zip

 

Prestashop gives me the message, that the module is successfully downloaded (green tick). But it does not appear in the module list. Did I something wrong?

 

Cheers,

Ralph

Share this post


Link to post
Share on other sites

If you download module from github, you must rename module folder to "universalpay"

this goes for zip and folder within zip

Share this post


Link to post
Share on other sites

this goes for zip and folder within zip

Thanks! This works. I thought, only the downloaded zip must be renamed.

Share this post


Link to post
Share on other sites

Sorry, i dont completely get this module. If i install this, can i setup it so people can use credit card to pay on my site?

Share this post


Link to post
Share on other sites

No, this module allows you to create unlimited amount of offline payments.

Like invoces, bankwire, checque payments. As long the payment don't need to connect to an server, you can create any payment  you want.

Share this post


Link to post
Share on other sites

Is it possible that there is a problem if I add a new country?

My customer could only use adress from switzerland. Now I activated also germany. But when a customer is from germany he gets the words: "No payment module installed". If I change the adress to switzerland he can use it. 

 

I reinstalled the module and now both country work. 

 

So is this really not possible the add a new country without reinstall or was this another problem?

Share this post


Link to post
Share on other sites

So is this really not possible the add a new country without reinstall or was this another problem?

You must check button near the country name on Modules/Payment tab

Share this post


Link to post
Share on other sites

Hello

 

i have sucessfull  install this great module and works great, but i still have a small problem.

 

if i make a "new payment", this triplicate the "new payment" .... hmm Confuse...

 

please see the photo below.

 

 

I need to change somthing on the code ??

 

I'm using PS 1.6.0.6

 

post-575077-0-34341300-1409870047_thumb.jpg

Share this post


Link to post
Share on other sites
i have sucessfull  install this great module and works great, but i still have a small problem. if i make a "new payment", this triplicate the "new payment" .... hmm Confuse... please see the photo below. I need to change somthing on the code ?? 'm using PS 1.6.0.6

 

OT, sorry, I have no answer to your question, because I haven't installed that module yet, but how does payment by SMS work?

Share this post


Link to post
Share on other sites

 

Universal Payment Module is module for creating an unlimited payment methods count through the admin tab withouth programming skills. With the help of the Universal Payment Module you can create a new payment method is as simple as adding a new category in the catalog or a new page in the CMS.

 

Download

 

Has that module be removed from the official PrestaShop Addons Marketplace? That link does not lead to your module and I can't find it in the addons.

Share this post


Link to post
Share on other sites

Thank you so much for this very useful module.

 

I am new at Prestashop and I have been looking for a Payment Module but I couldn't found anywhere but here.

 

I hope someone could help me adding new payment gateway through this module.

In my country there is no credit card payment and no paypal either. 

There's only one online payment gateway. I have contacted them but they don't have PrestaShop module.

They provided me API details but I don't know where to implement them on Universal Payment Module.

 

<form action="http://dev.esewa.com.np/epay/main" method="POST">
 
<input value="100" name="tAmt" type="hidden">
 
<input value="90" name="amt" type="hidden">
 
<input value="5" name="txAmt" type="hidden">
 
<input value="2" name="psc" type="hidden">
 
<input value="3" name="pdc" type="hidden">
 
<input value="testmerchant" name="scd" type="hidden”>
 
 <input value="XYZ-1234" name="pid" type=" hidden”>
 
 <input value="http://myshop.com/success.html?q=su" type="hidden" name="su">
 
 <input value="http://myshop.com/failure.html?q=fu" type="hidden" name="fu">
 
<input value="Submit" type="submit">
 
 </form>
 
I will be very grateful if anyone could help me out of this.
 
Looking forward for some help.
 

Regards, 


BluesFreak

Share this post


Link to post
Share on other sites

This module cannot be used to connect to API's for online payments. It is not what it is for. This is only to make offline payment systems

Share this post


Link to post
Share on other sites

This module cannot be used to connect to API's for online payments. It is not what it is for. This is only to make offline payment systems

Hi Ron, 

 

Thank you so  much for quick response. 

 

Could you please tell me where should I look for customized online API for Prestashop Payment Gateway module?

 

It would be great help.

 

Thanks :)

Share this post


Link to post
Share on other sites

Hi Ron, 

 

Thank you so  much for quick response. 

 

Could you please tell me where should I look for customized online API for Prestashop Payment Gateway module?

 

It would be great help.

 

Thanks :)

Use offline CC payment module please PMB for details, this way you will be able to gather customer CC info and charge them later using local payment method

Share this post


Link to post
Share on other sites

Not an area I am familiar with I am afraid. Perhaps ask for help in the Job Offers section?

http://www.prestashop.com/forums/forum/235-job-offers/

 

Perhaps also if you say what your payment gateway is, and country, others may have heard of it and be able to offer more help

 

Thank you Ron, again for quick response.

 

Here's the details of my local online payment gateway API

Country : Nepal

Online Payment Gateway : eSewa (https://dev.esewa.com.np)

 

API code they have provided

<form action="http://dev.esewa.com.np/epay/main" method="POST">
<input value="100" name="tAmt" type="hidden">
<input value="90" name="amt" type="hidden">
<input value="5" name="txAmt" type="hidden">
<input value="2" name="psc" type="hidden">
<input value="3" name="pdc" type="hidden">
<input value="testmerchant" name="scd" type="hidden”>
<input value="XYZ-1234" name="pid" type=" hidden”>
<input value="http://myshop.com/success.html?q=su" type="hidden" name="su">
<input value="http://myshop.com/failure.html?q=fu" type="hidden" name="fu">
<input value="Submit" type="submit">
</form>
 
If anyone here can help me.. I would be very grateful.
 
Thank you and looking for some positive feedback.
 
Regards,
 
Dabluesfreak

Share this post


Link to post
Share on other sites

I've just installed this module (v1.9) on PS v1.6.0.9 with default-template. Two short questions:

 

  1. Is there a recommended size for the payment logo?
  2. Is this with showing "universal payment" in the admin and on the invoice instead of the configured name for the payment method as mentioned in comments a few pages before still an issue, or has it already been fixed?
  • Like 1

Share this post


Link to post
Share on other sites
I have a problem 

 

I have created a payment method with this module, but when I select it appears 2 times. 

 

as I can make out only once ?? In the management tab is only once.

Share this post


Link to post
Share on other sites

 

I've just installed this module (v1.9) on PS v1.6.0.9 with default-template. Two short questions:

 

  1. Is there a recommended size for the payment logo?
  2. Is this with showing "universal payment" in the admin and on the invoice instead of the configured name for the payment method as mentioned in comments a few pages before still an issue, or has it already been fixed?

 

 

I quoted this ... Is there a recommendend size for the payment logo? I've been trying align a logo but it's almost impossible.

 

By the way, thank you for this module, works pretty fine to me.

Edited by Rubikk (see edit history)

Share this post


Link to post
Share on other sites

Hi I have upload module in the 1.6.8 versione and I can't see it on my payment module list...why this?

It is not in the Payment modules section. Look in Modules > Pay Systems (see attachment)

post-246958-0-97113800-1411994760_thumb.jpg

Share this post


Link to post
Share on other sites

If you download module from github, you must rename module folder to "universalpay"

Share this post


Link to post
Share on other sites

Hi,

 

I use Prestashop 1.6.09 with default theme.

 

I have installed the Universal payment module.

 

It's working. No problem... except except at the end.

1) When i close the order in the left column "New products block" appears. (only with this payment).

2) The Cart (Up-right) is not empty... (only with this payment).
     But If i click into the cart... the cart is empty... 
     I think is a refresh error... 

 

Can you help me?

Thanks!

PS. Sorry for my very bad english!

 

Share this post


Link to post
Share on other sites

Hi

 

prestashop 1.6.0.9

one page checkout

English and Russian localizations

when I install this module, even without adding payment options, I have erros on cart page when change addres chekboxes like

 

TECHNICAL ERROR: unable to save adresses Details: Error thrown: [object Object] Text status: parsererror

 

only with Russian language, with English ok

Share this post


Link to post
Share on other sites

Great module. It's a very usefull module for offline payments. But it has some issues that must be fixed.

 

1) You assign the countries to all module. But you may need assign different countries depending on payment method.

 

2) When you create an order from backoffice, you only have the Universal Pay method. You would have each new payment method created by Universal Pay module.

Share this post


Link to post
Share on other sites
 

Hi,

 

I use Prestashop 1.6.09 with default theme.

 

I have installed the Universal payment module.

 

It's working. No problem... except except at the end.

 

1) When i close the order the left column "New products block" appears. (only with this payment).

 

 

Any Idea?

 

 

 

up up up... :-(

Edited by ddt81 (see edit history)

Share this post


Link to post
Share on other sites

Dear Sir

 

after I add your module i can see there is extra option "pay system "

 

I add payment method i don't see any Payment option in my webpage , can you tell me where i am doing wrong 

 

picture attachment 

 

http://postimg.org/image/o8batmz7f/

http://postimg.org/image/cvm7bxajv/

http://postimg.org/image/4fovcehoz/

http://postimg.org/image/jiz5a9ccb/

Edited by mra999 (see edit history)

Share this post


Link to post
Share on other sites

Non of your screenshoots show the actual payment option in the checkout.

Don't you get any payment options at all?

What happens if you disable this module, does your other payment options work?

  • Like 1

Share this post


Link to post
Share on other sites

Yes when i enable other payment option works but 

Universal Payment Module  

 

doesn't show any option in my page 

Share this post


Link to post
Share on other sites

Actually no, got no clue.

 

But have you set up group access for the payment option?

Is the status you are using still available (not deleted)?

Share this post


Link to post
Share on other sites

See Other payment Works

 

http://postimg.org/image/ff2bc5z9r/

 

http://postimg.org/image/l7b7ewtpf/

 

 

No 

Please Let me Know How can i set up group access for the payment option?

 

will try 

Thanks 

 

Thank You so Much ApprenTice   

 

After I select Group set my Payment option working now i can see on page option

 

 

http://postimg.org/image/516kxqvhh/

]
Edited by mra999 (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

I have fee amazonpay module for anyone interested. Let me know if any problem occurs i'll help

 

 

Thanks

Share this post


Link to post
Share on other sites

I have problem now Brand Logo , when i upload image for logo i can see :Short description:

show top of logo which one looks not good  , if it is one side thats ok , but top of logo writen looks not good 

 

http://postimg.org/image/rfz95i9an/

 

 

any solution 

 

Thanks

Share this post


Link to post
Share on other sites

Hi,

 

I have problems with this module. Have downloaded from github, renamed the zip file and also the files inside. Re-zipped and installed, but it doesn't appear in my PS - not in Modules>new tab and not between other Not installed modules.

 

I'm using PS 1.6.0.9 and downloaded the latest version of the module for PS 1.6 from the link on the first page of this topic.

 

What am I doing wrong?

 

EDIT: think I have solved by copying the folder directly into module folder ... sorry for this post :)

Edited by toncika (see edit history)

Share this post


Link to post
Share on other sites

Hi,

 

I have problems with this module. Have downloaded from github, renamed the zip file and also the files inside. Re-zipped and installed, but it doesn't appear in my PS - not in Modules>new tab and not between other Not installed modules.

 

I'm using PS 1.6.0.9 and downloaded the latest version of the module for PS 1.6 from the link on the first page of this topic.

 

What am I doing wrong?

 

EDIT: think I have solved by copying the folder directly into module folder ... sorry for this post :)

try this 

https://mega.co.nz/#!G00SUCJK!H_WDr2eaWhdtgQRbOoNDTJsZVYChisjBQXuYKb6IUxI

  • Like 1

Share this post


Link to post
Share on other sites

Hi guys,

 

Firstly I wanted to thank the dev team for this fabulous module.

I also wanted to requested some help (if I may ask).

So that's my situation:

I have PS 1.6 and installed v1.8 Universal Payment Module.

I setup one custom payment called "Pay On The Phone"
Order State is a custom status
I picked up 2 different carriers
Select the 3Standard groups
(See attachement)

In module>payment I also checked all boxes for "Universal Payment Module".

However I cannot select this payment at the checkout (See attachement) .


Has someone already got this issue? Any clue?

I also notice that when I decided to disable and enable cash on delivery I could not see any payment method at all. Is there a problem with my cache?


Thank you in advance.

Florian

post-840937-0-86306900-1416443172_thumb.png

post-840937-0-40702200-1416443237_thumb.png

Edited by Tijiflox (see edit history)

Share this post


Link to post
Share on other sites

Hi.

 

Everything looks right.

And you said you checked all for currency, group and country in Moduels -> Payment

It should show up.

 

Try to clear the cache.

And maybe change position on the hook displayPayment

Share this post


Link to post
Share on other sites

Hi guys,

 

Firstly I wanted to thank the dev team for this fabulous module.

 

I also wanted to requested some help (if I may ask).

 

So that's my situation:

 

I have PS 1.6 and installed v1.8 Universal Payment Module.

 

I setup one custom payment called "Pay On The Phone"

Order State is a custom status

I picked up 2 different carriers

Select the 3Standard groups

(See attachement)

 

In module>payment I also checked all boxes for "Universal Payment Module".

 

However I cannot select this payment at the checkout (See attachement) .

 

Has someone already got this issue? Any clue?

 

I also notice that when I decided to disable and enable cash on delivery I could not see any payment method at all. Is there a problem with my cache?

 

URL: http://dev-cfd.cfdesign.com.au

 

Thank you in advance.

 

Florian

I am beginning to think there is a prestashop issue with installing new payment systems. I have tried one or two in the last few days and none of them show up in the front end to the customer. Not had chance to really dig into this. But I tried installing this latest update for universal pay and it disappears from the front end, ok in the back office. I also tried installing a third party purchase order module and that will not show up either. Strange

Share this post


Link to post
Share on other sites

Hi.

 

Everything looks right.

And you said you checked all for currency, group and country in Moduels -> Payment

It should show up.

 

Try to clear the cache.

And maybe change position on the hook displayPayment

Hi PhpMadMan,

 

Thank you very much for helping me and taking care of my case.

 

I cleared cache and change position on the hook DisplayPayment (see attachement)

 

However it does not change anything. I tried to uninstall plugin, re-create payment with plugin but does not do anything.

 

I also attached pics of my payment settings. You may have clues.

 

Florian

 

 

post-840937-0-16268600-1416534970_thumb.png

post-840937-0-55174600-1416535364_thumb.png

post-840937-0-91531500-1416535374_thumb.png

post-840937-0-98229400-1416535377_thumb.png

post-840937-0-65940700-1416535379_thumb.png

Share this post


Link to post
Share on other sites

Hi.
 
I'm sorry. I really have no idea. All your settings are correct. It should show up according to your settings.
Best idea I have is to move it to position 1 in displayPayment

 

And also enable debug mode, see if you get any error in module BO or in FO

Edited by PhpMadman (see edit history)

Share this post


Link to post
Share on other sites

Hi.

 

I'm sorry. I really have no idea. All your settings are correct. It should show up according to your settings.

Best idea I have is to move it to position 1 in displayPayment

 

And also enable debug mode, see if you get any error in module BO or in FO

Hi PhpMadman,

 

 

Thank you again for helping and following up my issue.

 

I do not know how to enable debug mode on PrestaShop but I went to the ControlPanel to check php log.

 

I fund something

 

PHP Notice:  Undefined variable: unactive_list in /chroot/home/cfdesign/cfdesign.com.au/html/dev-cfd/controllers/admin/AdminPaymentController.php on line 289, referer: http://dev-cfd.cfdesign.com.au/admin123/index.php?controller=AdminUniPaySystem&id_universalpay_system=1&conf=4&token=ecd245f91c3a45ee6b051d0ffc863e41

 

 

So I went to line 289 (see attachement)

 

But I am not sure what I am looking for ? Is it what you advise me to do ?

 

Let me know if you have sometimes.

 

Florian

post-840937-0-09858700-1416621979_thumb.png

post-840937-0-76325100-1416622376_thumb.png

Edited by Tijiflox (see edit history)

Share this post


Link to post
Share on other sites

Hi guys,

 

How was the weekend ?

Hope that you enjoyed it. For me stress is already back...

Do you have any suggestion regarding my issue?
How to display error?

Regards,

Florian
 

Share this post


Link to post
Share on other sites

To enable debug mode

http://doc.prestashop.com/display/PS15/Setting+up+your+local+development+environment#Settingupyourlocaldevelopmentenvironment-Displayingerrormessages

 

 

Just change the _PS_MODE_DEV_ to true as described.

 

Also. grab the 1.9 version from GitHub. I doubt it, but it might help.

 

And what exact version of 1.6 do you use?

Share this post


Link to post
Share on other sites

Hi,

 

really anyone you choose the payment does not appear in the front office twice? PS 1.6.0.9

Share this post


Link to post
Share on other sites

No. I have no idea why it shows up in FO twice.

Can you provide screenshots of FO, and BO : module config, Modules > Payment Systems and the payment configuration.

Share this post


Link to post
Share on other sites

To enable debug mode

http://doc.prestashop.com/display/PS15/Setting+up+your+local+development+environment#Settingupyourlocaldevelopmentenvironment-Displayingerrormessages

 

 

Just change the _PS_MODE_DEV_ to true as described.

 

Also. grab the 1.9 version from GitHub. I doubt it, but it might help.

 

And what exact version of 1.6 do you use?

Hi PhpMadman,

 

My module version is actually the 1.9 from GitHub.

My PS is 1.6.0.8 (see attachement)

 

I activated debug mode but I do not see any error displayed.

 

The strange thing is that I enabled payment not only for "cash on delivery" (see attachement)

 

 

 

i will try to investigate on my side but let me know if you have any idea.

 

EDIT: I tried to create an order manually and I can select all payment method from BO. However there is still nothing from FO. (see attachement)

 

Florian

post-840937-0-11183100-1416867936_thumb.png

post-840937-0-51886100-1416868502_thumb.png

post-840937-0-12847400-1416869305_thumb.png

Edited by Tijiflox (see edit history)

Share this post


Link to post
Share on other sites

Oh guess what?

As I am selling all my stuff in Australian Dollar currency I had disabled USD but I just turned it back ON.
I could also that my default currency was dollar (but USD and not AUD) so the payment method would not active as I disable on USD...

Now I can see the payment method (see attachement).

Sorry for the hard work I gave you.

Regards,

Florian

post-840937-0-13869500-1416873366_thumb.png

Edited by Tijiflox (see edit history)

Share this post


Link to post
Share on other sites

No. I have no idea why it shows up in FO twice.

Can you provide screenshots of FO, and BO : module config, Modules > Payment Systems and the payment configuration.

Showing up three times for me - grrr

 

And I think i know the problem

 

post-246958-0-91676100-1416921784_thumb.jpg

 

It is the groups. It shows up for every group enabled. Any ideas how to fix?

 

It is because my log in is a member of all groups.. But it is possible that each customer is part of more than one group so it does need to be sorted

Edited by haylau (see edit history)

Share this post


Link to post
Share on other sites

Hi. You are correct. It is the groups. It shows up for each group it's enabled in.

I'll look in to it.

Share this post


Link to post
Share on other sites

Hi,

 

thank you very, very much .. you are very handy .. module is displayed only once.. super ..

Share this post


Link to post
Share on other sites

Anybody worked out how to make this state the name of the order type in the backoffice yet?

So we create a payment system called "Bank transfer in Sterling" for example and another called "Telephone order". But on the invoices and in the back office both are called "Universal Payment System"

Share this post


Link to post
Share on other sites

To do that, requires override files of at lest the order controller, pdf controller / classes, and I'm also guessing a admin .tpl file from the order folder.

Share this post


Link to post
Share on other sites

Hi!

 

Great module but I have one problem. By checkout logo is not showing, but in  BO Pay Systems logo is ok!

How can I enable logo that customer can see it?

Thanks!

 

Regards,

Igor

Share this post


Link to post
Share on other sites

Is there any way of having the logo for the created Pay System, appear in the payment method block, on the homepage in Prestashop 1.5.3 ?

Share this post


Link to post
Share on other sites