Freitextfeld der Tabelle s_order_attributes in PDF Dokument ausgeben

Wie kann man denn diesem Array Variablen hinzufügen? Bräuchte z.B. den Wert für „purchaseunit“.

Danke für eine weiterbringende Antwort :slight_smile:

@Moritz Naczenski schrieb:

Du kannst per |print_r immer die Variablen des Arrays ausgeben lassen. Mit {$Order|print_r} bekommst du dann alle Variablen mit Inhalt aus dem $Order Array. Das sieht dann bspw. so aus: 

ATTRIBUT: Array
(
[_id] => 18
[_order] => Array
(
[id] => 18
[ordernumber] => 20003
[userID] => 1
[invoice_amount] => 44
[invoice_amount_net] => 36.97
[invoice_shipping] => 0
[invoice_shipping_net] => 0
[ordertime] => 2016-08-18 15:12:32
[status] => 0
[cleared] => 17
[paymentID] => 7
[transactionID] => EC-42916766HR442283C
[comment] =>
[customercomment] =>
[internalcomment] =>
[net] => 0
[taxfree] => 0
[partnerID] =>
[temporaryID] => b2f7f63a7bc7f14b16ae2210afc19a1f
[referer] =>
[cleareddate] =>
[trackingcode] =>
[language] => 1
[dispatchID] => 0
[currency] => EUR
[currencyFactor] => 1
[subshopID] => 1
[remote_addr] => 127.0.0.1
[deviceType] => desktop
[factor] => 1
[currencyID] => 1
[templatechar] => €
[currencyName] => Euro
[attributes] => Array
(
[id] => 4
[orderID] => 18
[attribute1] => 3
[attribute2] =>
[attribute3] =>
[attribute4] =>
[attribute5] =>
[attribute6] =>
[swag_payal_billing_agreement_id] =>
[swag_payal_express] =>
[connect_shop_id] =>
[connect_order_id] =>
)
)
[_positions] => Array
(
[0] => Array
(
[id] => 42
[orderID] => 18
[ordernumber] => 20003
[articleID] => 71
[articleordernumber] => SW10071
[price] => 44.9
[quantity] => 1
[name] => »Der Indianer« Feinstes IKARIMI®-Lachsfilet
[status] => 0
[shipped] => 0
[shippedgroup] => 0
[releasedate] => 0000-00-00
[modus] => 0
[esdarticle] => 0
[taxID] => 1
[tax_rate] => 19
[config] =>
[ean] =>
[unit] => Kilogramm
[pack_unit] =>
[articleTaxID] => 1
[attr1] =>
[attr2] =>
[attr3] =>
[attr4] =>
[attr5] =>
[attr6] =>
[attr7] =>
[attr8] =>
[attr9] =>
[attr10] =>
[attr11] =>
[attr12] =>
[attr13] =>
[attr14] =>
[attr15] =>
[attr16] =>
[attr17] =>
[attr18] =>
[attr19] =>
[attr20] =>
[attributes] => Array
(
[id] => 7
[detailID] => 42
[attribute1] =>
[attribute2] =>
[attribute3] =>
[attribute4] =>
[attribute5] =>
[attribute6] =>
[swag_custom_products_mode] => 0
[swag_custom_products_configuration_hash] =>
)
[tax] => 19
[netto] => 37.731092436975
[amount_netto] => 37.73
[amount] => 44.9
)
[1] => Array
(
[id] => 43
[orderID] => 18
[ordernumber] => 20003
[articleID] => 0
[articleordernumber] => sw-discount
[price] => -0.9
[quantity] => 1
[name] => -2 % Warenkorbrabatt
[status] => 0
[shipped] => 0
[shippedgroup] => 0
[releasedate] => 0000-00-00
[modus] => 3
[esdarticle] => 0
[taxID] => 0
[tax_rate] => 19
[config] =>
[ean] =>
[unit] =>
[pack_unit] =>
[articleTaxID] =>
[attr1] =>
[attr2] =>
[attr3] =>
[attr4] =>
[attr5] =>
[attr6] =>
[attr7] =>
[attr8] =>
[attr9] =>
[attr10] =>
[attr11] =>
[attr12] =>
[attr13] =>
[attr14] =>
[attr15] =>
[attr16] =>
[attr17] =>
[attr18] =>
[attr19] =>
[attr20] =>
[attributes] => Array
(
[id] => 8
[detailID] => 43
[attribute1] =>
[attribute2] =>
[attribute3] =>
[attribute4] =>
[attribute5] =>
[attribute6] =>
[swag_custom_products_mode] => 0
[swag_custom_products_configuration_hash] =>
)
[tax] => 19
[netto] => -0.7563025210084
[amount_netto] => -0.76
[amount] => -0.9
)
)
[_userID] => 1
[_user] => Array
(
[id] => 1
[password] => $2y$10$9LB1SwTwDRqYkeTIv9uakucRSCSdDbBIQSpzdU6IhbxEJl7jc0GPK
[encoder] => bcrypt
[email] => mn@shopware.com
[active] => 1
[accountmode] => 0
[confirmationkey] =>
[paymentID] => 7
[firstlogin] => 2016-08-16
[lastlogin] => 2016-08-18 15:12:31
[sessionID] => fkv45fmk4dgme847ikcvdfbm66
[newsletter] => 0
[validation] =>
[affiliate] => 0
[customergroup] => EK
[paymentpreset] => 0
[language] => 1
[subshopID] => 1
[referer] =>
[pricegroupID] =>
[internalcomment] =>
[failedlogins] => 0
[lockeduntil] =>
[default_billing_address_id] => 1
[default_shipping_address_id] => 1
[title] =>
[salutation] => mr
[firstname] => Shopware
[lastname] => AG
[birthday] =>
[customernumber] => 20003
[customergroupID] => 1
)
[_billing] => Array
(
[id] => 3
[userID] => 1
[orderID] => 18
[company] =>
[department] =>
[salutation] => mr
[customernumber] => 20003
[firstname] => Shopware
[lastname] => AG
[street] => bfghsailhdhfgui
[zipcode] => uihsfgauifg
[city] => hgiouasfghzuiaoghpd
[phone] =>
[countryID] => 2
[stateID] =>
[ustid] =>
[additional_address_line1] =>
[additional_address_line2] =>
[title] =>
[country] => ArrayObject Object
(
[storage:ArrayObject:private] => Array
(
[id] => 2
[countryname] => Deutschland
[countryiso] => DE
[areaID] => 1
[countryen] => GERMANY
[position] => 1
[notice] =>
[shippingfree] => 0
[taxfree] => 0
[taxfree_ustid] => 0
[taxfree_ustid_checked] => 0
[active] => 1
[iso3] => DEU
[display_state_in_registration] => 0
[force_state_in_registration] => 0
)
)
[state] => Array
(
)
[attributes] => Array
(
[id] => 3
[billingID] => 3
[text1] =>
[text2] =>
[text3] =>
[text4] =>
[text5] =>
[text6] =>
)
)
[_shipping] => Array
(
[id] => 3
[userID] => 1
[orderID] => 18
[company] =>
[department] =>
[salutation] => mr
[firstname] => Shopware
[lastname] => AG
[street] => bfghsailhdhfgui
[zipcode] => uihsfgauifg
[city] => hgiouasfghzuiaoghpd
[countryID] => 2
[stateID] =>
[additional_address_line1] =>
[additional_address_line2] =>
[title] =>
[attributes] => Array
(
[id] => 3
[shippingID] => 3
[text1] =>
[text2] =>
[text3] =>
[text4] =>
[text5] =>
[text6] =>
)
[country] => ArrayObject Object
(
[storage:ArrayObject:private] => Array
(
[id] => 2
[countryname] => Deutschland
[countryiso] => DE
[areaID] => 1
[countryen] => GERMANY
[position] => 1
[notice] =>
[shippingfree] => 0
[taxfree] => 0
[taxfree_ustid] => 0
[taxfree_ustid_checked] => 0
[active] => 1
[iso3] => DEU
[display_state_in_registration] => 0
[force_state_in_registration] => 0
)
)
[state] => Array
(
)
)
[_payment] => Array
(
[id] => 7
[name] => paypal
[description] => PayPal
[template] =>
[class] =>
[table] =>
[hide] => 0
[additionaldescription] =>
Bezahlung per PayPal - einfach, schnell und sicher.
[debit_percent] => 0
[surcharge] => 0
[surchargestring] =>
[position] => 0
[active] => 1
[esdactive] => 0
[embediframe] =>
[hideprospect] => 0
[action] => payment_paypal
[pluginID] => 61
[source] =>
[mobile_inactive] => 0
)
[_paymentInstances] => Array
(
[0] => Array
(
[id] => 3
[payment_mean_id] => 7
[order_id] => 18
[user_id] => 1
[firstname] => Shopware
[lastname] => AG
[address] => bfghsailhdhfgui
[zipcode] => uihsfgauifg
[city] => hgiouasfghzuiaoghpd
[account_number] =>
[account_holder] =>
[bank_name] =>
[bank_code] =>
[bic] =>
[iban] =>
[amount] => 44.0000
[created_at] => 2016-08-18
)
)
[_dispatch] => Array
(
)
[_net] =>
[_summaryNet] =>
[_amountNetto] => 36.97
[_amount] => 44
[_tax] => Array
(
[19.00] => 7.03
)
[_currency] => Array
(
[currency] => EUR
[name] => Euro
[factor] => 1
[char] => €
)
[_shippingCosts] => 0
[_shippingCostsAsPosition] => 1
[_discount] => -0.9
[_taxRepository] =>
)

Und da musst du dich dann entlang hangeln - bis du den Wert bekommst den du brauchst.