+ Reply to Thread
Results 1 to 9 of 9

Thread: Price at Top of Ad Description

Hybrid View

  1. #1
    Member
    Join Date
    Jun 2018
    Location
    Brazil
    Posts
    32

    Price at Top of Ad Description

    Hello everyone,

    I would like to know how I can put another type of field created by me so that it appears at the top of the ad description and appears in the ad listing.
    I have 3 more fields with the name "price", but only the field that was created at installation appears.
    How can I make another field created by me appear at the top of the description?

    How to make another created field appear here in place of this value, for example "Consult Price"?


    I send a screenshot of the screen for viewing.

    Thanks to all friends on this forum.

    tela-forum4.jpg

  2. #2
    Guru
    Join Date
    Jul 2019
    Location
    Australia
    Posts
    657
    hello carlos,

    think you can only do that with a customization request.

  3. #3
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello,

    It will require modifications in the code,

    go to templates > your_template > tpl > blocks > featured_item.tpl

    replace at the bottom:
    Code:
    Only registered members can view the code.
    with:
    Code:
    Only registered members can view the code.
    where PRICE_FIELD_KEY is the key of your price field

  4. #4
    Member
    Join Date
    Jun 2018
    Location
    Brazil
    Posts
    32
    Hi Rudi,

    Thanks for your response. But actually, I want it to appear on every listing, whether it's featured or not.

    What template do I have to change?

    I believe it is in another file in the bloks folder with the .tpl extension, correct?

    Thanks
    Last edited by Carlos Velho; June 14, 2021 at 03:17 PM.

  5. #5
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    You also need to modify listing.tpl from 'blocks' directory:

    replace:
    Code:
    Only registered members can view the code.
    with:
    Code:
    Only registered members can view the code.
    also, replace the line above:
    Code:
    Only registered members can view the code.
    with:
    Code:
    Only registered members can view the code.
    instead of PRICE_FIELD_KEY insert the key of your price field

  6. #6
    Member
    Join Date
    Jun 2018
    Location
    Brazil
    Posts
    32
    Hi Rudy,

    I've made the above changes, but what happens now is that only the first digit without the currency symbol is showing.

    The value above the ad description page is also not appearing. I send a screenshot of the screens below.

    Thanks in advance for the help

    tela-forum5.jpg

    tela-forum6.jpg

  7. #7
    Member
    Join Date
    Jun 2018
    Location
    Brazil
    Posts
    32
    hello friend Rudi

    Thank you very much once again.

  8. #8
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello,

    This solution is only for listing boxes and browse page

    for the details page you need to apply the following code in tpl > controllers > listing_details.tpl

    below the line <!-- price tag -->

    add:
    Code:
    Only registered members can view the code.
    note that your price field should be in common group otherwise, replace the common with your group key


    then go to includes > classes > rlListings.class.php > public function getListingDetails > below the line // assign price tag value and hide it

    add:
    PHP Code:
    Only registered members can view the code

  9. #9
    Member
    Join Date
    Jun 2018
    Location
    Brazil
    Posts
    32
    Hi Rudi,

    Thanks for the info. I made the changes and the price field for the new ad type I believe will now be shown on the ad details page.

    Only on the navigation page of the ads, the value is not appearing in the correct format, only the first digit.

    Example: "R$ 890.000", appears as "8".

    See print.


    Attachment 4235


    Thanks

+ Reply to Thread