Disable / Remove link to Product Items in Cart Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraRemove item from cartHide “Add to Cart” button if specific products are already in cartMove Add To Cart button to right sidebar“Prettifying” the custom options in cart pageHow-to Import CSV to disable products in Magento 2Disable all customer related routesHide action-edit on cart page if simple productMagento 2 Product Collection returning no resultsDisable All Children of Disabled Category for Store ViewMagento 2.2 - Add link to product (front end) within a custom column in sales order view items list?
What is a 'Key' in computer science?
Is there any hidden 'W' sound after 'comment' in : Comment est-elle?
What's the difference between using dependency injection with a container and using a service locator?
AI positioning circles within an arc at equal distances and heights
Can you stand up from being prone using Skirmisher outside of your turn?
Is accepting an invalid credit card number a security issue?
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
My bank got bought out, am I now going to have to start filing tax returns in a different state?
Why did C use the -> operator instead of reusing the . operator?
Align column where each cell has two decimals with siunitx
"Rubric" as meaning "signature" or "personal mark" -- is this accepted usage?
Is it acceptable to use working hours to read general interest books?
As an international instructor, should I openly talk about my accent?
Raising a bilingual kid. When should we introduce the majority language?
Has a Nobel Peace laureate ever been accused of war crimes?
Are all CP/M-80 implementations binary compatible?
Will I lose my paid in full property
Can I criticise the more senior developers around me for not writing clean code?
Check if a string is entirely made of the same substring
How to translate "red flag" into Spanish?
What is "leading note" and what does it mean to "raise a note"?
What is it called when you ride around on your front wheel?
What do you call the part of a novel that is not dialog?
Israeli soda type drink
Disable / Remove link to Product Items in Cart
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraRemove item from cartHide “Add to Cart” button if specific products are already in cartMove Add To Cart button to right sidebar“Prettifying” the custom options in cart pageHow-to Import CSV to disable products in Magento 2Disable all customer related routesHide action-edit on cart page if simple productMagento 2 Product Collection returning no resultsDisable All Children of Disabled Category for Store ViewMagento 2.2 - Add link to product (front end) within a custom column in sales order view items list?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
By default, when you go to the Cart, You see all the products you purchased on the left hand column and also all the products are linked to their individual product page.
I'd like to remove that link as some of the products in our store are not supposed to link out to their individual product pages. Been trying to locate that in my theme and store, but on luck. Any idea what file I can locate it to disable the link?
magento2 cart link
New contributor
Adam Bell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
By default, when you go to the Cart, You see all the products you purchased on the left hand column and also all the products are linked to their individual product page.
I'd like to remove that link as some of the products in our store are not supposed to link out to their individual product pages. Been trying to locate that in my theme and store, but on luck. Any idea what file I can locate it to disable the link?
magento2 cart link
New contributor
Adam Bell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
By default, when you go to the Cart, You see all the products you purchased on the left hand column and also all the products are linked to their individual product page.
I'd like to remove that link as some of the products in our store are not supposed to link out to their individual product pages. Been trying to locate that in my theme and store, but on luck. Any idea what file I can locate it to disable the link?
magento2 cart link
New contributor
Adam Bell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
By default, when you go to the Cart, You see all the products you purchased on the left hand column and also all the products are linked to their individual product page.
I'd like to remove that link as some of the products in our store are not supposed to link out to their individual product pages. Been trying to locate that in my theme and store, but on luck. Any idea what file I can locate it to disable the link?
magento2 cart link
magento2 cart link
New contributor
Adam Bell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Adam Bell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited Apr 20 at 4:59
Rizwan
986526
986526
New contributor
Adam Bell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Apr 20 at 1:13
Adam BellAdam Bell
1082
1082
New contributor
Adam Bell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Adam Bell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Adam Bell is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If you want to remove product link form product name on cart page, you need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
to
app/design/frontend/Package/theme/Magento_Checkout/templates/cart/item/default.phtml
You can find product-item-name which has product URL, you can remove/edit from here.
<strong class="product-item-name">
<?php if ($block->hasProductUrl()):?>
<a href="<?= /* @escapeNotVerified */ $block->getProductUrl() ?>"><?= $block->escapeHtml($block->getProductName()) ?></a>
<?php else: ?>
<?= $block->escapeHtml($block->getProductName()) ?>
<?php endif; ?>
</strong>
Update I
If you also want to remove link from minicart, You need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
to
app/design/frontend/Package/theme/Magento_Checkout/web/template/minicart/item/default.html
You can remove link form below code:
<a data-bind="attr: href: product_url, html: product_name"></a>
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
Apr 21 at 3:19
welcome@AdamBell, Please see my updates in answer.
– Pawan
Apr 21 at 4:02
That’s what I thought it was. Since the a href was using a data-bind, I changed it to a span, removed the reference to href: product_url and resaved it and uploaded it from my child theme. Problem is I’m not seeing the change on the site even after flushing Magento cache.
– Adam Bell
Apr 21 at 14:07
@AdamBell, you also need to removepub/static/frontendfolder to see changes.
– Pawan
2 days ago
Tried that. Cleared Static Cache in Terminal as well. No luck. Never took the file change, so it's still showing the original a instead of the new span.
– Adam Bell
2 days ago
|
show 4 more comments
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Adam Bell is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270822%2fdisable-remove-link-to-product-items-in-cart%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you want to remove product link form product name on cart page, you need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
to
app/design/frontend/Package/theme/Magento_Checkout/templates/cart/item/default.phtml
You can find product-item-name which has product URL, you can remove/edit from here.
<strong class="product-item-name">
<?php if ($block->hasProductUrl()):?>
<a href="<?= /* @escapeNotVerified */ $block->getProductUrl() ?>"><?= $block->escapeHtml($block->getProductName()) ?></a>
<?php else: ?>
<?= $block->escapeHtml($block->getProductName()) ?>
<?php endif; ?>
</strong>
Update I
If you also want to remove link from minicart, You need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
to
app/design/frontend/Package/theme/Magento_Checkout/web/template/minicart/item/default.html
You can remove link form below code:
<a data-bind="attr: href: product_url, html: product_name"></a>
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
Apr 21 at 3:19
welcome@AdamBell, Please see my updates in answer.
– Pawan
Apr 21 at 4:02
That’s what I thought it was. Since the a href was using a data-bind, I changed it to a span, removed the reference to href: product_url and resaved it and uploaded it from my child theme. Problem is I’m not seeing the change on the site even after flushing Magento cache.
– Adam Bell
Apr 21 at 14:07
@AdamBell, you also need to removepub/static/frontendfolder to see changes.
– Pawan
2 days ago
Tried that. Cleared Static Cache in Terminal as well. No luck. Never took the file change, so it's still showing the original a instead of the new span.
– Adam Bell
2 days ago
|
show 4 more comments
If you want to remove product link form product name on cart page, you need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
to
app/design/frontend/Package/theme/Magento_Checkout/templates/cart/item/default.phtml
You can find product-item-name which has product URL, you can remove/edit from here.
<strong class="product-item-name">
<?php if ($block->hasProductUrl()):?>
<a href="<?= /* @escapeNotVerified */ $block->getProductUrl() ?>"><?= $block->escapeHtml($block->getProductName()) ?></a>
<?php else: ?>
<?= $block->escapeHtml($block->getProductName()) ?>
<?php endif; ?>
</strong>
Update I
If you also want to remove link from minicart, You need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
to
app/design/frontend/Package/theme/Magento_Checkout/web/template/minicart/item/default.html
You can remove link form below code:
<a data-bind="attr: href: product_url, html: product_name"></a>
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
Apr 21 at 3:19
welcome@AdamBell, Please see my updates in answer.
– Pawan
Apr 21 at 4:02
That’s what I thought it was. Since the a href was using a data-bind, I changed it to a span, removed the reference to href: product_url and resaved it and uploaded it from my child theme. Problem is I’m not seeing the change on the site even after flushing Magento cache.
– Adam Bell
Apr 21 at 14:07
@AdamBell, you also need to removepub/static/frontendfolder to see changes.
– Pawan
2 days ago
Tried that. Cleared Static Cache in Terminal as well. No luck. Never took the file change, so it's still showing the original a instead of the new span.
– Adam Bell
2 days ago
|
show 4 more comments
If you want to remove product link form product name on cart page, you need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
to
app/design/frontend/Package/theme/Magento_Checkout/templates/cart/item/default.phtml
You can find product-item-name which has product URL, you can remove/edit from here.
<strong class="product-item-name">
<?php if ($block->hasProductUrl()):?>
<a href="<?= /* @escapeNotVerified */ $block->getProductUrl() ?>"><?= $block->escapeHtml($block->getProductName()) ?></a>
<?php else: ?>
<?= $block->escapeHtml($block->getProductName()) ?>
<?php endif; ?>
</strong>
Update I
If you also want to remove link from minicart, You need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
to
app/design/frontend/Package/theme/Magento_Checkout/web/template/minicart/item/default.html
You can remove link form below code:
<a data-bind="attr: href: product_url, html: product_name"></a>
If you want to remove product link form product name on cart page, you need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
to
app/design/frontend/Package/theme/Magento_Checkout/templates/cart/item/default.phtml
You can find product-item-name which has product URL, you can remove/edit from here.
<strong class="product-item-name">
<?php if ($block->hasProductUrl()):?>
<a href="<?= /* @escapeNotVerified */ $block->getProductUrl() ?>"><?= $block->escapeHtml($block->getProductName()) ?></a>
<?php else: ?>
<?= $block->escapeHtml($block->getProductName()) ?>
<?php endif; ?>
</strong>
Update I
If you also want to remove link from minicart, You need to copy:
Magento2Root/vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
to
app/design/frontend/Package/theme/Magento_Checkout/web/template/minicart/item/default.html
You can remove link form below code:
<a data-bind="attr: href: product_url, html: product_name"></a>
edited Apr 21 at 4:02
answered Apr 20 at 4:15
PawanPawan
2,2912721
2,2912721
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
Apr 21 at 3:19
welcome@AdamBell, Please see my updates in answer.
– Pawan
Apr 21 at 4:02
That’s what I thought it was. Since the a href was using a data-bind, I changed it to a span, removed the reference to href: product_url and resaved it and uploaded it from my child theme. Problem is I’m not seeing the change on the site even after flushing Magento cache.
– Adam Bell
Apr 21 at 14:07
@AdamBell, you also need to removepub/static/frontendfolder to see changes.
– Pawan
2 days ago
Tried that. Cleared Static Cache in Terminal as well. No luck. Never took the file change, so it's still showing the original a instead of the new span.
– Adam Bell
2 days ago
|
show 4 more comments
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
Apr 21 at 3:19
welcome@AdamBell, Please see my updates in answer.
– Pawan
Apr 21 at 4:02
That’s what I thought it was. Since the a href was using a data-bind, I changed it to a span, removed the reference to href: product_url and resaved it and uploaded it from my child theme. Problem is I’m not seeing the change on the site even after flushing Magento cache.
– Adam Bell
Apr 21 at 14:07
@AdamBell, you also need to removepub/static/frontendfolder to see changes.
– Pawan
2 days ago
Tried that. Cleared Static Cache in Terminal as well. No luck. Never took the file change, so it's still showing the original a instead of the new span.
– Adam Bell
2 days ago
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
Apr 21 at 3:19
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
Apr 21 at 3:19
welcome@AdamBell, Please see my updates in answer.
– Pawan
Apr 21 at 4:02
welcome@AdamBell, Please see my updates in answer.
– Pawan
Apr 21 at 4:02
That’s what I thought it was. Since the a href was using a data-bind, I changed it to a span, removed the reference to href: product_url and resaved it and uploaded it from my child theme. Problem is I’m not seeing the change on the site even after flushing Magento cache.
– Adam Bell
Apr 21 at 14:07
That’s what I thought it was. Since the a href was using a data-bind, I changed it to a span, removed the reference to href: product_url and resaved it and uploaded it from my child theme. Problem is I’m not seeing the change on the site even after flushing Magento cache.
– Adam Bell
Apr 21 at 14:07
@AdamBell, you also need to remove
pub/static/frontend folder to see changes.– Pawan
2 days ago
@AdamBell, you also need to remove
pub/static/frontend folder to see changes.– Pawan
2 days ago
Tried that. Cleared Static Cache in Terminal as well. No luck. Never took the file change, so it's still showing the original a instead of the new span.
– Adam Bell
2 days ago
Tried that. Cleared Static Cache in Terminal as well. No luck. Never took the file change, so it's still showing the original a instead of the new span.
– Adam Bell
2 days ago
|
show 4 more comments
Adam Bell is a new contributor. Be nice, and check out our Code of Conduct.
Adam Bell is a new contributor. Be nice, and check out our Code of Conduct.
Adam Bell is a new contributor. Be nice, and check out our Code of Conduct.
Adam Bell is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270822%2fdisable-remove-link-to-product-items-in-cart%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown