Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues where specific price options (like 2000€, 5000€, etc.) appear on the EN landing page but not on the translated DE, FR, IT pages in a site using the Houzez theme, the issue might be related to JavaScript handling in the theme.
Solution:
We recommend trying the following steps after ensuring you have a full site backup:
1) Navigate to the

wp-content/themes/houzez/js

folder.
2) Open the

custom.js

file for editing.
3) Locate line 1963.
4) Update the JavaScript function from:

var property_status_changed = function(prop_status, $form) { 
     
    if( prop_status == for_rent ) { 
        $form.find('.prices-for-all').addClass('hide');
        $form.find('.prices-for-all select').attr('disabled','disabled');
        $form.find('.prices-only-for-rent').removeClass('hide');
        $form.find('.prices-only-for-rent select').removeAttr('disabled','disabled');
        $form.find('.prices-only-for-rent select').selectpicker('refresh');
    } else {  
        $form.find('.prices-only-for-rent').addClass('hide');
        $form.find('.prices-only-for-rent select').attr('disabled','disabled');
        $form.find('.prices-for-all').removeClass('hide');
        $form.find('.prices-for-all select').removeAttr('disabled','disabled');
        $form.find('.prices-for-all select').selectpicker('refresh');
    }
}

To:

var property_status_changed = function (prop_status, $form) {
    if (prop_status === 'for-rent') { // Ensure comparison is with correct value
        $form.find('.prices-for-all').addClass('hide');
        $form.find('.prices-for-all select').prop('disabled', true);
        $form.find('.prices-only-for-rent').removeClass('hide');
        $form.find('.prices-only-for-rent select').prop('disabled', false).selectpicker('refresh');
    } else {
        $form.find('.prices-only-for-rent').addClass('hide');
        $form.find('.prices-only-for-rent select').prop('disabled', true);
        $form.find('.prices-for-all').removeClass('hide');
        $form.find('.prices-for-all select').prop('disabled', false).selectpicker('refresh');
    }
};

5) Clear all types of caches.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 26 replies, has 3 voices.

Last updated by markusP-25 1 month ago.

Assisted by: Bigul.

Author Posts
October 23, 2024 at 4:49 pm #16322828

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. Copying this code will not help to fix the issue. So we have to make sure whether it is showing the expected results (without clicking the *For Sale* tab) when WPML is inactive or not. Refer to the following screencast for more details.

hidden link

--
Thanks!

Bigul

October 24, 2024 at 2:47 pm #16327041

markusP-25

Hi Bigul!
I have deactivated all WPML plugins. It's the same "error" as in your video.
I have now activated WPML plugins again.

October 24, 2024 at 3:51 pm #16327368

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the feedback. Can you please check about this with Houzez support? It looks like a conflict in the theme settings and it happens without WPML also. We hope it may help us to track the bug.

--
Thanks!

Bigul

October 28, 2024 at 10:53 am #16337236

markusP-25

OK, I've forwarded everything to houzez. They're working on it. I'll let you know as soon as I have feedback.

October 28, 2024 at 2:08 pm #16338080

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. Take your time. We will wait for your feedback.

--
Thanks!

Bigul

November 4, 2024 at 7:53 am #16359058

markusP-25

Please do not close the case yet. Houzez is still working on the case. Thanks

November 4, 2024 at 8:37 am #16359246

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the information. I am changing the ticket status. So it will not be closed.

--
Thanks!

Bigul

November 4, 2024 at 5:29 pm #16362739

markusP-25

For your info. Houzez wrote back to me today: There is problem with WPML, I have sent them an email and waiting their reply.

November 5, 2024 at 4:23 am #16363980

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. Please share the details or request the Houzez team to contact our compatibility team.

--
Thanks!

Bigul

November 8, 2024 at 12:10 pm #16381856

Waqas Riaz

Hi Bigul,

This is Waqas from the Houzez team.

We’re currently retrieving the property status from the theme options (Redux Framework) using the key "search_rent_status". Here’s a link to the setup of wpml-config.xml: hidden link

The issue arises when switching languages—the key doesn't return the term ID for the other language. For instance, in English, the term ID is 10, and its equivalent in Spanish is 11. However, this key only returns the term ID for the original language, not the corresponding translated term ID.

Could you help us address this issue?

Thanks in advance for your assistance.

Best regards,
Waqas

November 11, 2024 at 5:47 am #16386589

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Waqas,

Thank you for the feedback. I have shared it with our team and we will get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

November 20, 2024 at 4:59 pm #16425822

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

We are getting the expected results in our local copy after the following steps. So please try it as a workaround after a full site backup and let us know your feedback. Refer to the attached images for more details.

1) Go *wp-content/themes/houzez/js* folder
2) Open the file *custom.js* for edit
3) Scroll down to line 1963
4) Make the following changes and save it

From

    var property_status_changed = function(prop_status, $form) { 
        
        if( prop_status == for_rent ) { 
            $form.find('.prices-for-all').addClass('hide');
            $form.find('.prices-for-all select').attr('disabled','disabled');
            $form.find('.prices-only-for-rent').removeClass('hide');
            $form.find('.prices-only-for-rent select').removeAttr('disabled','disabled');
            $form.find('.prices-only-for-rent select').selectpicker('refresh');
        } else {  
            $form.find('.prices-only-for-rent').addClass('hide');
            $form.find('.prices-only-for-rent select').attr('disabled','disabled');
            $form.find('.prices-for-all').removeClass('hide');
            $form.find('.prices-for-all select').removeAttr('disabled','disabled');
            $form.find('.prices-for-all select').selectpicker('refresh');
        }
    }

To

var property_status_changed = function (prop_status, $form) {
    if (prop_status === 'for-rent') { // Ensure comparison is with correct value
        $form.find('.prices-for-all').addClass('hide');
        $form.find('.prices-for-all select').prop('disabled', true);
        $form.find('.prices-only-for-rent').removeClass('hide');
        $form.find('.prices-only-for-rent select').prop('disabled', false).selectpicker('refresh');
    } else {
        $form.find('.prices-only-for-rent').addClass('hide');
        $form.find('.prices-only-for-rent select').prop('disabled', true);
        $form.find('.prices-for-all').removeClass('hide');
        $form.find('.prices-for-all select').prop('disabled', false).selectpicker('refresh');
    }
};

5) Clear all types of caches

--
Thanks!

Bigul

November 21, 2024 at 6:40 pm #16430809

markusP-25

Hi Bigul!
Thanks, now I finally have the correct amounts on the translated pages. I did have to change the amounts in the strings again, but then it worked. Thanks for all the support.
Best Regards