+ Reply to Thread
Results 1 to 9 of 9

Thread: How to retrieve the final link of added listing

  1. #1
    Junior Member
    Join Date
    Jan 2017
    Posts
    10

    How to retrieve the final link of added listing

    Hey guys

    I need to retrieve the final link of the new added listing at the last step of 'Add a listing' procedure.
    I mean the last step of this page: "https://classifieds.demoflynax.com/add-listing.html", basically it should be accessible from this file: "/templates/general_wide/tpl/controllers/add_listing.tpl"

    That should be actually the URL of the item which is just successfully added. For example something like this URL: https://classifieds.demoflynax.com/c...-64gb-222.html

    I need it for implementing a share button to make people able to share the listing on Facebook just after uploading.

    Thank you for your help.

  2. #2
    you need just ID, url can be built using ID. so question is how to print ID.

  3. #3
    Junior Member
    Join Date
    Jan 2017
    Posts
    10
    I found the ID, but is there any function to generate the URL from ID?

  4. #4
    did you try, any text, like listing-ID.html will redirect to full url.

    so ANYTEXT-{id}.html should work

    if know listing type (listing type path), for example www.yoursite.com/listings/anytext-ID.html

    Which other variables you can get from add listing page?

    In email templates (for message that user get after submitting listing) {link} will print url of listing.
    Last edited by Kenan Mahmutovic; August 17, 2018 at 08:05 PM.

  5. #5
    Guru
    Join Date
    Jan 2013
    Location
    Australia
    Posts
    2,026
    How to retrieve the final link of added listing ? there is an email sent after a listing has been added / approved with the link in it, and with social media buttons on the page they would be able to click the link in the email and share.


    It would be impossible to share the post before it was approved anyway I would guess because it would not be live. but may be wrong on that?

  6. #6
    How about we add the link of the listing that we just added to the final step "Done"
    Something like:
    Your listing has been added successfully, you can view it by clicking here.

  7. #7
    Guru
    Join Date
    Jan 2013
    Location
    Australia
    Posts
    2,026
    Quote Originally Posted by Wei Hong View Post
    How about we add the link of the listing that we just added to the final step "Done"
    Something like:
    Your listing has been added successfully, you can view it by clicking here.
    there is a post here some where that describes this ? I will see if I can find it for you

    http://forum.flynax.com/showthread.p...d-Listing-Page
    Last edited by Pete Young; August 19, 2018 at 12:51 PM.

  8. #8
    Junior Member
    Join Date
    Jan 2017
    Posts
    10
    I just found it. In the file "\includes\controllers\add_listing.inc.php"

    Find this line:
    case 'done':// the last step

    There you just need to assign the URL to smarty var:

    $rlSmarty -> assign_by_ref('listing_link', $reefless->url('listing', $listing_id));

  9. #9
    I love you both Pete and Sam. Thank you

+ Reply to Thread