My quantity widget is enabled however the text field isn't showing up on the product display. I have gone into the code and replaced

if ($show_quantity) {
	  $form['quantity'] = array(
        '#type' => 'textfield',
        '#title' => t('Quantity'),
        '#default_value' => $default_quantity,
        '#datatype' => 'integer',
        '#size' => 5,
        '#weight' => 45,
      );
    }
    else {

with

if ($show_quantity) {
	  $form['quantity01'] = array(
        '#type' => 'textfield',
        '#title' => t('Quantity'),
        '#default_value' => $default_quantity,
        '#datatype' => 'integer',
        '#size' => 5,
        '#weight' => 45,
      );
    }
    else {

And the text field then shows up. Any ideas why it might not be working?

Comments

mesch’s picture

So the only thing you changed is the key of the form element from 'quantity' to 'quantity01'? If so, then your quantity setting seems to be set just fine.

More than likely you have another module installed that's interfering with the 'quantity' element, either by disabling it, hiding it (could be on the page put hidden), or overwriting it with another element.

karamuse’s picture

You were right, when I updated commerce license to version 7.x-1.3 it eliminated the quantity field. I reverted to the previous version and it was back. more info at https://www.drupal.org/node/2334121

karamuse’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.