Join our new community forum for support & discussion
Join NowHome › Support › Themes › RentalHive › Attribute field changes not displaying (price / hour)
Attribute field changes not displaying (price / hour)
-
AuthorPosts
-
rachelle 1 year ago
Hello! I’ve modified the price attribute on listings to display $%value$/hr instead or $%value$/night, but… no matter what I change on the attributes settings nothing gets affected on the listings page.
I even tried removing the pricing entirely from being displayed on the sidebar area but for example “$25” is persistently shown instead of “$25/hr”. I can never hide it or add the modifier to the end.
Did I somehow break something? Or why wouldn’t it be reflecting the changes — the other attributes seem to be working correctly.
rachelle 1 year agoAlso – mistyped it in there in my rush to spit the question out… I meant to write $%value%/hr and $%value%/night
If you use the Bookings extension this is a built-in attribute, it may not be available in the Listings/Attributes section. Please try changing this attribute format via Loco Translate (in Loco Translate/Plugins/HivePress Bookings section) https://youtu.be/BeaYWYUHvHI
rachelle 1 year agoOK, I actually figured out its WooCommerce that’s overriding the pricing tag in the listings page. If I deactivate WooCommerce, the correct “$x/hr” is displayed but as soon as I reactivate it it defaults back to “$X.XX”
WooCommerce itself should not affect the HivePress attributes, but when you deactivate WooCommerce the HivePress Marketplace extension is also disabled (it depends on WooCommerce). The price format is set in the Marketplace extension, please try following the suggestions to change this format via Loco Translate if required.
rachelle 1 year agoHey Yevhen,
Thanks for your replies! I don’t know how to use LocoTranslate (unless someone can provide exact step by step instructions)… but I definitely identified that it is whenever WooCommerce is set to “active” that the price structure changes. I tried deleting the plug-in and doing a fresh install incase I had changed any settings but, same thing happens. I definitely need to us WooCommerce, so getting this fixed would be very important. I thought HivePress + WooCommerce were designed to work hand-in-hand, so confused as to this complication.I double checked and the Marketplace extension is active (also deleted and reinstalled that one just in case). I am using the Bookings plugin too, but it doesn’t seem to change anything. Rather, the issue only manifests when I activate the WooCommerce plugin.
Yes, if you activate WooCommerce & Marketplace then the Marketplace Price field overrides the custom attribute you added in Listings/Attributes. Please try using this code snippet to change the Price display format:
add_filter( 'hivepress/v1/models/listing/attributes', function( $attributes ) { if ( isset( $attributes['price'] ) ) { $attributes['price']['display_format'] = '%value%/hr'; } return $attributes; }, 1000 );
You can add this code snippet using the Code Snippets plugin https://wordpress.org/plugins/code-snippets/
Hope this helps.rachelle 12 months agoAmazing! Thanks so much – worked like a charm!
-
AuthorPosts
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.