booleanbites / houzi-support

Support forum repo for issues & bugs reported for Houzi Flutter App.
4 stars 0 forks source link

Private Note Not private #114

Closed quitriz closed 6 months ago

quitriz commented 7 months ago

Hi,

We've nevever double check this private note function before, I got feed back said that people used this function but it's not working. They did put in the private note but when they saved published the properties but when they check back it's never there so they lost a lot of Notes. i double check and it's not working as well, do you have any idea what might happened ? seem like it's not recording into the mysql record cuz i tested with a sql search and not's not found as well.

      {
           "enable": true,
           "title": "Private Note",
           "allowed_roles": [],
           "page_fields": [
                {
                     "enable": true,
                     "section": "Private Note",
                     "from_fields": [
                          {
                               "api_key": "fave_private_note",
                               "enable": true,
                               "allowed_roles": [],
                               "section_type": "formTextField",
                               "term_type": "",
                               "title": "Write private note for this property, it will not display for public.",
                               "hint": "Enter the note here",
                               "additional_hint": "",
                               "performValidation": false,
                               "validationType": "",
                               "maxLines": 7,
                               "keyboardType": "multiline",
                               "field_values": null
                          }
                     ]
                }
           ]
      },

it's enable.

thank you.

MuhammadSulemanSaleem commented 7 months ago

Hi there,

I hope this message finds you well.

Follow these steps to resolve the issue:

  1. Download and open the docs.zip folder.

  2. Place the file article.dart in the PROJECT_NAME/packages/houzi_package/lib/models/article.dart.

  3. Place the file add_property_utilities.dart in the PROJECT_NAME/packages/houzi_package/lib/pages/add_property_v2/add_property_utilities.dart.

  4. Place the file houzez_parser.dart in the PROJECT_NAME/packages/houzi_package/lib/parsers/houzez_parser.dart.

  5. Open your Wordpress dashboard and then open the Plugin File Editor, Plugins > Plugin File Editor. dashboard

  6. Select the Houzi Rest Api from the 'select plugin to edit' dropdown and then click the Select button. plugin_dropdown

  7. Expand the functions dropdown and select the property_functions.php option. Now go to line # 161 and paste the following lines:

    if( isset( $_POST['fave_private_note'] ) && !empty( $_POST['fave_private_note'] ) ){
        $_POST['private_note'] =  $_POST['fave_private_note']; 
     }
    
    if (isset($_POST['fave_property_disclaimer']) && !empty($_POST['fave_property_disclaimer'])) {
        $_POST['property_disclaimer'] = $_POST['fave_property_disclaimer'];
    }
    edit_plugin
  8. Click the Update File button. update_plugin

  9. If you are using any plugin for caching (e.g. LiteSpeed Cache), don't forget to purge all the caches.

I hope this will help you resolve the issue.

quitriz commented 7 months ago

Hi, thank you, the code for the web seem working good, the message stored when I use the browser, since I couldnt compile the mobile version yet, and here is the following error:

this new code has different path which is not existed: 9c9 < import 'package:houzi_package/models/api_response.dart';

import 'package:houzi_package/models/api/api_response.dart';

after i fixed the "api" path then came this error: packages/houzi_package/lib/parsers/houzez_parser.dart:1588:26: Error: Member not found: 'UtilityMethods.printAttentionMessage'. UtilityMethods.printAttentionMessage(map["reason"]); ^^^^^^^^^^^^^^^^^^^^^ packages/houzi_package/lib/parsers/houzez_parser.dart:1650:26: Error: Member not found: 'UtilityMethods.printAttentionMessage'. UtilityMethods.printAttentionMessage(map["reason"]); ^^^^^^^^^^^^^^^^^^^^^ packages/houzi_package/lib/parsers/houzez_parser.dart:1660:48: Error: Member not found: 'UtilityMethods.extractJson'. Map<String, dynamic>? map = UtilityMethods.extractJson(responseString); ^^^^^^^^^^^ packages/houzi_package/lib/parsers/houzez_parser.dart:1668:26: Error: Member not found: 'UtilityMethods.printAttentionMessage'. UtilityMethods.printAttentionMessage(map["reason"]); ^^^^^^^^^^^^^^^^^^^^^ packages/houzi_package/lib/parsers/houzez_parser.dart:1673:26: Error: Member not found: 'UtilityMethods.printAttentionMessage'. UtilityMethods.printAttentionMessage(map["reason"]); ^^^^^^^^^^^^^^^^^^^^^ packages/houzi_package/lib/parsers/houzez_parser.dart:1685:48: Error: Member not found: 'UtilityMethods.extractJson'. Map<String, dynamic>? map = UtilityMethods.extractJson(responseString); ^^^^^^^^^^^ packages/houzi_package/lib/parsers/houzez_parser.dart:1694:26: Error: Member not found: 'UtilityMethods.printAttentionMessage'. UtilityMethods.printAttentionMessage("Error while making property featured"); ^^^^^^^^^^^^^^^^^^^^^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

I then used the old file with added partial of your code exluding these members above then i was able to compile it, but how do i view the private note? it should display to the person who create the property when he/she view it or click on the "More Detail" on the Detail section and it can be shown there too or just the end of the property as a separate line before the "Address" line part , rather than I have to view the property from my profile menu and then edit the property and click to the part of private note to see if it's record and pulled up by the mobile app. other than that, it's working .. please update

thank you

MuhammadSulemanSaleem commented 7 months ago

Hi there,

We are glad to know that your issue was resolved. Regarding the Display of Private Note on the Property Profile Page, we have checked the Front End and also we went through the Houzez documentation, we found nothing about it. We shall contact the Houzez team about this particular issue and hopefully we shall add the Private Note display option in the next release of Houzi.

AdilSoomro commented 6 months ago

The private note will be added to upcoming version. Marking this as closed. If you still need help, please open new topic.