Jump to content

How to modify viewinvoice.tpl?


Sergio

Recommended Posts

Hi to all,

a new member here, hope you can help me out with this question.

 

I use 2checkout for my customers, most of them are spanish people and I will like to show the 2checkout web page in Spanish.

 

Showing 2checkout in spanish just requires to add the following command to the order line "&lang=sp" (without the quotes).

 

So, what do I need to add in the viewinvoice.tpl so that the $params or $code variables could include this command?

 

TIA

Link to comment
Share on other sites

Thankyou Adam,

I sent a ticket about this a few weeks ago here is the answer that I got:

 

" You could do this with a custom template modification to the viewinvoice.tpl template file or alternatively you could pay for us to do this. Alternatively, after going to 2CheckOut, your customers can just click on the spanish flag at the top of the page to get the spanish version."

 

That is why I want to know how to modificate the viewinvoice.tpl. On the other hand, I cann't ask to every one of my customers to click on the SPANISH FLAG in 2checkout, it will be time consuming and the worst is that there is no Spanish Flag there.

 

And paying just for adding this simple command I think is kind of not fair (I really don't want to sound rude).

Link to comment
Share on other sites

Thankyou Adam,

I sent a ticket about this a few weeks ago here is the answer that I got:

 

" You could do this with a custom template modification to the viewinvoice.tpl template file or alternatively you could pay for us to do this. Alternatively, after going to 2CheckOut, your customers can just click on the spanish flag at the top of the page to get the spanish version."

 

That is why I want to know how to modificate the viewinvoice.tpl. On the other hand, I cann't ask to every one of my customers to click on the SPANISH FLAG in 2checkout, it will be time consuming and the worst is that there is no Spanish Flag there.

 

And paying just for adding this simple command I think is kind of not fair (I really don't want to sound rude).

 

Hey,

 

The add-on is not the simple. Because the way the system is encoded, their are two ways WHMCS handles 2CheckOut.

 

1) Via a URL

[url]https://2checkout.com/2co/buyer/purchase?sid=XXXXXX[/url]
&product_id=XXXXXX&quantity=1&demo=Y&lang=sp

 

 

2) Via a Button

<form action=’[url]https://www.2checkout.com/2co/buyer/purchase’[/url] method=’Post’>
<input type=’hidden’ name=’sid’ value=’XXXXXX’>
<input type=’hidden’ name=’product_id’ value=’XXXXXX′>
<input type=’hidden’ name=’quantity’ value=’1′>
<input type=’hidden’ name=’demo’ value=’Y'>
<input type=’hidden’ name=’lang’ value=’sp’>
<input type=’submit’ name=’Buy from 2CO’>
</form>

 

Now, when you open up viewinvoice.tpl because WHMCS handles many different gateways you are not going to see that, but instead

 

{$paymentbutton}

 

 

If your only payment gateway is 2CheckOut, then this will be a little easier, all you need to do is replace XXXXXX with the correct options. (IE running a database query).

 

I suggest that you hire WHMCS to add the option in for you, as its not that simple.

 

From,

Adam

Link to comment
Share on other sites

  • WHMCS CEO

It really is quite easy to add this by editing the template. Simply replace:

{$paymentbutton}

with:

{$paymentbutton|replace:'</form>':'<input type="hidden" name="lang" value="sp"></form>'}

Matt

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