View Issue Details

IDProjectCategoryView StatusLast Update
0001689OXID eShop (all versions)2. ----- eShop backend (admin) -----public2010-04-14 15:56
Reporteraggrosoft Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.2.0 revision 23610 
Summary0001689: myorder::genPdf should be splitted
DescriptionThe supplied module for pdf generation is good as it is - but if you want to extend it to have another pdf file generated you have either override the genPdf method completely (like a hard copy) or create a new function in order_orderview. The following block of genPDF is problematic and should be moved to it's own method:

// adding info data
switch ( oxConfig::getParameter( 'pdftype' ) ) {
    case 'dnote':
         $this->exportDeliveryNote( $oPdf );
         break;
    default:
         $this->exportStandart( $oPdf );
}

If this would be part of it's own method you could just add in your own export commands without copying the whole genPDF method.
Additional InformationThis is a small tweak that makes extending the pdf output much easier to maintain for everyone.
TagsNo tags attached.
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

aggrosoft

2010-03-09 11:13

reporter   ~0002395

As I take a closer look at this class there are a lot of methods that should be splitted - extending an already existing export function is also very uncomfortable.

dainius.bigelis

2010-04-14 15:55

reporter   ~0002542

Reminder sent to: aggrosoft

Hi,

Thank you for your notes. We added as a task to refactor this place to our todo's list. So this will be done in future releases.

Best regards,

dainius.bigelis

2010-04-14 15:56

reporter   ~0002543

Closed, as this request was included in ToDo list for future releases.