I'm working on a website which serves as a clearinghouse for our internal users. The warehouse will post materials available and logged-in users can request items directly from the post. I love the plugin and it will work well, but I'm trying to figure out a way to automate the requests.
Ideally, I'd like to be able to add a button to the ad which allows the user to request the item directly. It would post an automated message to the site admin and kick off the provisioning process and mark the ad as sold.
I don't think this is something that is available in one of the premium modules, so would there be a recommended way of making this enhancement? I could add a hook to the site functions for any ads that load to add the button, but I wanted to see if there was another option I should consider.
Thanks for a great plugin!
September 4, 2013
Thank you for your post and kind words about AWPCP!
As you may have heard, we have been working on bringing AWPCP up to date as a custom post type, which will allow a lot more developer freedom with the plugin. 4.0 is slated to be released in a few short weeks!
While this won't solve the issue you have right now, it does bring us one step closer to adding that functionality. We have been wanting a marketplace-type module for a while, and we have been working steadily toward it.
So, for right now, this would have to be something you develop. Here's an article to help you if that's the path you decide to take:
One more question:
Thanks for the link to the filters. I started playing with those and I think I can use a combination of a `placeholder` filter to add a new element using a callback. Is that the track you'd take? Or would I be better off modifying the listing template directly rather than writing a callback?
September 4, 2013
Thanks for the follow up questions. I wouldn't recommend changing the listing template directly at this point, but since I am not a developer, let me ask one and see if they can provide a better answer here. I'll post here again once I hear back.
September 4, 2013
Thanks for your patience here.
I just heard back from the developer regarding the issue you reported, and here is what he said:
I started playing with those and I think I can use a combination of aplaceholder
filter to add a new element using a callback. Is that the track you'd take? Or would I be better off modifying the listing template directly rather than writing a callback?
Using a custom placeholder seems a good approach to me. That would give them more control about where to show the button using the template settings for the Listings and Single Ad pages. The callback also gives the developer more flexibility to integrate with the other sections of the website.
Based on what I read on the forum, I think I would use the custom placeholder to render a small form that has a submit button and several hidden fields with the information necessary to record the request and kick off the provisioning process.
Then I would add a handler for the
action that checks for the presence of the hidden fields, process the request for the item and then redirects the user back to the page of the ad.
Would that also allow something like Advanced Custom Fields to be used to extend functionality?
Unfortunately, I haven't tried using Advanced Custom Fields with our new post types implementation, so I can't give a concrete answer, but I would expect both plugins to be compatible now. The integration, however, likely requires the Display listings on their own page option to be on (See Settings > Classifieds > SEO in AWPCP 4.0.0).
Most Users Ever Online: 426
Currently Browsing this Page:
Johnny B: 140
NAIN KHAN: 93
Patrik R: 76
Guest Posters: 37
Newest Members:Dawna Eoff, Minnie Howerton, Marita Reaves, Benito Van De Velde, Joey Rodarte, Latasha Heydon, Jolene Thibeault, Lupita Alba, Flossie Meeson, pokeronlineuangasli
Moderators: awpcp: 7530, AWPCP Support: 6123, Bobbie Devereux: 3
Administrators: wpengine: 0, awpcp: 300