1
  1. Need to hide proceed to checkout button on the cart page when session variable set

  2. Need to add one more button PROCEED TO APPROVAL below the Proceed to checkout button on the cart page.

Followed different approached mentioned here but no luck.

checkout_cart_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<!-- first approach failed -->
<!--<body>
<referenceContainer name="checkout.cart.methods">
 <block class="Ken\Bestseller\Block\Onepage\MyLink" name="checkout.cart.methods.onepage.bottom" template="Ken_Bestseller::onepage/mylink.phtml">
 </block>
</referenceContainer>
</body>-->
<!-- second approach failed -->
<!-- <body>
 <referenceContainer name="content">
 <referenceBlock name="checkout.cart.methods.onepage.bottom" template="Ken_Bestseller::onepage/mylink.phtml" />
 </referenceContainer>
</body> -->
<!-- 3rd approach failed -->
 <!--<body>
 <referenceBlock name="checkout.cart.methods.onepage.bottom" template="Ken_Bestseller::onepage/mylink.phtml"/>
 </body> -->
<!-- added custom button -->
 <body>
 <referenceContainer name="checkout.cart.methods" >
 <block class="Ken\Bestseller\Block\Onepage\MyLink" name="custom.template.kenisum" after="checkout.cart.shortcut.buttons" template="Ken_Bestseller::onepage/mylink.phtml"/>
 </referenceContainer>
 </body>
</page>
asked Nov 15, 2019 at 4:41
0

1 Answer 1

2

Can you please try this once ?

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <body>
 <referenceContainer name="checkout.cart.methods">
 <referenceBlock name="checkout.cart.methods.onepage.bottom">
 <action method="setTemplate">
 <argument name="template" xsi:type="string">Ken_Bestseller::onepage/mylink.phtml</argument>
 </action>
 </referenceBlock>
 </referenceContainer>
 </body>
</page>

Hope this will help you!

answered Nov 15, 2019 at 4:48
10
  • Let me know if this works for you then. Commented Nov 15, 2019 at 5:13
  • 1
    sure @Kishan Savaliya will update you shortly Commented Nov 15, 2019 at 5:54
  • 1
    Thanks, @krishan which is working fine Commented Nov 15, 2019 at 7:20
  • You're welcome buddy ;) Commented Nov 15, 2019 at 7:21
  • @krishan savaliya can u advise on this issue magento.stackexchange.com/questions/295908/… Commented Nov 18, 2019 at 3:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.