5

In Magento2.2.5 using the default Magento2 2 step checkout on the payment & review step in the order summary box the discount which I believe is suppose to be a drop down shows always as expanded and I would like it not to always be expanded by default. See the screenshot below. Where and how do I make that not be auto-expanded? I looked in vendor/magento/module-checkout/view/frontend/web/template/summary but not sure what file would be edited and how. of course I will move the file to my theme once I know which one needs to be edited. see screenshot

enter image description here

Thank you @fmsthird I moved the file from Vendor to my theme folder which happens to be

app/design/frontend/Smartwave/porto/Magento_Checkout/templates/summary

I then recompiled and redeployed and flushed magento cache but I dont see any change.

My first row in the cart-items.phtml looks like this

<div class="block items-in-cart" data-bind="mageInit: {'collapsible':{'openedState': 'false', 'false': isItemsBlockExpanded()}}">
1

1 Answer 1

1

You can check cart-items.html from the path below:

vendor/magento/module-checkout/view/frontend/web/template/summary/cart-items.html  

Look for the openedState attribute and change the active state to false.

6
  • please see my updated on the bottom of my original message. Thanks
    – Jayreis
    Jun 27, 2019 at 13:19
  • Try like <div class="block items-in-cart" data-bind="mageInit: {'collapsible':{'openedState': 'active', 'active': 'false'}}">
    – fmsthird
    Jun 27, 2019 at 14:35
  • No I tried compiling deploying and flushing cache but I don't think that file controls the "discount" line that i am trying to make be collapsed.
    – Jayreis
    Jun 27, 2019 at 15:08
  • I want just the line that says "Discount" to be collapsed
    – Jayreis
    Jun 28, 2019 at 18:13
  • @fmsthird please answer this too magento.stackexchange.com/questions/279918/… Jul 2, 2019 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.