X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Products with variants add to cart more than once? (https://forum.x-cart.com/showthread.php?t=28096)

loopsound 01-17-2007 03:21 AM

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.

wjbrewer 01-17-2007 06:31 AM

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)); 


loopsound 01-17-2007 07:00 AM

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.


All times are GMT -8. The time now is 10:26 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.