5 users online. Create an account or sign in to join them.Users

Search

Dear folks,

I tried searching the site for a similar problem to no avail. Would it be possible to do the following with existing functionality/extensions?:

Let’s say I have a section A like this:

  • Order
  • Name
  • Address

And I have a second section B containing only parts of the first one:

  • Name
  • Address

Is there a way to have a button in section A that creates a new entry in section B with the values of the current entry? I guess one would have to hack a custom extension, or did I miss?

Thanks in advance for your help!

Is this something you like to do once for all entries or every time you create a new entry?

I’d like to have the possibility to do this manually for a specific entry, like with a button on an entry edit page.

After extensive one-man brainstorming the following concept came to my mind:

  • include section B in section A via a Subsection Manager field
  • fiddle some custom-js to copy the field data from section A to section B inside the Subsection Manager via a button-click

The only problem could be that the Subsection Manager is inside an iframe, but I guess i should still be possible?

Edit: maybe using the Bi-Link Field instead would work even better for me

That seems quite complex: what's the main reason behind having two sections with nearly identical content?

I know this may sound a bit roundabout, but:

One Section would be for orders, one for customers. In order to avoid the need for the customer to register as a user, and to make it possible to manage user data manually, the order would include all the customer data.

If a customer submits his first order, the shop-admin can create a new customer in section B, if not, he can link to an existing extry (plus update the data if needed).

Using a Bi-Link-Field, the order would then be reflected when looking at the customer section (B) too.

Does this make sense? :)

If I understand correctly, you want to copy some content (i.e. without building a relation)?

In this case you could hack the Duplicate Entry extension to do the job.

Is this a front-end form? If so, why don't you just make the form post the order to one section and name and address to the other? I'm not sure, but it should be possible to directly link these entries using SBL or similar.

You customers won't notice what you are doing in the background – it would be one step for them.

In the past I have developed e-commerce systems where registration is optional. So if you have two sections Orders and Customers with a select box link relating the two, it would be an optional field when submitting an order. Equally, the Order record would actually duplicate many of the fields from a customer record — this is one time that you do not want the data to remain normalised, so that the billing/delivery details are frozen at the point of order for historical purposes.

Are you submitting this data from frontend events? If so, you give the user the option to log in/register or not, and they add their addresses to their profile. When they place an order, you pre-populate the order address fields from their profile and these are saved into the orders section.

In the backend, if you need to supplement the customer select box link with more details (perhaps pulling a summary of their profile into the order screen) you can use the HTML Panel field (see its documentation for an orders/basket scenario).

Thanks a lot Michael, Nils and Nick!

@nick Actually, in order to reduce complexity we would like to drop registration alltogether, since the are only very few returning customers. Though I understand that most of the times an optional registration would be the ideal solution. The HTML-Panel is a nice extension I haven’t come across yet. Might actually use this somewhere else! Thanks :)

@michael Hacking the duplicate entry extension sounds like a good idea, though I’m not sure I’m up to the task. Will try and see if my PHP-skills are sufficient … probably not.

@nils I thought about creating both sections and link them when the customer places an order. But since my client wants to manage his customers manually, and this would mean returning customers turing into duplicate customers, I would like to have the possibility to create a customer or link to an existing one manually (the link might actually not even be needed).

Why don't you treat the first customer's order form as a registration form also? When they enter their personal details this would create the customer entry and return the customer ID, which you then save against the order when its submitted from a "review your order" form.

Problem here is there is no way to reconcile existing orders to a customer record. If you create a customer record at the point of purchase you need to assume a unique identifier, perhaps an email address, which means subsequent customer records cannot be created.

This sounds a bit like a broken business process more than anything :-/

Yes, the order processing is less than ideal. However there’s currently an order a day, and orders a processed totally manually anyway. So it should do I hope. Currently the whole shop is a simple form.

I actually thought about the unique-identifier thing too, but I guess if a returning customer wants to change any data this would not be saved then?

It’s quite a big step from the beforementioned form to a »more proper« shop …

For each entry in section B, generate a private or hidden RSS feed and then import the data from section B to section A using the XML Importer extension or vice versa. Though, you would run into issues if your customers decide to modify their data, in which you would need to re-run the XML Importer. If you can somehow automate that, it should technically work.

Not sure if this will fit your needs, but i'm just throwing this out there. Whatever you do, tell us how you would end up solving this problem. Good luck!

@ecko cheers, will let you know how it all ends :)

Just in case anyone is interested, here’s how I solved this problem:

If a customer places an order, the order is saved via a frontend form into it’s specific section. In this section there is an HTML-Panel field that displays a page showing the already existing customers with a similar name. If my client finds an order with a customer not yet in his database, he can press a button that submits a pre filled form with the customer data from the order as a new entry in the customer section. (This works via an intermediate page because I didn’t manage to do this inside the HTML-Panel field.)

If anyone is interested in a more detailed explanation, just let me know! Thank you all for your help!

What your thought on the pros and cons with HTML-Panel if any?

The HTML-Panel offers a really easy way to implement custom backend functionality by using very simple pages and datasources. In my case there were no cons :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details