Jump to content

wp-load.php based on the current currency and/or language ? how to ?


marcojr

Recommended Posts

Hi Everyone !

 

In the header.tpl we have those lines to connect whmcs with WP...

 

{php}

require('../wp-load.php');

{/php}

 

Well, I've s duplicated WP in a different language, and a cart that's goes to: cart.php?a=add&pid=3&language=Portuguese-br&currency=3

 

So, Portuguese language, Brazilian Real Currency. The correct wp-load supposed to be: ../br/wp-load.php to make the menus , footer and any others header/footer elements matches the whmcs current content page.

 

I don't know how to read in the php what is the current language or currency. Any lights ?

 

ty !

Link to comment
Share on other sites

You can use {$language} as described in this thread https://forum.whmcs.com/showthread.php?27569-Getting-current-language-in-Templates

 

I believe {$currency} can be used in the same way as described here http://forum.whmcs.com/showthread.php?28385-Clarification-of-some-Template-Variable-Values

 

If you are doing this on the cart page then using $_GET['language'] and $_GET['currency'] could be a workaround

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