Join our new community forum for support & discussion

Join Now

Home Support Themes TaskHive Listing categories

Listing categories

  • Author
    Posts
  • DDV

    Hi guys. Is there any way I can restrict access to certain categories.
    For example. A service seller, when registering, has filled in the category attributes corresponding to his services, which I have defined for registration and I want that when the seller creates a service ad, he can select only those categories, which he has marked when filling in his profile. Thank you very much 🙂

    DDV

    Guys, and really missing links in the registration modal window to the terms of use and privacy policy. At the bottom under the register button. And if you work with the direct seller registration link, on this page too, under the registration form. Help add, I hope the snippet is enough for that? Thank you so much for your support.

    DDV

    To the second question. I insert the snippet in the header all right:

    add_filter(
    	'hivepress/v1/forms/user_register',
    	function( $form ) {
    		$form['header'] = 'custom content here';
    
    		return $form;
    	},
    	1000
    );

    But when I write it in the footer, everything in the footer disappears.

    ihor developer

    Hi,

    1. It’s possible, but requires code customizations. If you’re familiar with customizations please try using the hivepress/v1/forms/listing_submit/errors hook to add custom validation rules for the listing submission form.

    2. Please try using the built-in terms option, you can select the terms page in HivePress/Settings/Listings/Submission section. If you want to add custom content to the form footer try to concatenate it this way:

    $form['footer'].='custom content here';

    DDV

    Thx, Ihor.
    Sorry guys for the many questions, I am actively reviewing and finalizing my project, so there are a lot of small bugs that I left for later.
    One more question, it’s not quite clear about the moderation function, when a seller edits an already working listing it is automatically corrected and published. I would like to get ads that are edited for moderation, even if they have already been approved before.

    DDV

    And I previously set the snippet that would be the price of the ad would be at least 35 for example. But the snippet does not work, when filling the ad can put any price below 35

    add_filter(
    	'hivepress/v1/models/listing/attributes',
    	function( $attributes ) {
    		if ( isset( $attributes['price'] ) ) {
    			$attributes['price']['min_value'] = 15;
    		}
    
    		return $attributes;
    	},
    	1000
    );
    ihor developer

    You can try this one instead:

    add_filter(
    	'hivepress/v1/models/listing/attributes',
    	function( $attributes ) {
    		if ( isset( $attributes['price'] ) ) {
    			$attributes['price']['edit_field']['min_value'] = 15;
    		}
    
    		return $attributes;
    	},
    	1000
    );

    It’s possible to mark specific attributes as Moderated, then any changes will be sent for moderation. Built-in attributes can be also marked as moderated but this requires code snippets.

    DDV

    Hi, Ihor. Thx, it works great.

    Can u please help me with this snippet? It will be neice.

    And it would be great to see the built-in attributes in the settings, so that those who need it could manually mark the attributes that you need to check.

    DDV

    I took a simpler route:

    add_filter(
    	'hivepress/v1/forms/listing_update',
    	function( $form ) {
    		$form['fields']['title']['_moderated'] = true;
    		$form['fields']['description']['_moderated'] = true;
    
    		return $form;
    	}
    );

    But want to see a path for a few specific attributes, if you can 🙂

    ihor developer

    Thanks, we’ll try to add some solution to customize the built-in fields without code snippets.

Viewing 10 posts - 1 through 10 (of 10 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.