WooCommerce Simple Auctions

Created: 05/02/2014
Last Updated: 09/02/2016
Author: wpgenie
http://themeforest.net/user/wpgenie/

Thank you for purchasing our plugin. If you have any questions that are beyond the scope of this help file, please feel free to email via contact form here. Have fun!

  • Changelog
  • Overview and Features
  • Installation
  • Quick Auction Setup
  • Changes in WooCommerce
  • Plugin options
  • Shortcodes
  • FAQ

Version Changelog

Here is a list of updates and fixes.

** Version 1.1.31 **
	- Fix: Removed auction history and relist metaboxes for non auction products
	- Fix: Ajax refresh reserve met text
	- Add: Added {current_bidder} tag to bid email notification to admin when user(s) place a bid

** Version 1.1.30 **
	- Fix: Log problem with current and max bid
	- Fix: Added default sorting by date for auction base page

** Version 1.1.29 **
	- Fix: Proxy bid bug
	
** Version 1.1.28 **
	- Fix: Buy now button in Woocommerce 2.5
	- Fix: Duplicating auction icon bug
	- Fix: Comma separated reserve price bug
	- Add: Future auction widget and shortcode
	- Add: New email template, mails to customer when customer places bid (confirmation email)
	
** Version 1.1.27 **
	- Fix: Problem with maxbid on proxy auctions when user is allowed to outbid himself
	- Fix: translating strings "From…" , "To…"
	- Fix: translations
	
** Version 1.1.26 **
	- Fix: changed ajaxurl variable 
	
** Version 1.1.25 **
	- Add: Option to allow highest bidder to outbid himself
	- Fix: changed method for metaboxes so users can remove them
	- Fix: Some small typos
	
** Version 1.1.24 **
	- Fix: Problem when searching auction in frontend
	- Fix: Problem with filtering past auctions
	
** Version 1.1.23 **
	- Fix: Problem with future auctions counter in widget
	- Fix: Show max bid in proxy auction when user is outbidded 
	
** Version 1.1.22 **
	- Fix: Auction winning badge check on ajax response
	- Fix: Current bid refresh bug
	- Fix: Ajax finish auction bug
	
** Version 1.1.21 **
	- Fix: Buy now button appears even if bid is bigger than buy now price
	- Fix: Non standard thousand and decimal separator bid problem
	
** Version 1.1.20 **
	- Add: Added parametar show_buy_it_now='true' for shortcode [woocommerce_simple_auctions_my_auctions]
	- Fix: Improved plugin show/hide future and past auctions queries
	- Fix: Non standard thousand and decimal separator problem
	
** Version 1.1.19 **
	- Fix: Bug in [woocommerce_simple_auctions_my_auctions] short code not showing active auctions
	
** Version 1.1.18 **
	- Fix: Improved plugin queries
	- Fix: Modified capability role for view auction activity to manage_woocommerce
	- Fix: Ajax interval bug and optimization for WC >= 2.4
	- Fix: Table prefix bug when viewing auction activity in WP backend
	- Fix: Rounding bug if bid value is between 0.00 and 1.00
	- Add: Added [vendor] tag for sending mail to auction author/vendor on auction_fail, 
	auction_finished, auction_relist, bid_note emails - useful with multivendor plugins 
	like WC Vendors or if you want to send email to auction author or owner in case of 
	multivendor site
	
** Version 1.1.17 **
	- Fix: Compatibility with WP 4.3
	- Fix: Auction activity on MU sites bug
	- Fix: Delete first bid but not deleting max bid bug
	
** Version 1.1.16 **
    - Fix: Widget ending_soon_auctions bug
    - Fix: Improvements on ajax checking for bids
    + Add: Automatic relist

** Version 1.1.15 **
    - Fix: Shortcode ending_soon_auctions bug
    - Fix: Localization bug

** Version 1.1.14 **
	- Fix: Proxy bid bug

** Version 1.1.13 **
    - Fix: Compatibility with wpmandrill
    - Fix: Fixing add_query_arg() and remove_query_arg() usage

** Version 1.1.12 **
    - Add: Relist auction

** Version 1.1.11 **
    - Fix: Fix functions missing bug

** Version 1.1.10 **
	- Fix: Logging mysql date instead of current wordpress date for auction history
    - Fix: Bug in loop pay now button
    + Add: Option to filter auctions from product search page
    + Add: Auction search widget
    + Add: Auction activity page

** Version 1.1.9 **
	- Fix: Pay auction link
    - Fix: Product Quantity Plus and Minus signs not showing

** Version 1.1.8 **
	- Fix: Problem with sending mail on different language
    - Fix: Problem with cronjob

** Version 1.1.7 **
	- Fix: Problem with sending mail on Woocommerce > 2.3

** Version 1.1.6 **
	- Fix: Problem with stock when saving post
	- Add: Shortcode for ending soon auctions 

** Version 1.1.5 **
	- Fix: Problem with showing auction finish email template

** Version 1.1.4 **
	- Fix: Filtering auctions from pages
	- Fix: My auction shortcode and widget bug

** Version 1.1.3 **
	- Fix: Wait interval days to send reminder to pay mail
	- Fix: Small typos
	- Fix: Counter message when auction has started
	- Add: Added no-products-found template for shortcodes
	
** Version 1.1.2 **
	- Fix: Spelling errors
	- Fix: Bugs with WPML

** Version 1.1.1 **
	- Fix: Live checks bug for non logged user

** Version 1.1.0 **
	- Add: Live checks on auction bids
	- Add: Showing current max bidder to admin and to current max bid user
	- Add: WordPress 4.0 and WooCommerce 2.2 ready
	- Fix: files cleanup

** Version 1.0.25 **
	- Fix: Send reminders mail cron bug

** Version 1.0.24 **
	- Fix: Turn off proxy bidding bug
	- Fix: WPML compatibility
	- Fix: Showing mutiple products bug
	
** Version 1.0.23 **
	- Fix: Problems with currency symbol positioning
	- Fix: Problems with virtual and download checkboxes

** Version 1.0.22 **
	- Add: Turn on / off admin email notification for every bid placed by user(s)

** Version 1.0.21 **
	- Fix: Proxy auction bug

** Version 1.0.20 **
	- Add: Hook woocommerce_product_options_auction

** Version 1.0.19 **
	- Add: Filter auction in backend

** Version 1.0.18 **
    - Fix: Problem with cronjob

** Version 1.0.17 **
	- Fix: Problem when activating on a multi-site installation of WordPress

** Version 1.0.16 **
	- Fix: Problem with out of stock bug
	
** Version 1.0.15 **
	- Fix: Problem with filtering date timezone 

** Version 1.0.14 **
	- Add: Filter for item condition (simple_auction_item_condition)
	- Fix: Format date with wordpress settings
	
** Version 1.0.13 **
	- Fix: Language typo
	- Fix: Optimized sql query
	- Fix: Html number element (now gets theme styling, no more modernizr workaround!)
	
** Version 1.0.12 **
	- Fix: Problem same max bid in proxy mode
	
** Version 1.0.11 **
	- Fix: Problem with decimal bidding
	
** Version 1.0.10 **
	- Fix: Problem with proxy bidding setting max price
	
** Version 1.0.9 **
	- Fix: Problem with loading languages files
	
** Version 1.0.8 **
	- Fix: Problem with price on regular products

** Version 1.0.7 **
	- Add: Send mail to admin when auction is finished

** Version 1.0.6 **
	- Add: Do not show auctions on product category page option
	- Add: Do not show auctions on product tag page option
	- Fix: Email templates path

** Version 1.0.5 **
	- Fix: Starting bid bug
	- Fix: Product copying bug
	
** Version 1.0.4 **
	- Add: Manually delete any bid

** Version 1.0.3 **
	- Fix: Problem with checkout
	- Fix: Problem with table prefix
	- Fix: Problems with reserve price
	- Fix: Displaying timezone in UTC format	
	- Fix: Language (thanx to artsmart)
	
** Version 1.0.2 **
	- Fix: saving decimal bid to log
	- Fix: problems with translations
	
** Version 1.0.1 **
 	- Add: support for woocommerce > 2.1
	- Fix: couple minor bugs

** Version 1.0.0 **
   	- Initial release
			
Back to top

WooCommerce Simple Auctions

WooCommerce Simple Auctions is a plugin for a plugin :) Since WooCommerce is popular we decided that it would be neat to extend it with auction features. We wanted to make it easy to use but also to include all auction features so you get a powerful auction solution which is easily setup and customized.

With our auction plugin you can setup WordPress auction website and start auctions in less than 30 minutes (assuming you have payment processor account ready). Plugin integrates seamlessly with WooCommerce and no special knowledge is needed (same level like for standard WooCommerce usage).

Overview and Features

  • Seamless integration into WooCommerce via its hooks
  • You get new type of WooCommerce product type - auction
  • Normal or reverse auctions
  • Proxy / auto bidding (learn more about auto bidding here)
  • Define start price, price increment, reserve price, buy it now price
  • Set start and end time for auction
  • Easily control how you want to display auctions - along with other items or on separate page
  • Widgets with ending soon, future, latest, featured, recently viewed, my auctions and random auctions
  • Email notifications (with editable email templates) for outbid note, auction won, payment reminder, auction fail, reserve fail, auction buy now, auction finish, administrator bid notification (bid not), customer bid notification, auction relist admin notice, auction relist user notice
  • Auction product has auction icon (label) on thumbnail
  • If user is logged in and winning in auction, auction item has winning badge on thumbnail
  • Product single page has new tab "Auction History"
  • User has "My auctions" option where auctions in which user placed a bid are listed (for both active and won auctions)
  • Auction filtering in product list (wp-admin)
  • Auction product has icon which describes different auction status: active, finished, finished and paid, failed (wp-admin)
  • Plenty of shortcodes including shortcode to show my auctions for logged in user
  • Make auction from any type of Woocommerce product - simple, virtual or downloadable products
  • Manually delete any bid
  • Manually or automatically relist auctions
  • Ajax live current bid updating
  • WPML compatible
  • Easily get 99/100 speed rank score
Back to top

Installation

Make sure to install WooCommerce before you activate WooCommerce Simple Auctions plugin.

You can install plugin via WordPress "Add New" plugin - to do that download zip with plugin only, click add new and that's it. In case you do not have permissions to upload to plugins/ directory you will need FTP login info.

Alternative setup. After downloading WooCommerce Simple Auctions plugin, extract plugin zip and upload it to your plugins directory - wp-content/plugins/ folder of your Wordpress installation. Since this is extension for WooCommerce you need to install WooCommerce before activating the plugin. WooCommerce plugin which can be downloaded here.

If you need help installing Wordpress see the link here: http://codex.wordpress.org/Installing_WordPress

Once you installed and activated WooCommerce go to WooCommerce > System Status and make sure that you don't have red colored errors (specially for WP memory limit). Make sure to enable inventory management in WooCommerce!

WooCommerce Simple Auctions plugin uses cronjobs and you have to setup two cronjobs:

  • once a day: /usr/local/bin/curl --silent http://www.your-domain.com/?auction-cron=mails
  • every minute: /usr/local/bin/curl --silent http://www.your-domain.com/?auction-cron=check

Here is screenshot of cronjobs page and setup in DirectAdmin control panel

Screenshot of cronjobs page and setup in DirectAdmin control panel

Here is screenshot of cronjobs page and setup in cPanel control panel

Screenshot of cronjobs page and setup in cPanel control panel

More details about cronjobs can be found by googling "how to add cronjob in cPanel / DirectAdmin". If you don't know how to add cronjob the best and the easiest way is to email your hosting support to do it for you (purpose of hosting support are tasks like helping you with cronjobs, our support helps you with plugin issues - cronjobs are hosting related problem / issue).

If your hosting company does not support one minute cronjobs we suggest that you move your website to more serious hosting company or use service like EasyCron.

Our plugin is meant to be used as ecommerce solution which will earn money so we suggest you to invest in proper hosting (which at least supports one minute cronjobs).

Install Sample Data:

WooCommerce comes with sample data which you can import, dummy data file is /wp-content/plugins/woocommerce/dummy_data.xml Steps to import demo data to your WordPress WooCommerce site:

  1. Go to Tools > Import
  2. Select XML dummy content file from /wp-content/plugins/woocommerce/dummy_data.xml
  3. Click Upload file and import
  4. Assign posts to an exitsting account
  5. Check Download and import file attachments
  6. Click Submit and wait until WordPress finish downloading attachments and importing content

Importing dummy data can take some time, specially on slow Internet connections. Be patient and do not close or refresh browser tab until import operation is completed.

Back to top

Quick Auction Setup

Setting up new auctin is easy:

  • make sure all steps from Installation are done (WooCommerce installed, plugin enabled, cronjobs set)
  • go to Products => Add Product
  • add title, description, images, featured image, select category - all things you do when adding regular product
  • in Product Data dropdown menu select Auction
  • you will see new tab in left menu named Auction, see screenshot: WooCommerce product type auction and its tab
  • fill all details (they are self explainable)
  • set auction duration by setting start and end date
  • publish product (auction)

When you refresh your home page you should see new product with auction badge.

WooCommerce auctions product types listed on home page with auction badge and current bid value

Advanced usage usually means setting up proxy bidding (auto bidding) and reverse auctions (for example you post a coding project and want to get lowest possible price for it).

Make sure that when setting up auction site your auction base page is different than your home page. If you need auctions on home page use shortcodes or widgets to display them on your home page.

Back to top

Changes in WooCommerce

