eZ Community » Forums » Developer » how to make page for editing multiple...
expandshrink

how to make page for editing multiple objects?

how to make page for editing multiple objects?

Friday 26 August 2005 9:44:23 am - 9 replies

I need to update prices for all products in my shop.
For doing this i need to open every time all product, one by one.
This takes so much time, that i must start new update after i finish current...

Sunday 28 August 2005 7:57:39 pm

You can't do that out of the box. eZ is based on the node approach, e.g. you edit one node at a time, and a node contains one object.

You will probably have to write a custom extension for that. Have a look at the files in kernel/content/, for instance edit.php, and build an extension based on that... the API is very good, so you should be able to achieve that.

Sunday 28 August 2005 9:16:07 pm

I think you actually can (as I did essentially did that in the enhanced object relation extension).

Try calling node_view_gui edit for multiple nodes at a time and see what happens.

If that doesn't work, look dig thru my code to see however I managed to do that back then (sorry, cant remember)

Monday 29 August 2005 8:55:59 am

Plan B: export all your products into a format you can modify (csv or xml), changes the prices on this file and import it.

I don't know if the contribs doing import/export are able to handle versionnning, but shouldn't be too complicated to add if it isn't the case.

X+

Monday 29 August 2005 4:04:11 pm

Hi:
i think that we are in the same boat,we are trying to do that also,i am trying to work using the hint of Gabriel ,and i hope together we can find a solution blunk.gif Emoticon
i think that editing multible objects in the same page is possible somehow,but then how to save these objects?
can anyone tell me?

Modified on Monday 29 August 2005 4:11:29 pm by Mazen Alsibai

Monday 29 August 2005 7:32:13 pm

Actually Gabriel is right, I've answered too fast, sorry about that happy.gif Emoticon

If you can find some formal infos about how to do that I'm definitely interested !

Tuesday 30 August 2005 9:51:21 am

You'll likely need some extra PHP code to handle submission of multiple classes. It's in the eor code (related to the addition and edits on newly created relations), I just can't remember where exactly blunk.gif Emoticon.

I originally took it from object relation list (which can do it too to some extent), BTW but I think I changed it to some extent.

Wednesday 07 September 2005 4:07:05 pm

I think the problem can be solved if we could solve this partial one:
edit two separate objects simultaneously, make all fields from both objects in the same form,
and then save draft for both of them.
This is my problem right now, I believe everything will be so easy if I could save draft for the two object in one button click.

Wednesday 07 September 2005 4:22:47 pm

I would personnaly use plan B from Xavier happy.gif Emoticon

You could then write a custom cronjob to handle this, and manage the configuration (list of objects/prices) with a custom web interface.

Wednesday 07 September 2005 9:43:50 pm

Well, you are right to suggest this,
But in fact I have nothing to do with updating prices.
My goal is totaly different,
What I need is really to edit two or more objects and save them by only clicking on one save button.( maybe I'd better start a separate thread for this edia blunk.gif Emoticon ).

Now, what do you think about saving draft of two ojbects???

Thank you

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu