Join our new community forum for support & discussion

Join Now

Home Support Extensions Marketplace Set the minumum price

Set the minumum price

  • Author
    Posts
  • fsimoni

    I Team,

    How do I set the price starting from € 15 instead of € 0?

    Tnx
    Federico

    yevhen developer

    If you mean listings filter form then the min/max value is based on existing listings. For example, if you add a listing with price $1 then the min range value will be set to $1 (the same for max value)

    fsimoni

    I @yevhen

    No I meant, when a seller inserts a listing, how do I set the minimum value (price) they place starting from: equal to or greater than € 15?

    The field “Price” in the extension “Marketplace” isn’t an attribute and then I can’t do any changes

    It’s clear what I mean?

    Tnx
    Federico

    yevhen developer

    Please try this PHP snippet

    add_filter(
    	'hivepress/v1/models/listing/attributes',
    	function( $attributes ) {
    		if ( isset( $attributes['price'] ) ) {
    			$attributes['price']['min_value'] = 15;
    		}
    
    		return $attributes;
    	},
    	1000
    );
Viewing 4 posts - 1 through 4 (of 4 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.