Jump to content

invoice's payment gateway


djrven

Recommended Posts

Hello, I'm insterested in tweak my invoice format editing viewinvoice.tpl file, I need to select the invoice payment gateway(invoice top-right select box) according the currency or at least I need the invoice shows only the payment method selected earlier by client, I was able to find some info at this forum specifically this code which it's intend to let us display invoice gateway according the currency used: I didn't have any success with it, if you can see any error here, I appreciate you can let me know where is it:

 

{if $allowchangegateway}

<form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}">

<select name="gateway" onchange="submit()">

{ if $clientsdetails.currency eq 1 }

<option value="linkpoint" {if $paymentmethod eq "linkpoint"} selected="selected" {/if}>Credit Card</option>

<option value="paypal" {if $paymentmethod eq "paypal"} selected="selected" {/if}>PayPal</option>

{ elseif $clientsdetails.currency eq 2 }

<option value="custom_gateway" {if $paymentmethod eq "f2b"} selected="selected" {/if}>My Custom Gateway</option>

{/if}

</select>

<br /><br />

</form>

{else}

{$paymentmethod}<br />

{/if}

 

OTHER WAY I THOUGH TO GET THAT, WOULD BE SETTING TO FALSE THE VARIABLE $allowchangegateway but believe it or not I couldn't find a way to set false its value considering I don't know anything about smarty, I tried this code with no success:

 

{assign var='allowchangegateway' value='false'}

 

// the code line before is mine, but obviously it doesn't got me any success, I was just trying to set false this variable's value so the selection box doesn't appear, it should appear only the {$paymentmethod} variable value which I believe shows the payment method already selected by client

 

{if $status eq "Unpaid"}

<font class="unpaid">{$LANG.invoicesunpaid}</font><br />

{if $allowchangegateway}

<form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}">{$gatewaydropdown}</form>

{else}

{$paymentmethod}<br />

{/if}

{$paymentbutton}

{elseif $status eq "Paid"}

<font class="paid">{$LANG.invoicespaid}</font><br />

{$paymentmethod}<br />

 

OTHER WAY WAS TRYING TO COMMENT SOME LINES, with no sucess result either! I tried to comment the following lines as you can see trying to make disappear top-right payment gateway selection box and just make appear payment method selected by client previously

 

{if $status eq "Unpaid"}

<font class="unpaid">{$LANG.invoicesunpaid}</font><br />

{* {if $allowchangegateway}

<form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}">{$gatewaydropdown}</form>

{else} *}

{$paymentmethod}<br />

{* {/if} *}

{$paymentbutton}

{elseif $status eq "Paid"}

<font class="paid">{$LANG.invoicespaid}</font><br />

{$paymentmethod}<br />

 

I guess I'm right using {* *} to comment lines, well, if you can give me an advice respect this topic I'd apprecite that! thank you! either get a payment gateway according currency or get only the payment method already selected by client on the final invoice, that's what I want! thank you in advance

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated