• Hello,

    I was wondering if I could remove some of the options in the Quick Search. I don’t want it to have the ability to Search for Min Price and Max Price or Trans Mileage and Body type.

    Secondly, the tabs on the actual inventory section, I was wondering if I could change those. I was hoping to just have Description and Specs and leave out the rest.
    Is this possible?

    Thanks,

    Sam

    http://wordpress.org/plugins/car-demon/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author theverylastperson

    (@theverylastperson)

    Hey Sam,

    The quick and dirty way to do it is to use css to hide the elements you don’t want and to style the elements you do want.

    If you’re using Chrome you can right click and inspect element to get the ids and classes you need to override.

    Thread Starter OgityBogityBoo

    (@ogitybogityboo)

    Thanks Jay,

    I thought of that just a few hours ago and it works great for the Tab section. I have only Description and Specs.

    As for the Search Widget, my luck hasn’t been as great. I was able to remove the actual Dropdowns for the search items I didn’t want, but there is an empty space where it used to be. I found that this empty space is due to some Car Demon CSS that states:

    .search_car_box_frame {
    font-size: 12px;
    height: 320px;
    width: 100%;
    }

    And I cannot modify Classes using the theme css editor. Everything else I have been able to edit fine because I was editing IDs. I am not sure why I can’t edit classes. It just doesn’t take effect. I could, edit the Car Demon files themselves but I don’t want to do that because it will be overwritten on an update.

    Perhaps I am forgetting a basic principle when editing classes?

    Thanks for all your responsive help.
    Sam

    Plugin Author theverylastperson

    (@theverylastperson)

    Hey Sam,

    The problem is I didn’t originally intend for that search form to stick around and when I wrote it I did a poor job naming the elements and giving them IDs and classes that make sense for re-styling.

    I’m uploading some changes to the development copy right now;
    http://downloads.wordpress.org/plugin/car-demon.zip

    There’s an option to turn off form CSS, it might help you get it styled.

    One option for creating your own search is to make it as a separate PlugIn. Just strip the code out of Car Demon. Look in;

    plugins->car-demon->includes->car-demon-search-form.php

    The function car_demon_search_form() is the large search form.
    You can hack that up, rename it and stick it in it’s own plugin, call it from a widget and you’ll be upgrade proof.

    function car_demon_search_form() {
    	$car_demon_pluginpath = str_replace(str_replace('\\', '/', ABSPATH), get_option('siteurl').'/', str_replace('\\', '/', dirname(__FILE__))).'/';
    	$car_demon_pluginpath = str_replace('includes','',$car_demon_pluginpath);
    	car_demon_search_cars_scripts();
    	$url = get_option('siteurl');
    ?>
    <div class="search_car_box_frame">
    	<div id="car-demon-search-cars" class="search_car_box">
    <form action="<?php echo $url ?>" method="get" />
    <input type="hidden" name="s" value="cars" />
    <input type="hidden" name="car" value="1" />
    		<div id="car-demon-searchr1c1" class="search_header"></div>
    		<div id="car-demon-searchr2c1" class="search_header_logo"><img src="<?php echo $car_demon_pluginpath; ?>theme-files/images/search_cars.gif" alt="Search Cars" title="Search Cars" width="20" height="23" />&nbsp;<?php _e('QUICK SEARCH', 'car-demon'); ?>
    <?php
    	echo '&nbsp;<span class="advanced_search_btn" onclick="document.getElementById(\'advanced_search\').style.display=\'inline\';" title="Advanced Search">+</span></div>';
    	echo '<div class="advanced_search" id="advanced_search">Stock #: <input class="search_dropdown_sm" type="text" name="stock" id="stock" size="6" />
    	&nbsp;<span class="advanced_search_btn_hide" onclick="document.getElementById(\'advanced_search\').style.display=\'none\';" title="Hide Advanced Search">-</span>
    	</div>';
    ?>
    			<div class="search_left">
    				<div id="car-demon-searchr3c1" class=""><?php _e('Condition','car-demon'); ?>:</div>
    				<div><?php echo car_demon_search_condition(); ?></div>
    			</div>
    			<div class="search_right">
    				<div id="car-demon-searchr3c1" class=""><?php _e('Manufacturer','car-demon'); ?>:</div>
    				<div id="car-demon-searchr4c1" class=""><?php echo car_demon_search_makes();?></div>
    			</div>
    			<div class="search_left">
    				<div class="search_labels"><?php _e('Year','car-demon'); ?>:</div>
    				<div><?php echo car_demon_search_years(); ?></div>
    			</div>
    			<div class="search_right">
    				<div class=""><?php _e('Model','car-demon'); ?>:</div>
    				<div><?php echo car_demon_search_models();?></div>
    			</div>
    			<div id="car-demon-searchr6c1" class="search_min_price">
    				<div class="search_labels"><?php _e('Min Price','car-demon'); ?>:</div>
    				<div><?php echo car_demon_search_price('Min'); ?></div>
    			</div>
    			<div id="car-demon-searchr6c2" class="search_max_price">
    				<div class="search_labels"><?php _e('Max Price','car-demon'); ?>:</div>
    				<div><?php echo car_demon_search_price('Max'); ?></div>
    			</div>
    			<div id="car-demon-searchr7c1" class="search_trans">
    				<div class="search_labels"><?php _e('Trans','car-demon'); ?>:</div>
    				<div><?php echo car_demon_search_tran(); ?></div>
    			</div>
    
    			<div id="car-demon-searchr7c2" class="search_mileage">
    				<div class="search_labels"><?php _e('Mileage','car-demon'); ?>:</div>
    				<div><?php echo car_demon_search_miles(); ?></div>
    			</div>
    			<div id="car-demon-searchr8c1" class="search_body">
    				<div class="search_labels"><?php _e('Body Type','car-demon'); ?>:</div>
    				<div>
    					<?php echo car_demon_search_body(); ?>
    				</div>
    			</div>
    			<div id="car-demon-searchr8c2" class="search_button_box">
    			  <input type="submit" name="submit_search" id="submit_search" value="<?php _e('Search','car-demon'); ?>" class="search_btn advanced_btn">
    			</div>
    		</div>
    		<div id="car-demon-searchr9c1" class="search_footer"></div>
    </form>
    	</div>
    </div>
    <?php
    }
    Thread Starter OgityBogityBoo

    (@ogitybogityboo)

    I am still looking into the issue with the Quick Search. I am not very skilled in PHP. Not enough to create my own plugin, but if I don’t find a way around it I will give it a shot.

    On a related note, I have the tabs limited to Description and About tabs. What fills in the About Tab? Like, I can’t figure out what goes there. When clicking on the tab, the below info is blank. And there is no way to input info when adding a new car to the inventory. What is it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Edit Quick Search and Tabs’ is closed to new replies.