PHP code example of buddha-code / buco-part-documents

1. Go to this page and download the library: Download buddha-code/buco-part-documents library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

buddha-code / buco-part-documents example snippets


\Shopware_Components_Document::initDocument($orderId, $docTypeId, [
    'netto' => false,
    'shippingCostsAsPosition' => true,
    '_renderer' => 'pdf',
    'bucoCreatePartDocument' => true,       // used to create part document
    'bucoPartDocPosIds' => [1,2],           // used to create part document; not an index, but the s_order_details primary key
    '_allowMultipleDocuments' => true,      // used to create part document
    'attributes' => [
        'bucoIsPartDocument' => true        // used to create part document
    ],
    'summaryNet' => [
        'bucoCreatePartDocument' => true,   // used to create part document
        'bucoPartDocPosIds' => [1,2]        // used to create part document; not an index, but the s_order_details primary key
    ]
]);