Skip to content

Instantly share code, notes, and snippets.

@simonlk
Created August 17, 2013 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save simonlk/6254601 to your computer and use it in GitHub Desktop.
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
Copy link

nixhere commented Feb 10, 2014

Hey,

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

@kbuiza
Copy link

kbuiza commented Aug 17, 2017

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