Want to Modify 'Drag and Drop' to Create Shopping Application - Soliciting Advice

I have an idea for modifying an existing Content type (Drag and Drop) to create an application I would like to use: a virtual shopping cart.

The way I envision doing this is as follows:

1. Start with the Drag and Drop content type. Create only one drop zone; this drop zone will act as the shopping cart, where items are dragged to add to the cart. Add the items available for purchase, one-by-one, as draggable images.

2. Make two software modifications to enable the functionality I would like to have:

   a. Allow multiple instances of each draggable image to be placed on a single dropzone, to simulate buying more than one of the same item. Currently, with the Drag and Drop content type, it is not possible to drop multiple instances of a single draggable item onto the same drop zone.

   b. Revise the scoring of the content type. Instead of assigning 1 point for each correct answer, assign a configurable number of points to each draggable image, which will correspond to the price of the image. This way, when the score is checked, the total price of all "purchased" items will be displayed.

Initially, I do not plan to make a feature request for either of the above (a) or (b) modifications, as I suspect that these are not features that would be useful to many users of Drag and Drop.


The questions I have at this point, for anyone who cares to answer, are:

1. Does this approach sound feasible?

2. Does anyone know of any already-existing method to implement either of my desired modifications, without the need for me to make my own code modifications?

3. Are there any other recommendations before I begin this project?

Thanks kindly for any help you are able to offer.

Content types: 
BV52's picture

Hi lincstraich,

Let me try to answer most of your questions :-)

1. Allowing multiple draggables to be dropped in a single drop zone is possible. All you need to do is set it on the Drop zone settings (screenshot attached).

2. Revising the scoring should be possible. On top of this there is a need to change the code for the draggables to receive the custom scores/price. Of course there is also a need to have the content add up the scores.

3. In terms of implementation I don't know if anyone has created a version of DND that is similar to what you envision it.

4. Overall this is possible since most of the core functionality is already there.


Thank you for your kind and helpful answer!

Actually, what I want to allow is for the SAME draggable to be dropped multiple times into the same dropzone. This would be done to simulate buying multiple copies of the same item. For example, I would create one instance of a "red shirt", but allow mulitple copies of this one item to be dragged to the same dropzone, each one adding to the total price. I am fairly certain that it is NOT currently possible to do this with the Drag and Drop content, even if I check or uncheck the box you showed in your post.

BV52's picture

Hi lincstraich,

You right sorry I misread your first statement. You are correct this is not possible with the current features of the content.