Hi,
I have 2 different listing types (CPTs). I have multiple pricing plans for each listing type. But each listing type has identical pricing plans.
For example, I have “gd_place” and “gd_education”
Each of these has pricing packages:
Free
Standard
Gold
Platinum
The costs of each of these packages is identical across the post types (i.e. gd_place Standard is the same price as gd_education Standard).
I am creating a pricing/features table for the Add Listing page. I found this thread:
https://wpgeodirectory.com/support/topic/select-package-price-board-image/
which is very helpful.
However, I’m wondering if there’s a way that, for the selection link in the table (e.g. yourdomain/add-listing/?listing_type=gd_place&package_id=1 ), I can get the listing_type value from the URL parameter passed when the user selects the “Add Listing” type from the drop-down.
So that, when a user selects to Add a Place listing, and they are directed to:
yourdomain/add-listing/?listing_type=gd_place
I’d like to code the table select link so that the listing_type parameter in the select link is populated by the URL parameter.
It looks like I can play around with something similar to what’s discussed here:
http://stackoverflow.com/questions/3508450/how-to-grab-url-parameters-using-php
It seems that what I’ll need to do is:
1. Get the listing_type value from the URL
2. Plug that into the pricing table’s select link
3. Do a series of checks, so that I can specify the correct package_id for the given pricing level (e.g. if listing_type=gd_place then package_id=1, if listing_type=gd_education then package_id=5)
I understand that this might be more customization than is normally supported. But I just want to confirm that I would basically need to edit/add this coding to the geodirectory/geodirectory-templates/add-listing.php page, correct?
I understand that if I edit this page, that if/when the plugin is updated, I would likely need to redo my edits.
Is this the best way to handle this, or can you think of a better/easier/more streamlined way?
Thanks!