Modifying the backend

Hello everyone,

I have a couple of questions. I’ll just list them out here and not post multiple threads:

  1. Is it possible to extend the backend with some sort of module to allow the upload of more pictures? i.e. There are only 4 zoom-pictures at the moment- our customer wants about 10… is the possible without hacking around in the core? We don’t want to add them using the WYSIWYG Editor, as they need to be used in a gallery.

  2. Also with some sort of module, can we add extra input-fields to the product editor? There are some occasions where we would like several descriptions pro product. Is this do-able without manually modifying the database?

  3. This has more to do with the frontend. Is there a built in class/function somewhere which we can use to manually resize images using GD on the fly? For example, if we want to scale a zoom bild to a thumbnail size?

  4. Adding extra admin pages/menu-items - possible? I’ve had a look through the tutorials for modules, but only really found things to do with the front-end.

Thanks for your help!

Dave Holloway

GN2 netwerk Dave Holloway (Programmierer)
PGP Public Key: http://www.gn2-netwerk.de/files/dh.asc

Hi Dave,

[QUOTE=david;24474]

  1. Is it possible to extend the backend with some sort of module to allow the upload of more pictures? i.e. There are only 4 zoom-pictures at the moment- our customer wants about 10… is the possible without hacking around in the core? We don’t want to add them using the WYSIWYG Editor, as they need to be used in a gallery.[/quote]

Yes, possible: Insert some more fields for uploading pictures (see your 2nd question) and use the same class used for zoom picture 1-4.

[QUOTE=david;24474]
2) Also with some sort of module, can we add extra input-fields to the product editor? There are some occasions where we would like several descriptions pro product. Is this do-able without manually modifying the database?[/quote]

Yes, you can but you would have to alter the database: Add your new fields to the database and address them in your templates.

[QUOTE=david;24474]
3) This has more to do with the frontend. Is there a built in class/function somewhere which we can use to manually resize images using GD on the fly? For example, if we want to scale a zoom bild to a thumbnail size?[/quote]

This is part of the road map for the next version that will be published in the next view weeks:
http://www.oxidforge.org/wiki/Roadmap/4.3.0 <-- second bullet

[QUOTE=david;24474]
4) Adding extra admin pages/menu-items - possible? I’ve had a look through the tutorials for modules, but only really found things to do with the front-end.
[/QUOTE]

Have a look at this article, it shall be exactly your topic:
http://www.phpbuilder.com/columns/Andreas_Ziethen010710.php3

Cheers

Hi Marco,

Thanks for the quick reply. It all seems a bit hacky to me though… if I understand this correctly, it means modifying the admin templates and database manually- and, for the extra zoom images, maybe even the OXID core php files (correct me if I’m wrong).

My concern is that we will then have problems with updates to the OXID shop, and all of our changes would have to be done again, right?

Regards

Dave Holloway

GN2 netwerk Dave Holloway (Programmierer)
PGP Public Key: http://www.gn2-netwerk.de/files/dh.asc

Hi David,

maybe even the OXID core php files (correct me if I’m wrong)

For adding fields, you just had to alter the database. Additional fields are not concerned during an update. Also, additional fields in the front end are not affected due to the template override system.
If you want to add an extra menu to the admin panel, the article above shows a pretty nice example of how to extend the functionality of the shop with a module.
No core files to hack at all :wink: And no probs with updates will appear.

Rgds

Hi Marco,

…but there is no template override system for the admin backend, correct? The PHPBuilder article details modifying content_main.tpl (which I assume I cannot override). When the next version of OXID comes out, with an updated version of content_main.tpl, I have to make sure that my changes don’t get lost. That is my concern.

Regards

Dave Holloway

GN2 netwerk Dave Holloway (Programmierer)
PGP Public Key: http://www.gn2-netwerk.de/files/dh.asc

Hi Dave,

right, there is no template override system for the admin backend yet. But changes in admin are made relatively seldom and could be identified pretty quickly comparing the files.

Regards

[QUOTE=Marco Steinhaeuser;24640]Hi Dave,

right, there is no template override system for the admin backend yet. But changes in admin are made relatively seldom and could be identified pretty quickly comparing the files.

Regards[/QUOTE]
Should not be too difficult to implement for the OXID developers…

If I consider the fact, that the template override system was implemented with just 3 (three!) lines of additional PHP-code, this should be a snap…

I think currently the best way to implement admin modules/parts is to add your own screens - this might more complicated but at least it does not break in future versions. If you create a menu.xml in your module folder and copy the parts of the original backend the system will merge this for you - this makes adding tabs/subscreens quite easy.