Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Quantity Steps for Input boxes?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-27-2012, 08:33 AM
 
katfal36 katfal36 is offline
 

Member
  
Join Date: May 2012
Posts: 24
 

Smile Quantity Steps for Input boxes?

Hi all, I have searched the forum for how to customize the quantity input box to only allow a min order amount and implemented that, but has anyone figured out how to do step quantities in the input boxes, like this store does: http://goldsilver.com/buy-online/liberty-silver-round/

Our products are created to order so don't want a mile long quantity select box.

Thanks in advance!
__________________
X-Cart Gold 4.5.1
Linux Dedicated Server
Mods: XMenus., XBanners, BCSE Testimonials, BSCE Abandoned Cart
Reply With Quote
  #2  
Old 05-27-2012, 09:55 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Quantity Steps for Input boxes?

It's not easy to do because of the Javascript associated with the quantity box. You will need to edit the Javascript, and customize it to only allow your specified quantities.

You can change the quantity input type to a text field in the admin panel.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
katfal36 (05-27-2012)
  #3  
Old 05-27-2012, 07:07 PM
 
katfal36 katfal36 is offline
 

Member
  
Join Date: May 2012
Posts: 24
 

Default Re: Quantity Steps for Input boxes?

Thank you totaltec, any clues to where I might find the javascript I need to change?
__________________
X-Cart Gold 4.5.1
Linux Dedicated Server
Mods: XMenus., XBanners, BCSE Testimonials, BSCE Abandoned Cart
Reply With Quote
  #4  
Old 05-28-2012, 12:09 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Quantity Steps for Input boxes?

investigate that coin page for behavior using Firebug. check what js is loaded to find the code dealing with quantity box. you can debug js, watch for variable. then do a search inside the js file for that variable. adapt this code to your XC.
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #5  
Old 05-28-2012, 04:08 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Quantity Steps for Input boxes?

Look at /common_files/form_validation_js.tpl, you will see the javascript related to maxquantity and minquantity around line 38.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #6  
Old 05-29-2012, 02:32 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: Quantity Steps for Input boxes?

The example link wasn't really showing me anything. Are you wanting this?

http://wufoo.com/html5/attributes/04-minmaxstep.html
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote
  #7  
Old 05-29-2012, 03:15 PM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: Quantity Steps for Input boxes?

Not sure if this is what your after but you can check out the following thread
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:32 AM.

   

 
X-Cart forums © 2001-2020