Disable / Remove link to Product Items in Cart Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Remove 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?
How to leave only the following strings?
Recursive calls to a function - why is the address of the parameter passed to it lowering with each call?
What is the ongoing value of the Kanban board to the developers as opposed to management
What's the connection between Mr. Nancy and fried chicken?
Kepler's 3rd law: ratios don't fit data
Network questions
Compiling and throwing simple dynamic exceptions at runtime for JVM
Does using the Inspiration rules for character defects encourage My Guy Syndrome?
How to make an animal which can only breed for a certain number of generations?
“Since the train was delayed for more than an hour, passengers were given a full refund.” – Why is there no article before “passengers”?
Do chord progressions usually move by fifths?
Protagonist's race is hidden - should I reveal it?
Etymology of 見舞い
Can a Knight grant Knighthood to another?
Can gravitational waves pass through a black hole?
Why not use the yoke to control yaw, as well as pitch and roll?
Why do people think Winterfell crypts is the safest place for women, children & old people?
Why did Europeans not widely domesticate foxes?
Why aren't these two solutions equivalent? Combinatorics problem
Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?
Is there a way to convert Wolfram Language expression to string?
Who's this lady in the war room?
Why is one lightbulb in a string illuminated?
lm and glm function in R
Disable / Remove link to Product Items in Cart
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Remove 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
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
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
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
New contributor
edited 2 days ago
Rizwan
965526
965526
New contributor
asked Apr 20 at 1:13
Adam BellAdam Bell
1082
1082
New contributor
New contributor
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
yesterday
welcome@AdamBell, Please see my updates in answer.
– Pawan
yesterday
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
yesterday
@AdamBell, you also need to removepub/static/frontend
folder to see changes.
– Pawan
22 hours 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
3 hours ago
add a comment |
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
yesterday
welcome@AdamBell, Please see my updates in answer.
– Pawan
yesterday
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
yesterday
@AdamBell, you also need to removepub/static/frontend
folder to see changes.
– Pawan
22 hours 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
3 hours ago
add a comment |
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
yesterday
welcome@AdamBell, Please see my updates in answer.
– Pawan
yesterday
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
yesterday
@AdamBell, you also need to removepub/static/frontend
folder to see changes.
– Pawan
22 hours 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
3 hours ago
add a comment |
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 yesterday
answered 2 days ago
PawanPawan
2,2912720
2,2912720
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
yesterday
welcome@AdamBell, Please see my updates in answer.
– Pawan
yesterday
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
yesterday
@AdamBell, you also need to removepub/static/frontend
folder to see changes.
– Pawan
22 hours 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
3 hours ago
add a comment |
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
yesterday
welcome@AdamBell, Please see my updates in answer.
– Pawan
yesterday
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
yesterday
@AdamBell, you also need to removepub/static/frontend
folder to see changes.
– Pawan
22 hours 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
3 hours ago
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
yesterday
Thanks! It worked! What about the mini-cart? Where would I locate that code?
– Adam Bell
yesterday
welcome@AdamBell, Please see my updates in answer.
– Pawan
yesterday
welcome@AdamBell, Please see my updates in answer.
– Pawan
yesterday
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
yesterday
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
yesterday
@AdamBell, you also need to remove
pub/static/frontend
folder to see changes.– Pawan
22 hours ago
@AdamBell, you also need to remove
pub/static/frontend
folder to see changes.– Pawan
22 hours 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
3 hours 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
3 hours ago
add a comment |
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