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

disable drag and drop for some products

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 09-16-2014, 08:40 PM
 
juancho juancho is offline
 

Advanced Member
  
Join Date: Mar 2014
Posts: 47
 

Default disable drag and drop for some products

Hi

Is there any way to disable "drag and drop me to the cart" for just some products? It seems to me that only the products that don't have options to configure by the customer should be turned on for drag and drop.

In case this is not possible, how can I disable drag and drop for all products?

Thanks
__________________
X-Cart Business 5.0.12
Reply With Quote
  #2  
Old 09-18-2014, 11:18 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: disable drag and drop for some products

There is a setting that does what you are looking for - the "Force customer to choose product options before adding a product to cart" checkbox on the "Store setup" -> "Cart and Checkout" back-end page.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 09-20-2014, 08:34 AM
 
juancho juancho is offline
 

Advanced Member
  
Join Date: Mar 2014
Posts: 47
 

Default Re: disable drag and drop for some products

thanks, that works pretty well.

Thanks again
Juan
__________________
X-Cart Business 5.0.12
Reply With Quote
  #4  
Old 09-20-2014, 09:49 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: disable drag and drop for some products

Juan,
If you want to prevent all products from being draggable, decorate the class XLite\Controller\AController

This method:
Code:
/** * Currently the drag and drop cart feature is disabled for the mobile devices * * @return boolean */ protected function getDragDropCartFlag() { return !\XLite\Core\Request::isMobileDevice(); }

Just change it to return false.
__________________
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:
tony_sologubov (09-23-2014)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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 02:40 PM.

   

 
X-Cart forums © 2001-2020