Home Forums WC Vendors Pro Support Auction Only Site Reply To: Auction Only Site

#64465
patrick
Participant

This might help you. I have an auction only site and used the code below. The time input doesnt work, you have to copy and paste the time stuff from the wcvendors auction bridge

<?php
/**
 * The template for displaying the Auction only Product Edit form  
 *
 * Override this template by copying it to yourtheme/wc-vendors/dashboard/
 *
 * @package    WCVendors_Pro
 * @version    1.3.9
 */
/**
 *   DO NOT EDIT ANY OF THE LINES BELOW UNLESS YOU KNOW WHAT YOU'RE DOING 
 *   
*/

$title = 	( is_numeric( $object_id ) ) ? __('Save Changes', 'wcvendors-pro') : __( 'Add Simple Product', 'wcvendors-pro'); 
$product = 	( is_numeric( $object_id ) ) ? wc_get_product( $object_id ) : null;

// Get basic information for the product 
$product_title     			= ( isset($product) && null !== $product ) ? $product->post->post_title    : ''; 
$product_description        = ( isset($product) && null !== $product ) ? $product->post->post_content  : ''; 
$product_short_description  = ( isset($product) && null !== $product ) ? $product->post->post_excerpt  : ''; 
$post_status				= ( isset($product) && null !== $product ) ? $product->post->post_status   : ''; 

/**
 *  Ok, You can edit the template below but be careful!
*/
?>

<h2><?php echo $title; ?></h2>

