mykyta
June 26, 2023, 5:48pm
4
Hi,
PHP snippet to remove “Add image” option in request form
add_filter(
'hivepress/v1/forms/request_update',
function( $form ) {
$form['fields']['location']['placeholder'] = 'custom text here';
return $form;
},
1000
);
add_filter(
'hivepress/v1/models/request',
function( $form ) {
$form['fields']['description']['required'] = false;
return $form;
},
1000
);
If you want to change fields, you’ll need PHP snippets: Search · user:hivepress · GitHub
If you want to override the whole template, then you’ll need to use HivePress Templates: How to customize templates - HivePress Help Center
Unfortunately, we do not use shortcodes.
It would require custom implementation.
Hope it helps.
Kindly find the attachment
How to get price option? Please explain
mykyta
June 27, 2023, 4:34pm
8
Hi,
Sorry for the confusion.
Please enable the Bidding function in the HivePress - Settings - Offers . Then the price field will be available.
Hope it helps.
Hello Again,
Bidding option is already enabled, but still price field option in not activated.
kindly find the attachment.
andrii
June 30, 2023, 2:22pm
11
Hi,
Please disable third-party plugins and customizations (if there are any) and check if this issue persists. If you use a caching plugin, make sure that caching is disabled for logged-in users.
Hello,
I did everything, but its dose-not work, please help. & i don’t have caching plugin.
also i deactivate all plugin and checked but nothing is happening.
ihor
July 3, 2023, 6:24am
13
Please send temporary WP access to support@hivepress.io with details for reproducing this issue and we’ll check it. You can create a temporary access link using this plugin Temporary Login Without Password – WordPress plugin | WordPress.org
andrii
July 3, 2023, 1:28pm
14
Hi,
Sorry for the confusion. This feature doesn’t work because you don’t have the Marketplace extension installed.
1 Like
Any snippet to add additional field on offer form? I have buy this extension because of this function, now you are asking me to buy marketplace? it was not expected. sad life
andrii
July 4, 2023, 3:15pm
20
Hi,
Please provide more details. Do you need just add a field to show the price? So, other features of the Marketplace are unnecessary?
Yes, I just want to add Price field as a primary, for my website no use of marketplace.
yevhen
July 5, 2023, 9:27pm
24
Please try this PHP code snippet
add_filter( 'hivepress/v1/models/offer', 'add_offer_fields', 1000);
add_filter( 'hivepress/v1/forms/offer_make', 'add_offer_fields', 1000);
function add_offer_fields($model){
if ( get_option( 'hp_offer_allow_bidding' ) ) {
$model['fields']['price'] = [
'label' => hivepress()->translator->get_string( 'price' ),
'type' => 'currency',
'min_value' => 0,
'required' => true,
'_external' => true,
'_order' => 5,
];
}
return $model;
}
add_filter(
'hivepress/v1/templates/offer_view_block/blocks',
function($blocks, $template){
$offer = $template->get_context('offer');
if(!$offer){
return $blocks;
}
if ( get_option( 'hp_offer_allow_bidding' ) ) {
return hivepress()->template->merge_blocks(
$blocks,
[
'offer_attributes_primary' => [
'blocks' => [
'offer_price' => [
'type' => 'content',
'content' => '<div class="hp-offer__attribute hp-offer__attribute--price">'.esc_html($offer->get_price()).'</div>',
'_order' => 10,
],
],
],
],
);
}
return $blocks;
},
1000,
2
);
Thank you sir, but what to do for currency symbol?
i have concern about my offer look, why its look different compare to yours?
andrii
July 6, 2023, 1:45pm
30
Hi,
Please use this PHP snippet:
add_filter( 'hivepress/v1/models/offer', 'add_offer_fields', 1000);
add_filter( 'hivepress/v1/forms/offer_make', 'add_offer_fields', 1000);
function add_offer_fields($model){
if ( get_option( 'hp_offer_allow_bidding' ) ) {
$model['fields']['price'] = [
'label' => hivepress()->translator->get_string( 'price' ),
'type' => 'currency',
'min_value' => 0,
'required' => true,
'_external' => true,
'_order' => 5,
];
}
return $model;
}
add_filter(
'hivepress/v1/templates/offer_view_block/blocks',
function($blocks, $template){
$offer = $template->get_context('offer');
if(!$offer){
return $blocks;
}
if ( get_option( 'hp_offer_allow_bidding' ) ) {
return hivepress()->template->merge_blocks(
$blocks,
[
'offer_attributes_primary' => [
'blocks' => [
'offer_price' => [
'type' => 'content',
'content' => '<div class="hp-offer__attribute hp-offer__attribute--price">$'.esc_html($offer->get_price()).'</div>',
'_order' => 10,
],
],
],
],
);
}
return $blocks;
},
1000,
2
);
Unfortunately, a free theme cannot stylize additional blocks as well as a paid one, because they have completely different designs.
​I hope this is helpful to you.
Thank you for solution, its working perfectly fine now,
I have one question, we have added currency symbol manually in the code, but what if i publish my website in all country? Currency symbol should change automatically right? in both form (request & offer form) is this possible ?
andrii
July 7, 2023, 7:46am
32
Hi,
Sorry, there’s no simple code snippet for this, it would require a custom implementation. If customizations beyond the available features are required for your site, please consider hiring someone for custom work https://fvrr.co/32e7LvY
system
Closed
August 6, 2023, 7:47am
33
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.