Strange issue with Real Estate Matching Request - Need help/advise even if paid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tarektoubia
    Junior Member
    • Aug 2024
    • 16

    #1

    Strange issue with Real Estate Matching Request - Need help/advise even if paid

    Dear Espo Users,

    I am using the Espo Real estate extension, and it is a wonderful module.

    In properties, there is Request Type field which is limited to Rent or Sale.
    I have created a new Enum Field as per the image below.
    Click image for larger version  Name:	1.png Views:	0 Size:	66.6 KB ID:	117834

    I have then used it in Options Reference in the main requestType Enum:

    Click image for larger version  Name:	2.png Views:	0 Size:	57.1 KB ID:	117835

    Now I can filter using my custom options in Properties module.

    However, In Requests, I have modified the Options Reference for the Field named TYPE to the Custom Request Type.

    Click image for larger version  Name:	3.png Views:	0 Size:	52.6 KB ID:	117836

    The issue is when I go to requests and choose a Type, the matching requests don't match the options chosen.

    Click image for larger version  Name:	4.png Views:	0 Size:	48.1 KB ID:	117837

    For Example, If I choose Residential for Sale, I get Properties listed for Sale and Rent.
    So the Type is not being used to match properties.

    I need to know if I need someone can guide me how to fix this either in the Administration or JSON files.

    Thank you.
    Last edited by tarektoubia; Yesterday, 07:52 PM. Reason: real estate
  • tarektoubia
    Junior Member
    • Aug 2024
    • 16

    #2
    I have tried to updated the below files:

    /custom/Espo/Modules/RealEstate/Tools/Property/Service.php
    /custom/Espo/Modules/RealEstate/Tools/Request/Service.php

    Line 151

    case 'Rent':
    $primaryFilter = 'actualRent';
    break;
    case 'Residential for Rent':
    $primaryFilter = 'actualRent';
    break;
    case 'Commercial for Rent':
    $primaryFilter = 'actualRent';
    break;

    case 'Sale':
    $primaryFilter = 'actualSale';
    break;
    case 'Residential for Sale':
    $primaryFilter = 'actualSale';
    break;
    case 'Commercial for Sale':
    $primaryFilter = 'actualSale';
    break;


    /custom/Espo/Modules/RealEstate/Classes/Select/RealEstateProperty/PrimaryFilters/ActualRent.php
    /custom/Espo/Modules/RealEstate/Classes/Select/RealEstateProperty/PrimaryFilters/ActualSale.php

    'requestType' => ['Sale', 'Residential for Sale', 'Commercial for Sale'],
    'requestType' => ['Rent', 'Residential for Rent', 'Commercial for Rent'],


    /custom/Espo/Modules/RealEstate/Classes/Select/RealEstateRequest/PrimaryFilters/ActualRent.php
    /custom/Espo/Modules/RealEstate/Classes/Select/RealEstateRequest/PrimaryFilters/ActualSale.php

    'type' => ['Rent', 'Residential for Rent', 'Commercial for Rent'],
    'type' => ['Sale', 'Residential for Sale', 'Commercial for Sale'],

    The Matching requests worked, But this will definitely be overwritten by the next upgrade of ESPOCRM.
    How to store those data permanently?
    Last edited by tarektoubia; Today, 07:57 AM.

    Comment

    Working...