<!-- Product Edit Form -->
<form method="post" action="" id="wcv-product-edit" class="wcv-form wcv-formvalidator"> 

	<!-- Basic Product Details -->
	 
		
		
		
		
		
	    
	

	 
    	
		
			
		
	</div>

	<hr />
	
	
		 'hidden', 
				'id' 			=> 'product-type', 
				'value'			=> 'auction'
				) )
			);
		?>
	
 
	<!-- Price and Sale Price -->
	<?php WCVendors_Pro_Product_Form::prices( $object_id ); ?>

	<!-- SKU  -->
	<?php WCVendors_Pro_Product_Form::sku( $object_id ); ?>
	<!-- Private listing  -->
	<?php WCVendors_Pro_Product_Form::private_listing( $object_id ); ?>

	<!-- Shipping rates  -->
	<?php WCVendors_Pro_Product_Form::shipping_rates( $object_id ); ?>	
  
  <!-- Auction Fields --> 
  
	<!--  Item Condition -->
	<?php  WCVendors_Pro_Form_Helper::select( apply_filters( 'wcv_simple_auctions_item_condition', array( 
				'post_id'			=> $post_id, 
				'id' 				=> '_auction_item_condition', 
				'class'				=> 'select2',
				'label'	 			=> __( 'Item Condition', 'wc_simple_auctions' ), 
				'desc_tip' 			=> 'true', 
				'description' 			=> sprintf( __( 'The condition of the item you are selling', 'wcvendors-pro-simple-auctions' ) ), 
				'wrapper_start' 		=> '',
				'wrapper_end' 			=> '', 
				'options' 			=> array( 'new' => __('New', 'wc_simple_auctions'), 'used'=> __('Used', 'wc_simple_auctions') )
				) )
		); 
	?>

	<!-- Type of Auction -->
	<?php 	WCVendors_Pro_Form_Helper::select( apply_filters( 'wcv_simple_auctions_auction_type', array(
                'post_id'                       => $post_id,
                'id'                            => '_auction_type',
                'class'                         => 'select2',
                'label'                         => __( 'Auction Type', 'wc_simple_auctions' ),
                'desc_tip'                      => 'true',
                'description'                   => sprintf( __( 'Type of Auction - Normal prefers high bidders, reverse prefers low bids to win.', 'wcvendors-pro-simple-auctions' ) ),                                             
                'wrapper_start'                 => '',
                'wrapper_end'                   => '',
                'options'                       => array( 'normal' => __('Normal', 'wc_simple_auctions'), 'reverse'=> __('Reverse', 'wc_simple_auctions') )
                ) )
        );
	?>

	<!-- Proxy Options --> 
	<?php  WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_proxy_bidding', array( 
			'post_id'			=> $post_id, 
			'id' 				=> '_auction_proxy', 
			'label' 			=> __( 'Enable proxy bidding', 'wc_simple_auctions' ), 
			'type' 				=> 'checkbox' 
			) )
		);
	?>

	<!-- Auction Start Price --> 
	<?php WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_start_price', array( 
			'post_id'		=> $post_id, 
			'id' 			=> '_auction_start_price', 
			'label' 		=> __( 'Start Price', 'wc_simple_auctions' ) . ' (' . get_woocommerce_currency_symbol() . ')', 
			'data_type' 		=> 'price', 
			'wrapper_start' 	=> '', 
			'wrapper_end' 		=>  ''
			) )
		);
	?>

	<!-- Auction Bid Increment -->
	<?php WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_bid_increment', array(
                'post_id'               => $post_id,
                'id'                    => '_auction_bid_increment',
                'label'                 => __( 'Bid increment', 'wc_simple_auctions' ) . ' (' . get_woocommerce_currency_symbol() . ')',
                'data_type'             => 'price',
                'wrapper_start'         => '',
                'wrapper_end'           =>  ''
                ) )
        );
	?> 

	<!-- Reserve Price (note the keys are reserved not reserve, as is the auction developers code) --> 
	<?php WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_reserved_price', array(
	            'post_id'               => $post_id,
	            'id'                    => '_auction_reserved_price',
	            'label'                 => __( 'Reserve price', 'wc_simple_auctions' ) . ' (' . get_woocommerce_currency_symbol() . ')',
	            'data_type'             => 'price',
	            'wrapper_start'         => '',
	            'wrapper_end'           =>  ''
	            ) )
	    );
	?>

	<!-- Buy it Now Price -->
	<?php WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_buy_it_now_price', array(
	            'post_id'               => $post_id,
	            'id'                    => '_buy_it_now_price',
	            'label'                 => __( 'Buy it now price', 'wc_simple_auctions' ) . ' (' . get_woocommerce_currency_symbol() . ')',
	            'data_type'             => 'price',
	            'wrapper_start'         => '',
	            'wrapper_end'           =>  ''
	            ) )
	    );
	?>
		 
	<?php WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_start_date', array( 
			'post_id'		=> $post_id, 
			'id' 			=> '_auction_dates_from', 
			'label' 		=> __( 'From', 'wcvendors-pro-simple-auctions' ), 
			'class'			=> 'wcv-datetimepicker', 
			'placeholder'	=> __( 'From&hellip;', 'placeholder', 'wcvendors-pro-simple-auctions' ). ' YYYY-MM-DD',  
			'wrapper_start' => '',
			'wrapper_end' 	=> '', 
			) )
		);
	?>
	
	<?php WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_end_date', array( 
			'post_id'			=> $post_id, 
			'id' 				=> '_auction_dates_to', 
			'label' 			=> __( 'To', 'wcvendors-pro-simple-auctions' ), 
			'class'				=> 'wcv-datetimepicker', 
			'placeholder'		=> __( 'To&hellip;', 'placeholder', 'wcvendors-pro-simple-auctions' ). ' YYYY-MM-DD', 
			'wrapper_start' 	=> '',
			'wrapper_end' 		=> '', 
			'desc_tip'			=> true, 
			) )
		);
	?>
    
	<?php WCVendors_Pro_Product_Form::form_data( $object_id, $post_status, $template ); ?>
	<?php WCVendors_Pro_Product_Form::save_button( $title ); ?>
	<?php WCVendors_Pro_Product_Form::draft_button( __('Save Draft','wcvendors-pro') ); ?>

			</div>
		</div>
</form>