External Link to Upgrade a listing
This topic contains 9 replies, has 3 voices, and was last updated by Alex Rollin 7 years, 5 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
January 18, 2018 at 5:24 pm #413315
I’m trying to setup some automated emails to business owners who list their own businesses in my directory.
I would like to include in that email a link that can be clicked by the business owner and will take them to the upgrade page.
From the page the link looks something like this:
domain.com/add-listing/?pid=######&package_id=1In my email system I have the listing’s permalink but not the PID. So I have a link like this:
domain.com/places/united-states/region/city/category/placename/This link doesn’t work:
domain.com/places/united-states/region/city/category/placename/&package_id=1Is there a way to make this work?
January 18, 2018 at 5:48 pm #413320Hello Jacob,
are you using the listing owner’s WP account email (capture during registration?), or the email associated with the listing?
January 18, 2018 at 6:02 pm #413322The email associated with the listing.
January 18, 2018 at 6:23 pm #413324Hello!
Thanks for writing back.
The short answer is that the post_id is available in the listing export. If you export the listings, you will have both the post_id and the email in one place. You would also have the address and category information, and so could conceivably even rebuild the permalink from the listing export CSV.
On the side of customization, I had several thoughts, but they are only ideas about how to proceed on your own or with a developer because it is outside what we can do here in support.
First, if you don’t want to go through the process of regularly merging that post_id information into your external database, you should look at making sure that the post_id is captured into your system, as the permalink does not have some intrinsic relationship to the post_id.
Second, if you wanted to use the listing owner’s wp account email, then you would need to look into running a SQL query or making an API connection.
You make a good point that we will keep in mind as we consider future email features for future versions.
Let me know if I missed something in your question, or if you want to ask it another way that might help us find a different solution.
January 18, 2018 at 6:37 pm #413330I think you misunderstood my question. I do not need help exporting the data. I’ve already built a custom plugin to push the data to my email solution. I understand that I could add to or tweak that customization to push the Post_id out to the email solution as well… but without doing that is there a way to provide a URL to the business owner via email that they can click that takes them directly to the upgrade page using the listing’s permalink?
January 18, 2018 at 7:15 pm #413338Hello!
I’m sorry I wasn’t more clear. You have the correct link structure:
domain.com/add-listing/?pid=######&package_id=1
In fact, [#post_id#] is an optional replacement tag for GD notiications.
For the second link, to make this work? I will consult with the team:
domain.com/places/united-states/region/city/category/placename/&package_id=1
Thanks
January 18, 2018 at 7:36 pm #413345Thanks Alex. Making that work as an alternative is what I’m going for.
January 19, 2018 at 6:30 am #413404Hi Jacob,
Use following code to get upgrade listing url by using listing ID & package ID.
$post_ID = '47'; // REPLACE POST ID $package_ID = '5'; // REPLACE PACAKAGE ID $upgrade_url = geodir_getlink( get_permalink( geodir_add_listing_page_id() ), array( 'pid' => $post_ID, 'package_id' => $package_ID ), false );
The variable $upgrade_url will retrieve upgrade url like https://MYSITE.com/add-listing/?pid=47&package_id=5
Thanks,
KiranJanuary 19, 2018 at 5:07 pm #413478Sounds like there isn’t a way to achieve what I’m asking for. Thanks for the suggestions.
January 20, 2018 at 12:15 am #413527Hello!
It would be a customization, but you could install a redirection plugin, and load in the upgrade URLs as the destination for the link structure you mentioned.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket