Page 1 of 2

[MOD] Global Quantity with Drop Down Menu

Posted: Thu Apr 21, 2011 2:22 am
by hydrowire
Hi all,

Extension: Global Quantity with Drop Down Menu

This extension enables quantity to be displayed as drop down menu or radio button in a table with global admin support. This is useful if you want to limit your customer to order your product in a specific amount, such as in pairs or dozens.

Check it out here:
http://www.opencart.com/index.php?route ... on_id=1886

Demo for OpenCart 1.5.0.x
Front-end Store: http://ocdemo.kfstuff.com/gqs
Back-end Admin: http://ocdemo.kfstuff.com/gqs/admin
Username: demo
Password: demo

Or try out demo for OpenCart 1.4.9.x here:
Front-end Store: http://ocdemo.kfstuff.com/gfq
Back-end Admin: http://ocdemo.kfstuff.com/gfq/admin
Username: demo
Password: demo

This is an enhancement from 'Quantity Drop Down Menu' available for free in the OpenCart Extensions. In this enhanced version, you will be able to set fixed quantity values quickly across multiple products and manage those quantity sets conveniently under one single page section instead of setting it one-by-one in product edit page previously. However, the original functionality of 'Quantity Drop Down Menu' is still available for use in version 1.0(OpenCart 1.4.9.x only) whereby you can override any product quantity set you have defined globally in each of the product.

Features and Benefits:
  • Display quantity as drop-down list or radio button in table
  • Display discounted amount if any
  • Easily assign 1 quantity sets to multiple products
  • Customer will not be able to choose any quantity outside of the quantity set
product15.png

product15.png (77.43 KiB) Viewed 15829 times

Quantity values as Drop-down list
product15_2.png

product15_2.png (83.52 KiB) Viewed 15829 times

Quantity values in a table
admin15.png

admin15.png (27.61 KiB) Viewed 15829 times

Easily manage your quantity sets under 1 single place.

More Screenshots and Download

Feedbacks are welcome, thanks!

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Sun Jun 26, 2011 2:35 am
by milkyway
Hi Hydro i need your help i wish to ask my project is related to show the product in table format will this work for my client site.

http://forum.opencart.com/viewtopic.php?f=112&t=34085

I have done the projects in Os commerce with ease they have provided admin with the filed to add the products attributes for this same product say 2GB, 4Gb and so one and the prices comes to table format Not in drop down so the customer can see the Maximum Quantity and further Bifurcation for per piece, but in Opencart there are no such field to insert these attribute values and quantity filed can you suggest and come out with the same module for this version http://www.opencart.com/index.php?route ... on_id=1886 which you have done it quite great :)

Thanks please help

Regards

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Tue Jun 28, 2011 6:17 pm
by hydrowire
Hi everyone,

Extension updated and support for OpenCart 1.5.0.x is out now!

Check it out here: http://www.opencart.com/index.php?route ... on_id=1886

Thanks!

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Fri Jul 15, 2011 4:42 pm
by milkyway
Hi Hydro thanks for all your Support thru out the beginning :)

I guess only you and Few (2 or 3) other who are keep on moving Opencart rest its like No one here to listen to forum i really appreciate and thanks for you.

Hydro i check the Global quantity and its working fine here is the link i did install it but i am still not getting the Display as i wanted.
http://bluecrome.co/index.php?route=pro ... duct_id=44

I want the final display as this site http://www.topills.com/order-viagra.html where every quantity has its own add to cart button in the same row

In your module case i get the Quantity box [] and Add to Cart Button at the bottom of the table

Can you please make the display as i gave you the reference site

Many thanks for your great Work

Regards
Finn

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Fri Jul 15, 2011 6:01 pm
by hydrowire
Hi Finn,

I just noticed you sent me the same message through private message, so I've replied over there. Please check.

Thank you.

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Sat Aug 06, 2011 3:27 am
by milkyway
Any updates Buddy :)

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Fri Jan 20, 2012 12:35 am
by Ghekko
Hi,

I have just installed the mod and have a small issue. Using OC 1.5.1 and Global Quantity version 1.2.1

The install was fine and then following the instructions...

5.9. Product: Add any number of product to this quantity set. #
# To add a product, type in product name and select from a drop- #
# down list that appears.

No drop-down list appears and I get "At least 1 product required!" if I type in a product name and then save.

Any ideas or help much appreciated.

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Fri Jan 20, 2012 12:54 am
by hydrowire
Hi Ghekko,

Are you using vqmod? Make sure you choose the appropriate folder to copy according to your opencart version. Do you have other extensions installed in your store?

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Fri Jan 20, 2012 2:50 am
by Ghekko
Hi,

Thank you for the quick response.

Yes, I have vqmod installed and I used the option 2 folder with the contents of OC_1.5.0.x - OC_1.5.1.2 folder. I think this is correct.

What should I look at next?

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Fri Jan 20, 2012 4:03 am
by hydrowire
Hi Ghekko,

Can you please send me a temporary FTP login and admin login to your store through private message so that I can have a look at it?

Thanks!

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Sat Feb 04, 2012 7:35 am
by sopedro

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Wed Oct 31, 2012 9:11 am
by beldox
Hi,
i have installed this module but i have a problem with other extensions like "Live update product price" or "price update (vqmode)"... they can not update the price with the quantity set at Global quantity...
Regards,

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Sun Nov 18, 2012 5:59 pm
by hydrowire
Hi beldox,

Please send a support email to 'support [at] opencart.my' with your store URL so that I can have a look at the issue.

Thanks!

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Sat Dec 28, 2013 9:08 pm
by milkyway
Hi Mate its been long time Merry Christmas to you :) and Happy New Year 2014

I was looking for Opencart plugin for Products attributes prices in multiple quantity options and opencart with mobile compatible.

Do you have any add on for the above
thanks regards
Finn

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Sat Dec 28, 2013 9:29 pm
by hydrowire
Hi Finn,

Not really but you can check out my other extension "Product Option Discount" which allows for quantity options but only single option:
http://www.opencart.com/index.php?route ... on_id=1888

Merry Christmas and Happy New Year to you too!

Thanks!

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Mon Apr 21, 2014 2:40 am
by IP_CAM
I found an old Mod to do this in a rather nice way, but the Author did not update it anymore, so, I added a little to it. This Mod does not require anything else, it needs no Admin Settings, it just counts one up or down.

Source:

http://www.opencart.com/index.php?route ... load_id=31

Page to modify:
catalog/view/theme/default/template/product/product.tpl
---
OC v1.5.6.1 Original Script, about Line 221:
---
FIND:
---

Code: Select all

	<div class="cart">
	<div><?php echo $text_qty; ?>
        <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
	<input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
         &nbsp;
---
REPLACE WITH:
---

Code: Select all

<div class="cart">
<script>
	$(document).ready( function() {
	var elm = $('#htop');
	function spin( vl ) {
	elm.val( parseInt( elm.val(), 10 ) + vl );
			}

			$('#increase').click( function() { spin( 1 );  } );
			$('#decrease').click( function() { if (elm.val () > 0 ){spin( -1 ); } });
	});
</script>
<input type="button" id="decrease" value="-" />&nbsp;<input type="text" name="quantity" id="htop" size="1" value="<?php echo $minimum; ?>" readonly/>
<input type="button" id="increase" value="+" />&nbsp;<input type="hidden" name="product_id" size="1" value="<?php echo $product_id; ?>" />
&nbsp;
---
Then, on the already modified Product Page, around Line 382
---
FIND:
---

Code: Select all

$('#button-cart').bind('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/cart/add',
---
REPLACE WITH:
---

Code: Select all

$('#button-cart').bind('click', function() {
var available_quantity = <?php echo $available_quantity; ?>;
var minimum_quantity = <?php echo $minimum; ?>;

  $('.quantity_error').remove();
  if(parseInt($('input[name="quantity"]').val()) > available_quantity || parseInt($('input[name="quantity"]').val()) < minimum_quantity) {
    $('input[name="quantity"]').closest('.cart').append('<span class="quantity_error" style="color:red;font-size:13px;display:block;">Artikel ist in dieser Anzahl nicht lieferbar.</span>');
    return false;
  }
  
	$.ajax({
		url: 'index.php?route=checkout/cart/add',

and LEAVE, whatever follows the >>url: 'index.php?route=checkout/cart/add',<< Line, in it's Place!
Change this >>Artikel ist in dieser Anzahl nicht lieferbar.<< to any language required, or you could create/use a Variable in order to make it multilanguage compatible.
The Font/Color -Type can be set in this part: >>color:red;font-size:13px;<<

see here how it works:

http://www.ipc.li/shop/index.php?route= ... duct_id=40

If one likes to allow Customers to manually change the Quantity-Value, remove the >>readonly<< word where it is placed in one of the input Routines above.

if the Script has not been damaged by pasting it here, the Mod should work as it is taken directly from my File.

Info for All using lots of VQMOD's in the Product-Display Section:

The <div class="cart"> Line is beeing used as ANCHOR for many different VQMOD's available. So, make sure that no VQMOD will collide when installing this 'hardcoded' Modification. Specifically, VQMOD's calling for 'Action' by placing anything 'AFTER' the <div class="cart"> Line, can endanger functions as well as placement order.

That's it, hopefully, took me a while to remember and include everything here. Good Luck!
Ernie

PS. Remember, back up the file first in case you screw up!

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Fri Oct 31, 2014 7:43 pm
by pstruh
HI,
can you help me to update your script to work with minimum quantity ? I have set min quantity to 5 and I would like to click on + button and should increase like 5,10,15 ... etc.. If I set min qty to 10 then after the click on +- 10,20,30 ...
Is that possible ?

Thank you for your help.

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Sat Nov 01, 2014 5:14 pm
by hydrowire
Hi pstruh,

The +/- buttons is probably from your custom theme. Further custmozition is required to make custom theme +/- button work with Global Quantity.

Please send me a support email(address in readme.html) together with a temporary FTP & admin login details to your store host & store administration to request for further support.

Thanks!

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Tue Nov 04, 2014 3:25 am
by pstruh
Hi,
in fact I would need this also for default theme. I will arrange temp ftp access as well.
Can you modify this for default theme as well ? Its now working for now. I have set min quantity for one product to 5. On product page is show 5 between + and - buttons, but if I press + is increase to 6 instead of 10 how I would need.

Thank you for your support!

Re: [MOD] Global Quantity with Drop Down Menu

Posted: Thu Jun 11, 2015 4:45 am
by IP_CAM
OC v.1.5.6.x Users, look here:

http://www.opencart.com/index.php?route ... n_id=10141

Just two changes have to be made in the XML File:

Change:

Code: Select all

$_['button_cart_product']           = 'PŘIDAT DO KOŠÍKU'; // Dát do košíku | Koupit | Přidat do košíku
to:

Code: Select all

$_['button_cart_product'] = 'Add to Cart';
Change:

Code: Select all

<file name="catalog/language/czech/product/product.php">
to:

Code: Select all

 <file name="catalog/language/*/product/product.php">
and it works well!

I added a READ ONLY 'Blocker', to keep Users from entering numbers (or evil Code!) directly into the Form Field:

Code: Select all

<?php echo $minimum; ?>" style="text-align:center;display:inline-block;line-height:24px;vertical-align:middle;" readonly />
Sample Product Page here:
http://www.bigmax.ch/os/index.php?route ... ct_id=3287

Good Luck
Ernie