Jump to content

prestashop limitation of the cash payment


Recommended Posts

hello everyone I need your help urgently, unfortunately in Italy you can not pick up the goods by paying more than € 999.99 in cash.

 

questp is for the ps version 1.4.4.1

 

Use the form cash on delivery, how can I do to set the limit of € 999.99?

 

I enclose the original file validation.tpl

 

and what I'm trying to change, but without success

 

thanks

 

 

original validation.tpl

 

 

{capture name=path}{l s='Shipping' mod='cashondelivery'}{/capture}

{include file="$tpl_dir./breadcrumb.tpl"}

 

<h2>{l s='Order summation' mod='cashondelivery'}</h2>

 

{assign var='current_step' value='payment'}

{include file="$tpl_dir./order-steps.tpl"}

 

<h3>{l s='Cash on delivery (COD) payment' mod='cashondelivery'}</h3>

 

<form action="{$this_path_ssl}validation.php" method="post">

<input type="hidden" name="confirm" value="1" />

<p>

<img src="{$this_path}cashondelivery.jpg" alt="{l s='Cash on delivery (COD) payment' mod='cashondelivery'}" style="float:left; margin: 0px 10px 5px 0px;" />

{l s='You have chosen the cash on delivery method.' mod='cashondelivery'}

<br/><br />

{l s='The total amount of your order is' mod='cashondelivery'}

<span id="amount_{$currencies.0.id_currency}" class="price">{convertPrice price=$total}</span>

{if $use_taxes == 1}

{l s='(tax incl.)' mod='cashondelivery'}

{/if}

</p>

<p>

<br /><br />

<br /><br />

<b>{l s='Please confirm your order by clicking \'I confirm my order\'' mod='cashondelivery'}.</b>

</p>

<p class="cart_navigation">

<a href="{$link->getPageLink('order.php', true)}?step=3" class="button_large">{l s='Other payment methods' mod='cashondelivery'}</a>

<input type="submit" name="submit" value="{l s='I confirm my order' mod='cashondelivery'}" class="exclusive_large" />

</p>

</form>

 

 

modify validation.tpl

 

 

{capture name=path}{l s='Shipping' mod='cashondelivery'}{/capture}

{include file="$tpl_dir./breadcrumb.tpl"}

 

<h2>{l s='Order summation' mod='cashondelivery'}</h2>

 

{assign var='current_step' value='payment'}

{include file="$tpl_dir./order-steps.tpl"}

{if $total>500}

NON E' POSSIBILE PAGARE IN CONTRASSEGNO IMPORTI SUPERIORI A 500,00 euro

{l s='Other payment methods' mod='cashondelivery'}

 

 

 

<h3>{l s='Cash on delivery (COD) payment' mod='cashondelivery'}</h3>

 

<form action="{$this_path_ssl}validation.php" method="post">

<input type="hidden" name="confirm" value="1" />

<p>

<img src="{$this_path}cashondelivery.jpg" alt="{l s='Cash on delivery (COD) payment' mod='cashondelivery'}" style="float:left; margin: 0px 10px 5px 0px;" />

{l s='You have chosen the cash on delivery method.' mod='cashondelivery'}

<br/><br />

{l s='The total amount of your order is' mod='cashondelivery'}

<span id="amount_{$currencies.0.id_currency}" class="price">{convertPrice price=$total}</span>

{if $use_taxes == 1}

{l s='(tax incl.)' mod='cashondelivery'}

{/if}

</p>

<p>

<br /><br />

<br /><br />

<b>{l s='Please confirm your order by clicking \'I confirm my order\'' mod='cashondelivery'}.</b>

</p>

<p class="cart_navigation">

<a href="{$link->getPageLink('order.php', true)}?step=3" class="button_large">{l s='Other payment methods' mod='cashondelivery'}</a>

<input type="submit" name="submit" value="{l s='I confirm my order' mod='cashondelivery'}" class="exclusive_large" />

</p>

</form>

{/if}

Link to comment
Share on other sites

in back office for each shipping method you can define price range.

then you can define payment methods related to the "shipping" method in module like ship2pay

 

just disable cashondelivery for your shipping method with price range > €999.99

Link to comment
Share on other sites

thanks for the reply Vekia

 

I have a question, in this way, but I can not see from the front office side of the courier called withdrawal in place, because it is based on price, while I see only one set according to the weight.

 

shipment from the menu -> billing can only choose whether to bring up the courier depending on the weight or the price

 

ps the version is 1.4.4.1

 

where am I wrong?

Link to comment
Share on other sites

I then followed this guide, but I have a problem, once I select the courier, the page turns white, it would be better if you could generate an error, for example, attention can not select retreat in stock if the value is greater than 100

 

code payment.tpl

 

{assign var="ver" value="0"}

{foreach from=$cart->getproducts() item=prd}

if cart amount > 999.99, then return false

{$ver="1"}

{/if}

{/foreach}

{if $ver==1}

<p class="payment_module">

<a href="{$link->getModuleLink('cashondelivery', 'validation', [], true)}" title="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}">

<img src="{$this_path}cashondelivery.gif" alt="{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}" style="float:left;" />

<br />{l s='Pay with cash on delivery (COD)' mod='cashondelivery'}

<br />{l s='You pay for the merchandise upon delivery' mod='cashondelivery'}

<br style="clear:both;" />

</a>

</p>

{/if}

Edited by lui1969 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...