Jump to content

Best way to structure custom orders site


porl
 Share

Recommended Posts

Hi all

I am currently working on a custom orders site for a client. One thing that I'm racking my brain over is how to structure some fields that seemingly require relationship with other pages. Not sure how to describe that properly so here is the basic idea:

Templates

  • Product types (self explanatory)
  • Customer (also self explanatory, likely custom user pages but could be separate if necessary)

So far so good. Now, each product type needs an image field. The tricky part is that each product's image field needs to have the ability to have a different image for each customer (the orders are for unique customised items and the site will display images of how they will appear).

My current thought is to make the product_image a repeater that holds two fields for each item: an image field and a page_ref filtered to the customers. It could also be reversed - customers have the image repeater containing the image field and a page_ref to the product types.

Is there a cleaner way to do this? Ideally I would like to have a field that is a table of some sort that automatically shows all the customers and you can assign an image to each. I thought of making a custom field like this but then felt out of my depth - what to do when a customer is deleted for example? Is there some field module that has some ability to load a reference to other pages or something like that? Or some way I can easily "hook" the repeater field/table field etc. to do a "foreach" of current customers (that wouldn't fall apart if the customer list changed)?

Of course I can do it with my current thought, however I felt this is not intuitive for an end user (they would need to go through any page list to make sure they got every one for instance) and since so many people here have clever ideas I thought I'd see if there was any other approach.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...