Jump to content
Sign in to follow this  
Sergio

How to modify viewinvoice.tpl?

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

Share this post


Link to post
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).

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thankyou Adam,

I will ask WHMCS how much they charge for this.

 

Regards,

Sergio

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thankyou Matt,

appreciated, it worked perfectly.

 

Regards,

Sergio

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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