View Issue Details

IDProjectCategoryView StatusLast Update
0007548Apex ThemeApex Themepublic2024-07-01 14:30
ReporterbYemma Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0.0 
Fixed in Version2.0.0 
Summary0007548: Globals in insert_new_basket_item Twig component are missing
DescriptionGlobals like "oxcmp_basket" and "oViewConf" are missing in the insert_new_basket_item Twig component.
They're used for the display of the NEW_BASKET_ITEM_MSG message in the widget/minibasket/newbasketitemmsg.html.twig file.
Steps To Reproduce1. goto admin -> Themes -> Apex
2. Settings -> Display
3. Select action when product is added to cart -> Display Message
4. Frontend: add a product to basket.
5. No message is shown.

6. Open source/Application/views/apex/tpl/widget/minibasket/newbasketitemmsg.html.twig
7. Add
{{ dump(oxcmp_basket) }}
{{ dump(oViewConf) }}
to the top of the file.
8. Change parameter iDebug to 1 in config.inc.php
9. Add a product to basket, you'll see both variables are NULL.

Result: No message is displayed because "oxcmp_basket" view data is not present.

Edit by MK: Added more detailed steps to reproduce.
Additional InformationAlso the component needs a raw filter for output to not escape html:
{{ insert_new_basket_item({tpl: "widget/minibasket/newbasketitemmsg.html.twig", type: "message"})|raw }}
TagsNo tags attached.

Activities

QA

2023-09-29 17:48

administrator   ~0015662

Reproduced.

-MK

bYemma

2024-05-17 14:38

reporter   ~0016899

Pull requests for oxideshops_ce and apex-theme to fix this topic:

https://github.com/OXID-eSales/oxideshop_ce/pull/964
https://github.com/OXID-eSales/apex-theme/pull/57