Changing The category of the ad in "Edit ad" page | Support Questions | Support Forum

A A A

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Changing The category of the ad in "Edit ad" page
August 12, 2015
10:23 am
nbjseoled
New Member
Members
Forum Posts: 1
Member Since:
July 3, 2015
sp_UserOfflineSmall Offline

Hello There! 

I got a question. is possible to enable a way to change the category of the ad in the "Edit Ad" Page? That thing because some users when edit their posts want to change it. In the settings i don't find a way, i suppose i have to modify the plugin. if you can give me some guidance, i will appreciate it.

Thank you!

August 13, 2015
1:27 pm
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5236
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi nbjseoled,

There are reasons why we don't allow for those now. The category is tied to the fee plan, so if we allow users to change it after placing the ad, they would be able to place a free ad and then switch to a paid category in some cases. Forcing the user to re-pay if they edit the category is an advanced workflow we haven't added at this point, which is why the category remains uneditable to the user. The admin can change it if there's an issue.

November 27, 2018
3:50 pm
Confused Need Help
Member
Members
Forum Posts: 11
Member Since:
July 10, 2017
sp_UserOfflineSmall Offline

Hi, I've been trying to modify page-edit-ad.php to achieve this but being a beginner I haven't worked it out yet. I believe I need to modify this part:

if ( awpcp_current_user_is_moderator() && ! empty( $data['ad_category'] ) ) {
            $category = AWPCP_Category::find_by_id( $data['ad_category'] );
            if ( ! is_null( $category ) ) {
                $ad->ad_category_id = $category->id;
                $ad->ad_category_parent_id = $category->parent;
            }
        }

There are no fees involved on my site for any category and it would be really useful to allow users to have this capability.

Any help would be appreciated.

Thanks for your time.

November 28, 2018
5:40 pm
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5236
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi Confused Need Help,

Thanks for your question. 

We only recommend hacking the plugin if you have advanced (key word) HTML, PHP and WordPress API skills.

Hacking the plugin comes with it's own risks and complications--like the fact that any changes you make can break other aspects of the plugin and any issues you have need to be tested against an unmodified plugin for support. If you can reproduce on the unmodified plugin, we can fix it. But any updates or changes have to be maintained by you in your custom version. It's a pretty big hassle.

It would not be recommended for a beginner to do this because it's never as simple as one might think.  Disabling something in one place will likely lead to other things breaking in ways that aren't easy to understand without debugging skills.

If you'd like to proceed with that and have the right skill set, you can learn more about that here: http://docs.businessdirectoryp.....ation.html However, that's the main scope of support we offer for hacking the plugin. 

November 29, 2018
3:45 am
Confused Need Help
Member
Members
Forum Posts: 11
Member Since:
July 10, 2017
sp_UserOfflineSmall Offline

Thanks for your response.

Forum Timezone: America/Denver

Most Users Ever Online: 163

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Johnny B: 140

godie: 120

kerdezo: 99

laburke: 94

NAIN KHAN: 93

salvig67: 84

rude: 72

purplepaula: 72

WAYTOBAYWTB52: 71

gery: 71

Member Stats:

Guest Posters: 31

Members: 37917

Moderators: 2

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 6965

Posts: 31009

Newest Members:

Keto2, sonyqq, TomFors, Kara Rozendaal, Cesler Kita, Alexander Liebrecht, Shahidul Islam, NNPA Newswire, mzmsalman, Doucoure oumae

Moderators: awpcp: 7530, AWPCP Support: 5236

Administrators: wpengine: 0, awpcp: 298

Skip to toolbar