• Resolved walid91

    (@walid91)


    Hi,

    I would like to upgrade my site with a directory.

    I made a first test and I have a problem with the form.

    For example, I want to list the different hospitals in the region.

    I don’t need the price field to be present.

    I would also like to reorganize the different fields.

    Is this possible?

    Thank you.

Viewing 15 replies - 1 through 15 (of 28 total)
  • Plugin Support Ali Akbar Reyad

    (@alireyad)

    Yes, we have settings to enable/disable price and also possible to reorganize fields but need to customize to reorganize listing form.

    Thank You

    Thread Starter walid91

    (@walid91)

    Hi,

    Regarding the deactivation of the price, I think you are referring to settings / moderation / Hide form fields / price, am I right?

    The problem is that I also have a classifieds site and it is impossible to remove the price, you understand.

    So I would like to keep the price for the classifieds ads and remove it for the directory.

    Thank you.

    • This reply was modified 2 years, 7 months ago by walid91.
    Plugin Support Ali Akbar Reyad

    (@alireyad)

    Yes, you are right. In that case, you can disable price during post ad https://prnt.sc/UpA8xaPRmRaw
    On the other hand, you can disable price for specific ‘Ad Type’ or ‘Category’ by customize it.

    Thank You

    Thread Starter walid91

    (@walid91)

    Hi,

    I don’t want to disable the price for ads, but just for one type of ad.

    Let’s forget about the classified ads since I don’t want to make any changes.

    How do I disable the price for an ad type?

    Thank you for your help.

    Plugin Support Ali Akbar Reyad

    (@alireyad)

    You have to override listing from template. Modify this template using child theme plugins\classified-listing\templates\listing-form\information.php

    Add condition for this ad type in line 54 https://prnt.sc/mi7vUw5gRQFw

    Thank You

    Thread Starter walid91

    (@walid91)

    Hi,

    I did several tests with my staging site and it appears a fatal error.

    Should I put the type of ad or the name of the category instead of “needle”?

    Please look here:

    https://ibb.co/0DdPfp1

    https://ibb.co/1svy2ZJ

    https://ibb.co/CMpTXR9

    Did I make a mistake?

    Plugin Support Ali Akbar Reyad

    (@alireyad)

    Yes, you did mistake to write code.

    First, you have to retrieve ad type using slug then need to add condition. We stored ad type in option table.

    Thank You

    Thread Starter walid91

    (@walid91)

    Hi,

    I tried but I don’t understand the steps.

    If you can detail more.

    I know it may look like customization but it will prevent me from installing another plugin.

    Thank you.

    Plugin Support Ali Akbar Reyad

    (@alireyad)

    Okay. You can target one if category ‘bibi’ exist under ad type ‘bia’
    Will I write code to disable price for ad type ‘bia’?
    https://ibb.co/0DdPfp1

    Thread Starter walid91

    (@walid91)

    Hi,

    Small precision concerning :

    I know it may look like customization but it will prevent me from installing another plugin.

    This concerns the directory, regarding the classified ads I still use your plugin.

    Okay. You can target one if category ‘bibi’ exist under ad type ‘bia’
    Will I write code to disable price for ad type ‘bia’?
    https://ibb.co/0DdPfp1

    Still not understood, too bad.

    Plugin Support Ali Akbar Reyad

    (@alireyad)

    Please, follow below steps to achieve it –

    1. Copy this template from plugins/classified-listing/templates/listing-form/information.php
    2. Paste it in themes/your-child-theme/classified-listing/information.php
    3. Replace 54 no line with this https://codeshare.io/vwp4oL https://prnt.sc/_k27T02qgDdh

    Thank You

    Thread Starter walid91

    (@walid91)

    Hi,

    Indeed, with the code you sent, the price is disabled with a specific category.

    I had not understood that it was necessary to rewrite the code, something I do not have the ability to do.

    Last question: if I want to add several categories for which I want to deactivate the price should I write :

    <?php if ( ‘bia’ , ‘other category’ !== $selected_type && !in_array( ‘price’, $hidden_fields ) ):

    or

    <?php if ( ‘bia’ !== $selected_type && !in_array( ‘price’, $hidden_fields ) ):
    <?php if ( ‘other category’ !== $selected_type && !in_array( ‘price’, $hidden_fields ) ):

    Or neither of them.

    Thank you.

    • This reply was modified 2 years, 6 months ago by walid91.
    Plugin Support Ali Akbar Reyad

    (@alireyad)

    No, your code will not work. You have to know code to do it.

    It will work for all category which is under ad type ‘bia’, don’t need to modify mentioned above code.

    Thank You

    Thread Starter walid91

    (@walid91)

    Hi,

    I made a mistake in the question, I meant to say:

    Last question: if I want to add several Listing Types
    for which I want to deactivate the price should I write :

    <?php if ( ‘bia’ , ‘other Listing Types’ !== $selected_type && !in_array( ‘price’, $hidden_fields ) ):

    or

    <?php if ( ‘bia’ !== $selected_type && !in_array( ‘price’, $hidden_fields ) ):
    <?php if ( ‘other Listing Types’ !== $selected_type && !in_array( ‘price’, $hidden_fields ) ):

    Thank you.

    • This reply was modified 2 years, 6 months ago by walid91.
    • This reply was modified 2 years, 6 months ago by walid91.
    • This reply was modified 2 years, 6 months ago by walid91.
    • This reply was modified 2 years, 6 months ago by walid91.
    Plugin Support Ali Akbar Reyad

    (@alireyad)

    For multiple types, will write following way https://codeshare.io/vwp4oL (see line 4 and 7) https://prnt.sc/Ir5zvagfgQLE

    Thank You

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘Directory field’ is closed to new replies.