• Resolved MrMyles

    (@mrmyles)


    When you choose to Hide Price on a vehicle it hides it from the multi-vehicle page but not the single-vehicle display. Instead, the single-vehicle will show $0.00

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author autolistings

    (@autolistings)

    Hi,

    Which theme are you using? Did you try switching to another theme?

    Thread Starter MrMyles

    (@mrmyles)

    I have tried switching to the default 2021 theme and the “hidden” price still shows.
    This is true on my test server running PHP5.6 and my live site running PHP7.3.
    This is true on sites running default WP Themes 2016 through 2021 as well as the BIkersClub theme from ThemeForest.

    Here is a screenshot of various themes showing the price and the setting to show it should be hidden.
    https://creativecompulsions.com/clients/gaslight/site/wp-content/uploads/2021/02/NotHidden.jpg

    And an example on the test site:
    https://creativecompulsions.com/clients/gaslight/site/listing/2020-tri-glide-ultra/

    Plugin Author autolistings

    (@autolistings)

    Hi,

    Seems like you have overridden the content-single-listings.php template to output the price in the ‘at-a-glance’ section. If you use auto_listings_price, it will not work because that function output not only the price but also the state of the listing.

    You should use this function auto_listings_hide_item( 'price' ) to check whether or not to display the price there.

    Regarding the price in the tab, edit the file: auto-listings\templates\single-listing\tabs\details.php, go to line 31 and change the code like this:

    
    if ( auto_listings_hide_item( 'price' ) ) {
    	unset( $details_array[ __( 'Price', 'auto-listings' ) ] );
    }
    

    We will update this in the next version. So, don’t worry about this hot fix.

    Thread Starter MrMyles

    (@mrmyles)

    Sorry, can you clarify?
    I only want to hide the price if that option is selected, not always.

    The code I use is:

    <?php if ( auto_listings_price() ) { ?>
        		<li class="price"><strong> <?php echo auto_listings_price( $price ); // wpcs xss: ok. ?></strong></li>
    		<?php } ?>
    		
    Plugin Author autolistings

    (@autolistings)

    auto_listings_price just prints the price. If you want to hide the price when that option is selected, please try this code:

    
    <?php if ( ! auto_listings_hide_item( 'price' ) ) : ?>
    	<li class="price"><strong> <?php echo auto_listings_price( $price ); // wpcs xss: ok. ?></strong></li>
    <?php endif; ?>
    
    Thread Starter MrMyles

    (@mrmyles)

    I appreciate the help, this code worked perfectly.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hidden Price Not Hidden’ is closed to new replies.