! I use WPML on my website and I want to have an "pro

Hi !

I use WPML on my website and I want to have an "pro sites" upgrade page in english (main language) and in french (second language).

Right now, I have a page (called "Booster") which handle the upgrade process with an url like this http://mysite.com/booster/?bid=1 . If I create a page which is the traduction of this page, I have an empty page in french (I have my header and my footer, but not my content with the checkout paypal etc...)

Could you please help me ?

Thanks !

  • Jack Kitterhing
    • Code Norris

    Hi there Noomla,

    Hope you're well today and thanks for your question.

    I've checked and Pro sites isn't WPML compatible, this is mainly because the URL is relied upon from Pro sites to output the checkout page correctly.

    I have flagged one of our developers to see if anything can be one at all, if not we can of course make this a feature request. :slight_smile:

    Thank you!

    Kind Regards
    Jack.

  • Hoang Ngo
    • Code Slayer

    Hi there Noomla,

    I hope you are well today and sorry for the delay.

    I will need more information to have a closer look, can you please send in:

    - Mark to my attention - ATTN: Hoang Ngo
    - Link back to this thread
    - Include admin/network access
    - Include cPanel (I will need to look at the DB so need PHPMyAdmin or similar)
    - Include FTP
    - Include any relevant URLS for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    Best regards,
    Hoang

  • Hoang Ngo
    • Code Slayer

    Hi @Noomia,

    Thanks so much for your information. I've checked and we can do the translate for the checkout page using custom code and string translate plugin. Unfortunately, we will need to modify the core code, and that's mean, every time you update the plugin, you will need to bring it back.

    I will notice the lead developer about the WPML integration, so he can consider this feature for future release.

    And now here is step by step to do the translate.
    1. Please go to ProSite setting page, you will see the Checkout Page option, please click on the link "Edit Checkout Page » ". It will redirect you to the current checkout page, please create a France version of this page and remember the page id.
    2. Now, in the file pro-sites/pro-sites.php, line 758, you will see the code look like this

    //check if on checkout page
    		if (!$this->get_setting('checkout_page') || $queried_object_id != $this->get_setting('checkout_page')){
    			return;
    		}

    Please update to

    $checkout_id = $this->get_setting('checkout_page');
    		if(ICL_LANGUAGE_CODE=='fr'){
    			$checkout_id = 'YOUR FR CHECKOUT PAGE ID';
    		}
    		//check if on checkout page
    		if (!$checkout_id || $queried_object_id != $checkout_id){
    			return;
    		}

    Please replace the "YOUR FR CHECKOUT PAGE ID" with the step 1 Page ID.
    3. From now, you are having the France Checkout Page, you can use the WPML string translate to translate the texts :slight_smile:

    If you have any issues please don't hesitate to let us know so we can assist

    Best regards,
    Hoang

  • Jean
    • The Crimson Coder

    Hi, this code doesn't exist anymore
    What I find similar to this :
    l. 1087 : $page = get_post( $this->get_setting( 'checkout_page' ) );

    I have a french checkout page. I created an English translation, post id 433

    I added this :

    $page = get_post( $this->get_setting( 'checkout_page' ) );
    		/* add */
    		if(ICL_LANGUAGE_CODE=='en'){
    			$page = get_post(433); // pages "Plans" (Offres EN) id 433
    		}
    		/* end add */

    But it doesnt work, checkout English page is still empty :slight_frown:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.