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

Products with variants add to cart more than once?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-17-2007, 03:21 AM
 
loopsound loopsound is offline
 

Advanced Member
  
Join Date: Feb 2004
Posts: 85
 

Exclamation Products with variants add to cart more than once?

I am a little stuck. I sell purely downloadable goods and obviously only need each product that is added to the cart to appear once.

However, my products with variants (i.e download options) that redirect to the product details page allow me to add the same product as many time as you like. Not good, seeing as I have removed the quatity selection drop-down from the cart.

Can any help me stop products with variants being added on multiple occassions

All help recieved gratefully.
__________________
xcartgold 4.5.4
xcartgold 4.5.5
Reply With Quote
  #2  
Old 01-17-2007, 06:31 AM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default Re: Products with variants add to cart more than once?

To allow items to be added to the cart only once change this line in include/cart_processes.php (around line 133)

PHP Code:
if (!empty($active_modules['Egoods']) && !empty($added_product['distribution']))
        
$amount 1;
    else
        
$amount abs(intval($amount)); 

Comment out every line except the $amount =1;

PHP Code:
//if (!empty($active_modules['Egoods']) && !empty($added_product['distribution']))
        
$amount 1;
    
//else
        //$amount = abs(intval($amount)); 
Reply With Quote
  #3  
Old 01-17-2007, 07:00 AM
 
loopsound loopsound is offline
 

Advanced Member
  
Join Date: Feb 2004
Posts: 85
 

Default Re: Products with variants add to cart more than once?

Thanks for your reply but that does not appear to work. I am still able to add more than one of the same product from the product details page.

I am using Download Expander so I don't know if it has something to with that aswell.

Any more thoughts or ideas would be excellent.
__________________
xcartgold 4.5.4
xcartgold 4.5.5
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:23 AM.

   

 
X-Cart forums © 2001-2020