0

When you add a product to your cart, it's showing on your minicart.

When you click on that item it's bringing back to the product page.

I'm looking to find how this link is made...looks like there is no link in html so it's probably threw some javascript but i can't find it.

I'm aiming to remove that behaviour for some specific cases of gifts products.

1
  • Take a look at /app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html or vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html if installed using composer Commented Jun 28, 2022 at 12:52

1 Answer 1

0

Take a look at

  • app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html (if installed using Github)
  • vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html (if installed using composer)
3
  • I do have the mini cart template file but it's not helping me locating the location of the js method that make the link when you click on the product picture on the case where the product has no url...a link is still made...which should not happen...but happen due to some js. ` <!-- ko ifnot: product_has_url --> <span data-bind="html: product_name"></span> <!-- /ko -->`
    – Claims
    Commented Jun 28, 2022 at 13:13
  • I might not have been very clear on my issue, i'm trying to remove the link for gift products which are not visible on the catalog. So I don't fall on the product_has_url use case. But still a link is made
    – Claims
    Commented Jun 28, 2022 at 13:18
  • attr: {href: product_url} should remove the link for every product. Take a look at app/code/Magento/Checkout/view/frontend/web/js/view/cart-item-renderer.js and app/code/Magento/Checkout/view/frontend/layout/checkout_cart_sidebar_item_renderers.xml Commented Jun 28, 2022 at 13:21

Your Answer

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

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