Forums / Developer / how to make page for editing multiple objects?

how to make page for editing multiple objects?

Author Message

Vytautas Germanavičius

Friday 26 August 2005 12:44:23 am

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...

{set-block scope=root variable=cache_ttl}0{/set-block}

Bertrand Dunogier

Sunday 28 August 2005 10:57:39 am

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.

Gabriel Ambuehl

Sunday 28 August 2005 12: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)

Visit http://triligon.org

Xavier Dutoit

Sunday 28 August 2005 11:55:59 pm

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+

http://www.sydesy.com

Mazen Alsibai

Monday 29 August 2005 7:04:11 am

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 ;-)
i think that editing multible objects in the same page is possible somehow,but then how to save these objects?
can anyone tell me?

Bertrand Dunogier

Monday 29 August 2005 10:32:13 am

Actually Gabriel is right, I've answered too fast, sorry about that :)

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

Gabriel Ambuehl

Tuesday 30 August 2005 12: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 ;).

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.

Visit http://triligon.org

Aladdin Mouhaimeed

Wednesday 07 September 2005 7:07:05 am

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.

Lex 007

Wednesday 07 September 2005 7:22:47 am

I would personnaly use plan B from Xavier :)

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

Aladdin Mouhaimeed

Wednesday 07 September 2005 12: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 ;) ).

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

Thank you

eZ debug

Timing: Jan 18 2025 19:20:12
Script start
Timing: Jan 18 2025 19:20:12
Module start 'content'
Timing: Jan 18 2025 19:20:13
Module end 'content'
Timing: Jan 18 2025 19:20:13
Script end

Main resources:

Total runtime0.8322 sec
Peak memory usage4,096.0000 KB
Database Queries225

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 587.8438180.8125
Module start 'content' 0.00870.6751 768.6563792.9922
Module end 'content' 0.68380.1483 1,561.6484345.3047
Script end 0.8321  1,906.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.5204210.0002
Check MTime0.00160.1903210.0001
Mysql Total
Database connection0.00120.141010.0012
Mysqli_queries0.734888.29152250.0033
Looping result0.00240.28892230.0000
Template Total0.798996.020.3995
Template load0.00200.244420.0010
Template processing0.796995.757920.3984
Template load and register function0.00030.035410.0003
states
state_id_array0.00100.118210.0010
state_identifier_array0.00250.302520.0013
Override
Cache load0.00170.2080460.0000
Sytem overhead
Fetch class attribute can translate value0.00160.189080.0002
Fetch class attribute name0.00310.3694130.0002
XML
Image XML parsing0.00320.387880.0004
class_abstraction
Instantiating content class attribute0.00000.0023130.0000
General
dbfile0.00440.5288390.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs