Ich habe das mal wie vorgeschlagen ausprobiert. Leider ergibt das einen Fehler:
Can not render @Storefront/storefront/page/product-detail/index.html.twig view: A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag? with these parameters: {"ratingSuccess":null,"themeIconConfig":[]}
Ich hab es dann in {% block utilities_offcanvas %} sowie {% block utilities_offcanvas_meta %} und {% block utilities_offcanvas_content_container %} probiert - überall das gleiche Ergebnis:
array:12 [
"context" => Shopware\Core\System\SalesChannel\SalesChannelContext {#1496}
"page" => Shopware\Storefront\Page\Checkout\Offcanvas\OffcanvasCartPage {#6002}
"hrefLang" => Shopware\Core\Content\Seo\Hreflang\HreflangCollection {#6356}
"themeIconConfig" => []
"shopware" => array:1 []
"themeId" => "018deae3117671089224e7e1d9523416"
"controllerName" => "Checkout"
"controllerAction" => "offcanvas"
"activeRoute" => "frontend.cart.offcanvas"
"formViolations" => null
"app" => Shopware\Storefront\Framework\Twig\TwigAppVariable {#957}
"isAjaxOffcanvas" => true
]
Der nächste Versuch war dann in /component/checkout/offcanvas-cart.html.twig wie von dir vorgeschlagen, es ergab folgende Fehlermeldung:
Can not render @DneTemplateManager/storefront/component/checkout/offcanvas-cart.html.twig view: Calling "parent" outside a block is forbidden. with these parameters: {"themeIconConfig":[]}
Dann hab ich es mal in /component/checkout/offcanvas-cart.html.twig unter {% block component_offcanvas_cart_hidden_line_items_information %} probiert und - so denke ich - womöglich was interessantes gefunden (Test mit dem Artikel bei dem Grundeinheit = Preiseinheit ist, also kein Grundpreis angezeigt werden würde).
Shopware\Core\Framework\DataAbstractionLayer
\
FieldVisibility {#4955
-internalProperties: []
}
#name: "2-5 Werktage"
#min: 2
#max: 5
#unit: "day"
#shippingMethods: null
#translations: null
#products: null
#customFields: null
#id: "018dd127e0e673cfa38e26ba97ea0ecc"
}
#restockTime: 4
#isCloseout: false
#purchaseSteps: 1
#maxPurchase: null
#minPurchase: 1
#purchaseUnit: 1.0
#referenceUnit: 1.0
#shippingFree: false
#purchasePrices:
und nochmal dann hier:
Shopware\Core\Framework\Struct
\
ArrayStruct {#4984
#extensions: []
#data: []
#apiAlias: null
}
]
#_uniqueIdentifier: "018deb3795207beba8992a65bca7cfa3"
#versionId: null
#translated: array:3 [
"shortCode" => "l"
"name" => "Liter"
"customFields" => []
]
#createdAt: DateTimeImmutable @1709048311 {#4988
date: 2024-02-27 15:38:31.377 UTC (+00:00)
}
#updatedAt: null
-_entityName: "unit"
-_fieldVisibility:
Shopware\Core\Framework\DataAbstractionLayer
\
FieldVisibility {#4985
-internalProperties: []
}
#shortCode: "l"
#name: "Liter"
#translations: null
#products: null
#customFields: null
#id: "018deb3795207beba8992a65bca7cfa3"
}
#prices:
und hier:
Shopware\Core\Content\Product\DataAbstractionLayer\CheapestPrice
\
CheapestPriceContainer {#4940
#extensions: []
#value: array:1 [
"018dd5a44e54762bb9ec4f14042aa549" => array:1 [
"default" => array:10 [
"parent_id" => "018dd5a44e54762bb9ec4f14042aa549"
"variant_id" => "018dd5a44e54762bb9ec4f14042aa549"
"rule_id" => null
"is_ranged" => "0"
"price" => array:1 [
"cb7d2554b0ce847cd82f3ac9bd1c0dfca" => array:6 [
"net" => 5.436974789916
"gross" => 6.47
"linked" => true
"listPrice" => null
"currencyId" => "b7d2554b0ce847cd82f3ac9bd1c0dfca"
"regulationPrice" => null
]
]
"min_purchase" => "1"
"unit_id" => "018deb3795207beba8992a65bca7cfa3"
"purchase_unit" => "1.0000"
"reference_unit" => "1.000"
"child_count" => "0"
]
]
]
#default: null
-ruleIds: null
}
}
"promotions-code" =>
Es ist also mehrfach die purchase_unit und reference_unit mit 1.0 oder auch 1.000 vorhanden, ebenso wie einmal der Name „Liter“ - aber wieso kann ich diese dann nicht ausgeben lassen?