0

I need to add external link to the "New Address" button in checkout.

Found the button html is loading from this file.

vendor\magento\module-checkout\view\frontend\web\template\shipping.html

How can I add external link to the button instead of showing the pop up once it is clicked.

I need to add anchor (<a>) tag for it.

Can this be done?

6
  • yes, you can add link using <a href="#">Test link</a> Mar 29 '19 at 10:02
  • @MohammadFaizan, please update me the Answer, how it can be done? Mar 29 '19 at 10:03
  • @RakeshDonga, some external link with params, params are from magento so href value is formed in php file Mar 29 '19 at 10:17
  • @jafarpinjar i have updated my answer Mar 29 '19 at 10:19
  • @RakeshDonga, yes everything is fine, but it will redirect to which link? where i need to pass href value? Mar 29 '19 at 10:22
1

try this way...

<a data-bind="attr: { href: Link, title: Title }, text: Title">test</a>
5
  • hi @Rakesh, already some click action written in default magento, wil it be avoided? above code will redirect to cart page? Mar 29 '19 at 10:09
  • yes i know that but you can use here your link Mar 29 '19 at 10:09
  • yes, @Rakesh, can you please provide me some clear code, i am not worked on ko before, i need to add form href value with some php variables Mar 29 '19 at 10:11
  • you want to anchor tag in which link use? Mar 29 '19 at 10:14
  • I am not understood.. cleared with my question? Mar 29 '19 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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