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

Limit Purchase to 1 Item

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-21-2013, 05:20 AM
 
momentum momentum is offline
 

Senior Member
  
Join Date: Jun 2011
Posts: 120
 

Default Limit Purchase to 1 Item

Hello Great Forum

I have an odd request.

1. This store sells business cards in bulk of 250, 500, 1000,

2. We of course have many in stock so they can order many boxes as they want.

3. What I want is to limit the amount of items they add to the cart as 1

4. Which means I have 10,000 in stock but he can only add 1 at a time to add to cart.

5. I have a drop down box for the customer to choose the 250, 500, 1000 but I want her to only have the ability to add 1 box to the cart at a time.

6. If he wants to boxes he has to add the 2nd box to the cart and he can only add 1 at a time

So, what do you think can this be done?
__________________
X-Cart version 4.6.4 GOLD
X-Cart version 4.6.1 GOLD
X-Cart version 4.5.5 GOLD
X-Cart version 4.5.4 GOLD
X-cart Version 4.5.3 GOLD
X-cart Version 4.4.3 GOLD
X-cart Version 4.4.2 GOLD
PHP 5.3.27
MySQL client 5.5.37
Linux
Reply With Quote
  #2  
Old 02-24-2013, 02:38 AM
 
YBizzWeb YBizzWeb is offline
 

Member
  
Join Date: Apr 2011
Location: Florida, USA
Posts: 13
 

Default Re: Limit Purchase to 1 Item

If i understand you correctly, you have options of 250, 500, and 1000 cards per box that customers can order. Then you have the quantity of products to purchase select box.
If this is correct, i would solve this by changing the qty select box with hidden qty input field with value of 1.
__________________
George Hap
Creative X-Cart solutions at:
YBizz Web Development Company

Save time and money with our Pre-made X-Cart Templates and Skins

Powerful X-Cart Search:
AlteredSearch - Providing Better Search Results
Reply With Quote
  #3  
Old 02-25-2013, 04:09 AM
 
momentum momentum is offline
 

Senior Member
  
Join Date: Jun 2011
Posts: 120
 

Default Re: Limit Purchase to 1 Item

Hello

I love your idea; however, I am not sure how the following gets implemented for this one product.

You write, "If this is correct, i would solve this by changing the qty select box with hidden qty input field with value of 1."

Is this something easy to do.
__________________
X-Cart version 4.6.4 GOLD
X-Cart version 4.6.1 GOLD
X-Cart version 4.5.5 GOLD
X-Cart version 4.5.4 GOLD
X-cart Version 4.5.3 GOLD
X-cart Version 4.4.3 GOLD
X-cart Version 4.4.2 GOLD
PHP 5.3.27
MySQL client 5.5.37
Linux
Reply With Quote
  #4  
Old 02-25-2013, 06:18 AM
 
YBizzWeb YBizzWeb is offline
 

Member
  
Join Date: Apr 2011
Location: Florida, USA
Posts: 13
 

Default Re: Limit Purchase to 1 Item

Hi there,

If you want to make this more universal for future products as well, i would be checking product options to determine how to display the qty field.

For example, if product options (name/value) meat your criteria then us hidden input field for your qty and set the value to 1, otherwise show the select box for the qty.

Also, if this is the only product with this scenario, you can always check for product ID to determine the qty display.

This can all be done within the template itself.

Hope this helps, and if you find yourself having issues doing this, we can always help.
__________________
George Hap
Creative X-Cart solutions at:
YBizz Web Development Company

Save time and money with our Pre-made X-Cart Templates and Skins

Powerful X-Cart Search:
AlteredSearch - Providing Better Search Results
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:15 AM.

   

 
X-Cart forums © 2001-2020