Skip to content

Instantly share code, notes, and snippets.

@simonlk
Created August 17, 2013 00:23
Show Gist options
  • Select an option

  • Save simonlk/6254601 to your computer and use it in GitHub Desktop.

Select an option

Save simonlk/6254601 to your computer and use it in GitHub Desktop.
Change the quantity inbox box to a dropdown. Add to theme/woocommerce/single-product/add-to-cart/quantity.php
<?php
/**
* Single product quantity inputs
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.0.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>
<div class="quantity">
<select name="quantity" class="input-text qty text" style="width:250px;">
<option value="">Quantity:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
@nixhere

nixhere commented Feb 10, 2014

Copy link
Copy Markdown

Hey,

Does this change quantity input type on Cart page as well?

@kbuiza

kbuiza commented Aug 17, 2017

Copy link
Copy Markdown

how to update the total price by selecting value quantity on dropdown list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment