Post by mahe2913 » Wed Dec 29, 2010 12:46 am

Hi

Has anybody created quantity in a drop down list.

Please let me know.

Thanks,
Mahesh

Newbie

Posts

Joined
Tue Dec 28, 2010 11:58 pm

Post by Qphoria » Wed Dec 29, 2010 4:27 am

http://forum.opencart.com/viewtopic.php ... ity#p48602

or use the attached xml file with VirtualQMod (change the theme from "default" to your template if using something different)

Attachments


Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by philbydevil » Mon Feb 07, 2011 7:53 pm

I can't seem to get this to work. I'm using a template and have changed the template name (plus added <td> to the start of the code to find/replace), but it's breaking my page.

Here's the code around the line to change:

Code: Select all

              <div class="content-add_to_cart">
				<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
				<?php if ($options) { ?>
				  <b><?php echo $text_options; ?></b><br />
					  <?php foreach ($options as $option) { ?>
						<tr>
					    <td><?php echo $option['name']; ?></td>
						<td>
						  <select name="option[<?php echo $option['option_id']; ?>]">
							<?php foreach ($option['option_value'] as $option_value) { ?>
							<option value="<?php echo $option_value['option_value_id']; ?>"><?php echo $option_value['name']; ?>
							<?php if ($option_value['price']) { ?>
							<?php echo $option_value['prefix']; ?><?php echo $option_value['price']; ?>
							<?php } ?>
							</option>
							<?php } ?>
						  </select>
						</td>
						</tr>
					  <?php } ?>
				<?php } ?>
					<tr>
						<td><?php echo $text_qty; ?></td>
						<td><input type="text" name="quantity" size="3" value="<?php echo $minimum; ?>" />
						<a onclick="$('#product').submit();" id="add_to_cart" class="button"><span><?php echo $button_add_to_cart; ?></span></a>                    
						<?php if ($minimum > 1) { ?><br/><small><?php echo $text_minimum; ?></small><?php } ?>
						</td>
					</tr>
				</table>
              </div>
Any idea why it wouldn't be working? I tried a couple of other variations (just table/div structure) but it just shows a blank page.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by hydrowire » Wed Apr 13, 2011 10:20 pm

Hi, maybe you can try out this extension for free here.

Download link: http://www.opencart.com/index.php?route ... on_id=1881

It not only show the drop down menu on product page, but on your shopping cart page as well. Plus it has admin support for you to easily manage your quantity set values per product.

More info: http://forum.opencart.com/viewtopic.php?f=119&t=30320

Developing Quality OpenCart Extensions since 2011.
View my extensions


User avatar
Active Member

Posts

Joined
Wed Jan 26, 2011 5:41 pm

Who is online

Users browsing this forum: No registered users and 2 guests