1

This has been bugging me for days, I just can't wrap my head around this situation/process and how to make it work in Drupal.

I'm making a photography competition website where a user who signs up and buys a role has the choice to upload 3(costs £4), 10(costs £6) or 20(costs £10) images but each image needs to be a part of a competition category, so say someone uploads 3 images, one is for black and white category (taxonomy term), one is for wide angle and one is for sport, each image needs to be tagged with the correct category, of which im using taxonomy terms. But how do i go about this?

Firstly limiting the user to said amount of photos? I was thinking they buy a role (there are 3 roles), role one allows to upload 3 images using the content type 3 images, role two allowed to upload 10 images on a node and the final content type is '20 images' and they can upload up to 20 images using that content type, each user though must be able to categorise each individual image using the taxonomy vocab already created called Photo Categories. How the hell do i tag each individual image so that they are categorised and ready for viewing/judging later on??

Should I do this on the user profile instead? So that when they buy their role, they can then upload the amount of photos that they are allowed to? This will still mean I have the problem of assigning each image to a taxonomy term.

Also, is purchasing a role the best way to go about this? Now that you know what I am after what are your thoughts? I know Drupal can do this 'out of the box', i'm just struggling to see what workflow the end user will go through to achieve all of this.

1

I would look at Node Limit. So the user buys roles and that gives them access to create more content.

Then create a content type for Entry with all the appropriate tag fields.

I like the purchasing the role structure. I wouldn't do this directly on the user

| improve this answer | |
  • So you wouldn't add the images directly on the user? Is that what you are saying? All the rest sounds feasible and like it could be managed well. – effortDee Jul 27 '15 at 21:01
  • 1
    Correct, I would associate the nodes with the user via author rather than creating the images as a field on the user entity – fullerja Jul 27 '15 at 21:03
1

There are different ways to go about this, but this doesn't have to be that difficult.

I would go for a process, where the user creates the nodes during checkout. This is a simple approach, as he can only create the nodes during purchase time. It sounds like that could work well for your situation.

There is a module that does something like what you explain: https://www.drupal.org/project/commerce_node_checkout

You should also be able to set this up with Rules and fields.

You could create a field collection on the line item for buying images. The field could be unlimited values where each item would be an image that needs to be created. You would then attach fields on the field collection that you require for each image, (the image file, category, and other data about the image)

You could create a price rule that would count the number of items on the field collection and calculate the price based on that.

You could create another rule executed at checkout complete where you loop through each item in the field collection and create a node with the values supplied. Then it's just a matter of requiring the user to input terms or other meta data you want/need in the field collection.

| improve this answer | |
  • I like this approach, but feel it's slightly too rigid for the end user who is competing in the competition. Actually perfect for another site I'm working on with a client where they run a directory and wish to charge for submissions. – effortDee Jul 27 '15 at 21:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.