After you activate WooCommerce Simple Auctions plugin couple new options will appear:

  1. WooCommerce product has new tab in Product data block called Auction
  2. Product list has column with auction status icons
  3. Product list filter has auction filtering
  4. Single product page in wp-admin has new block named "Auction" where you can see auction history and number of different email notifications sent
  5. Orders list has column with auction icon to easily see which order is from auction
  6. WooCommerce settings have new tab called Auctions
  7. WooCommerce email settings have new items: outbid note, auction won, payment reminder, auction fail, reserve fail, auction buy now, auction finish, administrator bid notification (bid not), customer bid notification, auction relist admin notice, auction relist user notice
  8. New widgets: future auctions, ending soon auctions, featured auctions, latest auctions, recently viewed auctions, my auctions, random auctions
  9. New shortcodes

Auctions listed along WooCommerce products on home page:

Auctions listed along WooCommerce products on home page

New WooCommerce product type auction:

WooCommerce product type auction

Back to top

Plugin options

Here are settings that you can turn on and off. Settings are self explainable. You can enable or disable showing past and future auctions. Another useful setting is whether to mix regular products with auctions or just show auctions on separate page (defined via Auctions Base Page dropdown, see screenshot).

WooCommerce Simple Auctions plugin options and settings

On screenshot below you can see how product list with auctions looks like. Auction status icons are explained on the screenshot.

Auctions products listed in wp-admin WooCommerce products list page

 

On screenshot below you can see how to enable live ajax updating of current bid price (feature introduced in version 1.1.x). To minize number of requests, ajax request is done only if you have bid tab in focus otherwise ajax is not running. This is done like this to make it easy on server and hosting resources.

Auctions products listed in wp-admin WooCommerce products list page

 

Once auction is closed (or finished) you can relist auction again. Also if someone does not pay for auction you have ability to relist auction.

Auctions relisting

 

Automatic relist feature is available from v1.1.16. It enables you to automatically relist expired / finished / failed auctions if user still has not paid for won auction. You need to setup cronjob /usr/local/bin/curl --silent http://www.your-domain.com/?auction-cron=relist every hour.

Auctions relisting

Automatic relist feature requires cronjob to work properly. Feature is introduced in version v1.1.16, so make sure to have that version installed.

Shortcodes

Here is a list of all available plugin shortcodes. Some shortcodes accept optional orderby and order attributes.

  • show ending soon auctions - [ending_soon_auctions per_page="12" columns="4" order="desc"]
  • show recent auctions - [recent_auctions per_page="12" columns="4" orderby="date" order="desc"]
  • show featured auctions - [featured_auctions per_page="12" columns="4" orderby="date" order="desc"]
  • show auctions with specific product ID - [auctions ids="1,2,3,4,5"]
  • show auctions with specific SKU code - [auctions skus="foo, bar, baz" orderby="date" order="desc"]
  • show user's auctions - [woocommerce_simple_auctions_my_auctions]
  • show future auctions - [future_auctions], [future_auctions per_page="12" columns="4" orderby="date" order="desc"]

Please note that there is no paging when you use shortcodes (same as with WooCommerce shortcodes). Per page attribute means how many items will be displayed on that particular page without paging!

Back to top

FAQ

Here you can find answers to frequently asked questions. Feel free to contact us if you can't find answer to your question.

  1. Do you have list of hooks? - Yes, list is below:
    • woocommerce_simple_auctions_before_place_bid
    • woocommerce_simple_auctions_outbid
    • woocommerce_simple_auctions_place_bid
    • woocommerce_product_options_auction
    • woocommerce_simple_auction_pay_reminder
    • woocommerce_simple_auction_close_buynow
    • woocommerce_simple_auction_delete_bid
    • woocommerce_simple_auction_close
    • woocommerce_simple_auction_fail
    • woocommerce_simple_auction_reserve_fail
    • woocommerce_simple_auction_won
    Example:
    <?php add_action( 'woocommerce_simple_auctions_before_place_bid, 'custom_function' );  ?>
    			
  2. I have issue with number element in Firefox 29 (input where you enter your bid)? - This usually is theme issue and should be resovled via theme modifications. Easiest way to sort it is via CSS modification:
    		div.quantity input[type=number].qty {
    			-moz-appearance:textfield;
    		}
    		
  3. How to use simple_auction_item_condition filter? - In functions.php add:
    		add_filter('simple_auction_item_condition', 'my_example_filter_1' );
    		function my_example_filter_1( $array ){
    			
    			$array['old']='Old';
    			
    			return $array;
    		}
    		
    and in product data you will get new product condition option available to select named "Old".
  4. How to increase bid step for bid increment value to be more than 1? Bidding increment is done so you can bid in increments of 1, because otherwise if you set bid step of say 5, you would be able to bid 5, 10, 15... instead you can bid 7, 13, 22, etc. If you insist on different behaviour, you need to edit templates\single-product\bid.php and change:
    		step="any"
    
    		becomes
    
    		step="<?php echo ($product->auction_bid_increment) ? $product->auction_bid_increment : '1' ?>" 
    		
  5. Can I delete fake bid? - Yes, go to item details, section Auction where auction log is and click on delete.
  6. Can users create their own auctions like on eBay? - Basically yes, only users who can add new products can create auctions. You can use multiple vendor plugin which will allow you to add users who will be able to create products (auctions). Check multiple vendor tutorial here.
  7. Do you use cronjobs? - Yes. Please check installation instructions.
  8. Where can I edit email templates? - Go to WooCommerce > Settings and click on Emails tab.
  9. Does this plugin work with caching plugins? - Yes, W3TC is working but we advise no caching for logged in users. For example if page cache is enabled widget will not work - recently viewed auctions. Once user is logged in and there is no caching anymore all widgets will work. You can use CDN and browser caching. Our plugin demo website uses W3TC with page and object caching, browser caching and generic CDN mirroring.
  10. What is auto bidding / proxy bidding? - Ebay has nice explanation here.
  11. What is reserve price? - A reserve price is the lowest price at which you are willing to sell your item. If you do not want to sell your item below a certain price, you can a set a reserve price. The amount of your reserve price is not disclosed to your bidders, but they will see that your auction has a reserve price and whether or not the reserve has been met. If a bidder does not meet that price, you are not obligated to sell your item.
  12. I want auction end timer everywhere, what should I do? - Add this code to functions.php:
    		
    		add_action( 'woocommerce_after_shop_loop_item_title','wpgenie_show_counter_in_loop',50 );
    
    		function wpgenie_show_counter_in_loop(){
    			
    			global $product;
    			
    			$time = '';
    			
    			if(!isset ($product))
    				return;
    			if('auction' != $product->product_type)
    				return;
    						
    			$timetext = __('Time left', 'wc_simple_auctions');
    			
    			if(!$product->is_started()){
    				$timetext = __('Starting in', 'wc_simple_auctions');
    				$counter_time = $product->get_seconds_to_auction();
    			} else{
    				$counter_time = $product->get_seconds_remaining();
    			}
    			
    			$time = '<span class="time-left">'.$timetext.'</span>
    			<div class="auction-time-countdown"
    			data-time="'.$counter_time.'"
    			data-auctionid="'.$product->id.'" data-format="'.get_option(
    			'simple_auctions_countdown_format' ).'"></div>';
    			
    			if($product->is_closed()){
    				$time = '<span class="has-finished">'.__('Auction finished','wc_simple_auctions').'</span>';
    			}
    			echo $time;
    		}
    		
  13. I want to increase time auction is extended after bid is placed? - In function.php you need to add code below (this particular code extends auction for 30 sec - note PT30S):
    		add_action( 'woocommerce_simple_auctions_outbid', 'woocommerce_simple_auctions_extend_time', 50 );
    
    		function woocommerce_simple_auctions_extend_time($data){
    			$product = get_product( $data['product_id'] );
    			if ('auction' === $product->product_type ){
    
    					$date1 = new DateTime($product->auction_dates_to);
    					$date1->add(new DateInterval('PT30S'));
    					update_post_meta( $data['product_id'], '_auction_dates_to', $date1->format('Y-m-d H:i:s') );
    
    				
    			}
    		}
    		
  14. I want to extended auction finish time after a bid is placed so that it only extends the auction if a bid is placed when the auction is within 5 min of closing? - /* Auto Extend Auction by 2 min when a bid is placed within the last 5mins */
    		add_action( 'woocommerce_simple_auctions_outbid', 'woocommerce_simple_auctions_extend_time', 50 ); 
    
    		function woocommerce_simple_auctions_extend_time($data) { 
    
    			$product = get_product( $data['product_id'] ); 
    
    			if ('auction' === $product->product_type ) { 		
    				$auctionend = new DateTime($product->auction_dates_to); 
    				$auctionendformat = $auctionend->format('Y-m-d H:i:s');
    				$time = current_time( 'timestamp' );
    				$timeplus5 = date('Y-m-d H:i:s', strtotime('+5 minutes', $time));
    				
    				if ($timeplus5 > $auctionendformat) { 
    					$auctionend->add(new DateInterval('PT120S')); 
    					update_post_meta( $data['product_id'], '_auction_dates_to', $auctionend->format('Y-m-d H:i:s') ); 
    				}	
    			} 
    		}
    		
  15. Bidder beat another bidder with same amount? - When Proxy Bidding is in effect, it can appear as if one bidder has beat another bidder with the same bid amount. This is normal and occurs when a bidder has a proxy bid in effect and a second bidder comes along and makes their bid at the exact same amount the current proxy bid is at. Since the proxy bid was placed earlier, that is the bid that will succeed. For the second bidder to succeed in placing a bid, they must bid higher than the proxy bid that is in effect.
  16. How can I show only finished auctions? - You need custom page template with custom query:
    	
    	$args = array(
         'post_type'   => 'product',
         'tax_query' => array(array('taxonomy' => 'product_type' , 'field' => 'slug', 'terms' => 'auction')),
         'meta_query' => array(
    		array(
    			'key' => '_auction_closed',
    			'operator' => 'EXISTS',
    		)
            ),
        'auction_arhive' => TRUE,
        'show_past_auctions' => TRUE
        );     
        
    	$the_query  = new WP_Query( $args );
    	 
    You can download here page template which shows only finished auctions.
  17. Can I make theme with WooCommerce Simple Auctions and sell it on ThemeForest? - Sure, just purchase extended licence and you're good to go. Since the current licenses do not deal with re-selling Items, Envato lets authors to decide whether they grant permission for bundling Items or not. We have the following conditions, and you need to follow them:
    • You cannot redistribute the item "as-is", even if you modify it or you make a derivative version for another platform
    • You cannot offer the plugin as a stand-alone item
    • You cannot include the plugin separately from your theme in the download package
    • You cannot provide an Item Purchase Code for your customers - Since Envato doesn't have a "multi-use" or transferable license, your customers are not entitled to receive an Item Purchase Code with your theme and use the plugin separately from your work.
    • Updating the plugin is your own responsibility
    • Since your customers cannot receive updates from us, you need to handle this on your own
    • You need to handle related support requests after your customers or you can instruct them to buy regular licence and ask us for support directly via our CodeCanyon profile (we cannot provide free support for your customers)
  18. I can't do anything because I get "out of stock message"? - Simple Auctions plugin needs inventory / stock to be enabled. If you have problems all issues should be fixed by upgrading to Woocommerce Simple Auctions v1.1.6
  19. I want to enable users to bid even if they are allready highest bidder? - In update v1.1.25 we have added setting option "Allow highest bidder to outbid himself", please use that setting to allow outbidding.
  20. I have installed WC Vendors and I do not see auction product type? We have noticed that WC Vendors due to some problematic handling of product types (they are hardcoded into plugin!) has problems with auction product type. There is workaround for that. So if you use WC Vendors you can do following:

    in /plugins/wc-vendors/WCVendors/classes/admin/settings/sf-options.php

    find:

    'simple'   => 'Simple',
    'variable' => 'Variable',
    'grouped'  => 'Grouped',
    'external' => 'External / affiliate'
    


    replace:

    'options'  => array(
    'simple'   => 'Simple',
    'variable' => 'Variable',
    'grouped'  => 'Grouped',
    'external' => 'External / affiliate',
                    'auction'   => 'Auction'
    

    in newer version 1.7.9+

    'options' => array( 'simple' => __( 'Simple', 'wcvendors' ), 'variable' => __( 'Variable', 'wcvendors' ), 'grouped' => __( 'Grouped', 'wcvendors' ), 'external' => __( 'External / affiliate', 'wcvendors' ), ),

    replace

    'options' => array( 'simple' => __( 'Simple', 'wcvendors' ), 'variable' => __( 'Variable', 'wcvendors' ), 'grouped' => __( 'Grouped', 'wcvendors' ), 'external' => __( 'External / affiliate', 'wcvendors' ), 'auction' => __('Auction') ),

    - and then you will see http://tinyurl.com/qxvqcey - click save and everything will work fine
  21. How can I update plugin with new version? - Updating is easy. Just overwrite old files with new ones. If you have modified plugin files then you need to be careful when updating so you don't overwrite changes you made.
  22. How to change max bid for proxy bidding? - Add this to theme's functions.php:
    add_action('woocommerce_simple_auctions_before_place_bid' , 'custom_change_maxbid' ,10 , 3);  
     
    function custom_change_maxbid($product_id, $bid,$product_data)     {
        global $product_data;      
        $current_user = wp_get_current_user();
     
        if ($current_user -> ID == $product_data -> auction_current_bider) {
     
            if ($product_data -> auction_proxy) {
     
                update_post_meta($product_id, '_auction_max_bid', $bid);
                wc_add_notice(sprintf('You have changed your maximum bid successfully', 'wc_simple_auctions'));
                $product_data = FALSE;
                return TRUE;
            }    
     
          }
    }	  
    
  23. Is it possible when a customer wins 2 or more auctions they all appear in the cart at the same time and than check-out all items at once? I want more than one auction in cart! - In file woocommerce-simple-auctions\woocommerce-simple-auctions.php find:

    $woocommerce->cart->empty_cart(); 
    

    and comment that line:

    // $woocommerce->cart->empty_cart(); 
    
  24. How to increase bid input field? - Easiest way is by using custom CSS:

    woocommerce simple auction increase bid input field

    You may noticed double plus and minus near bid input field on screenshot above. This is known issue with some themes. For solution see FAQ item no 26.

  25. The Sort by price does not work. Is it posible to sort the auctions based on what has the highest or lowest bid? - Yes, you need to add this modification into your theme's function.php file (http://pastebin.com/TviDF5wq):

     
    add_filter( 'woocommerce_default_catalog_orderby_options', 'custom_woocommerce_catalog_orderby' );
    add_filter('woocommerce_catalog_orderby', 'custom_woocommerce_catalog_orderby');
    function custom_woocommerce_catalog_orderby ($data){
     
      $data['bid'] = "Sort by curent bid";
       
      return $data;
    }
     
    add_action( 'woocommerce_product_query', 'change_woocommerce_product_query',99,2 );
    function change_woocommerce_product_query($q, $wcquery){       
     
            global $woocommerce_loop, $woocommerce;
      $woocommerce_default_catalog_orderby = get_option( 'woocommerce_default_catalog_orderby');
      $orderby_value = isset( $_GET['orderby'] ) ? wc_clean( $_GET['orderby'] ) : false;
      if (!$orderby_value) {    
            if(isset($_SESSION['orderby'])){
                    $orderby_value = $_SESSION['orderby'];
            }
            elseif(!empty($woocommerce_default_catalog_orderby)){
                    $orderby_value = $woocommerce_default_catalog_orderby;
            }
            else{
                    return;
            }
      }
     
      switch ( $orderby_value) {
     
       case 'bid':
                    $q->set('post_type', 'product');
                    $q->set( 'post_status', 'publish');
                    $q->set( 'ignore_sticky_posts', 1);
                    $q->set('orderby', 'meta_value_num');
                    $q->set( 'order', 'asc' );             
                    $q->set('tax_query', array(array('taxonomy' => 'product_type' , 'field' => 'slug', 'terms' => 'auction')));    
                    $meta_query = $woocommerce->query->get_meta_query();
                    $meta_query []= array(
                                                            'relation' => 'OR',
                            array(
                            'key' => '_auction_current_bid'
                            ),
                            array(
                            'key' => '_auction_start_price',
                            ),);
                    $q->set('meta_query', $meta_query);                                            
                    //$q->set('auction_arhive', TRUE);
                    add_filter('posts_orderby','customorderby');
                    break;
            }      
     
    }
     
    function customorderby($orderby) {
            return 'mt1.meta_value DESC, mt2.meta_value+0 DESC';
    }
    

  26. I see two plus and minus buttons near bid input field? - This is known issue with some of the themes (Enfold for example), due to their JS, solution is simple you need to comment out last line (173) in file woocommerce-simple-auctions\js\simple-auction-frontend.js (example of that problem can be seen on screenshot in FAQ no 24):

    		
    // jQuery(function($){$(".auction_form div.quantity:not(.buttons_added)
    
  27. I want to remove automatic relist option for users (for example when using WC Vendors plugin)? Update plugin to v1.1.25. From version 1.1.25 you can use this code to do that (add code to your theme's functions.php file):

    function remove_post_custom_fields() {
    	remove_meta_box( 'Automatic_relist_auction' , 'product' , 'normal' ); 
    }
    add_action( 'admin_menu' , 'remove_post_custom_fields' ,40);
    
  28. Is there a way to enable confirmation before placing a bid? Yes, you can use this code (http://pastebin.com/pKZurFsB):

    function print_my_inline_script() {
      if ( is_product()) {
    	?>
    	<script type="text/javascript">
    		jQuery('.auction_form.cart').submit(function() {
    			var c = confirm("Click OK to continue?");
    			return c; //you can just return c because it will be true or false
    		});
    	</script>
    	<?php
      }
    }
    add_action( 'wp_footer', 'print_my_inline_script' );
    
  29. Does Woocommerce Simple Auctions work with WordPress import / export tools? - Yes, you can export and import auctions with standard WordPress import / export tools that are located in Admin -> Tools menu.
  30. I want to add bid button everywhere not only on single auction page? - You can add following code to your functions.php but you will need to style it properly using CSS (http://pastebin.com/G8H6zwS1):

    add_action( 'woocommerce_after_shop_loop_item_title', 'wpgenie_add_bid_button',50 );
    function wpgenie_add_bid_button(){
    
    	global $woocommerce, $product, $post;
    
    
    	 if(($product->is_closed() === FALSE ) and ($product->is_started() === TRUE )) :
    
    	 	 do_action('woocommerce_before_bid_form'); ?>
    		<form class="auction_form cart" method="post" enctype='multipart/form-data' data-product_id="<?php echo $product->id; ?>">
    			
    			<?php do_action('woocommerce_before_bid_button'); ?>
    			
    			<input type="hidden" name="bid" value="<?php echo esc_attr( $product->id ); ?>" />	
    			<?php if($product->auction_type == 'reverse' ) : ?>
    				<div class="quantity buttons_added">
    					<input type="button" value="+" class="plus" />	
    					<input type="number" name="bid_value" data-auction-id="<?php echo esc_attr( $product->id ); ?>" value="<?php echo $product->bid_value() ?>" max="<?php echo $product->bid_value()  ?>"  step="any" size="<?php echo strlen($product->get_curent_bid())+2 ?>" title="bid"  class="input-text  qty bid text left">
    					<input type="button" value="-" class="minus" />
    				 	<button type="submit" class="bid_button button alt"><?php echo apply_filters('bid_text', __( 'Bid', 'wc_simple_auctions' ), $product->product_type); ?></button>
    				 </div>			
    			<?php else : ?>	
    				<div class="quantity buttons_added">
    				 	<input type="button" value="+" class="plus" />		 	
    					<input type="number" name="bid_value" data-auction-id="<?php echo esc_attr( $product->id ); ?>" value="<?php echo $product->bid_value()  ?>" min="<?php echo $product->bid_value()  ?>"  step="any" size="<?php echo strlen($product->get_curent_bid())+2 ?>" title="bid"  class="input-text qty  bid text left">
    					<input type="button" value="-" class="minus" />
    				</div>	
    		 	<button type="submit" class="bid_button button alt"><?php echo apply_filters('bid_text', __( 'Bid', 'wc_simple_auctions' ), $product->product_type); ?></button>
    		 	<?php endif; ?>
    		 	
    		 	<input type="hidden" name="place-bid" value="<?php echo $product->id; ?>" />
    			<input type="hidden" name="product_id" value="<?php echo esc_attr( $product->id ); ?>" />
    			<?php if ( is_user_logged_in() ) { ?>
    				<input type="hidden" name="user_id" value="<?php echo  get_current_user_id(); ?>" />
    			<?php  } ?> 
    			<?php do_action('woocommerce_after_bid_button'); ?>
    		</form>
    		
    				
    		<?php do_action('woocommerce_after_bid_form');
    
    	 endif;	
    
    }
    
  31. How can I enable user registration on login page? - You need to enable that feature in Woocommerce settings.
  32. I have installed your plugin but images are not aligned, buttons are too small / big, input fields needs to be smaller / bigger, can you help? - In short no.

    It's your duty to modify plugin template to match your style and theme. Themes can implement different ways how they customize pages and parts of Woocommerce. We cannot guarantee that our plugin will look same as in our demo for every possible theme out there. Web developing is more than getting a theme and couple plugins, enabling them and deliver web site. Our templates are coded by standards and they adhere to WordPress and WooCommerce template structure. That means that minimal intervention is needed from client side, but sometimes there is no way to avoid template changes. Some themes use similar structure and have minimal interventions in structure and our plugin looks good out of the box and some do not. It's your task as web developer and client who purchased plugin to modify and customize plugin templates to match your own (or client's) needs and styles. This is part of developing a web site. You cannot expect that everything will be perfect for every possible theme and plugin comibation out there or that we will do your job for you as part of support. We support plugin - we do not style and customize client's sites. Thanks for understanding.

    Right way to customize plugin's templates is to copy contest of plugin_dir/woocommerce-simple-auctions/templates/ directory to your_theme/woocommerce/ directory and do modifications there.

    When you ask us for support make sure it's not related to tasks we don't do as part of support:

    - style or customize your theme to do this or that
    - provide support for bugs caused by 3rd party plugins or themes (we can pinpoint that some plugin is problematic)
    - send you CSS or HTML code for modifying html elements
Back to top