How to remove products url for specific Category URL-REWRITEOptimize catalog product url rewriteURL rewrite for category in layered navigation to external URLMagento 2 URL rewrite IndexHow Magento 2 url rewrite works?How to remove parent category from subcategory URL?How can i rewrite my category url for redirect new siteMagento 2 Rewrite Category to CMS Page?Remove random number from rewrite urlIs Possible Main Category URL Rewrite Management?Magento 2 query url rewrite
Optimising the Selection of MaxValue in Association
Is straight-up writing someone's opinions telling?
How could a medieval fortress manage large groups of migrants and travelers?
Credit card details stolen every 1-2 years. What am I doing wrong?
How can I help our ranger feel special about her beast companion?
Kepler space telescope undetected planets
What is the meaning of [[:space:]] in bash?
Is passive Investigation essentially truesight against illusions?
Operation Unz̖̬̜̺̬a͇͖̯͔͉l̟̭g͕̝̼͇͓̪͍o̬̝͍̹̻
Did 007 exist before James Bond?
what relax command means?
Why is Google approaching my VPS machine?
Why don't commercial aircraft adopt a slightly more seaplane-like design to allow safer ditching in case of emergency?
Why did Steve Rogers choose this character in Endgame?
Vienna To Graz By Rail
Is this artwork (used in a video game) real?
Sending a photo of my bank account card to the future employer
A verb to describe specific positioning of three layers
Where are the rest of the Dwarves of Nidavellir?
Alphanumeric Line and Curve Counting
What is the point of a constraint expression on a non-templated function?
Should I be able to keep my company purchased standing desk when I leave my job?
What happens if a company buys back all of its shares?
ROT13 encoder/decoder
How to remove products url for specific Category URL-REWRITE
Optimize catalog product url rewriteURL rewrite for category in layered navigation to external URLMagento 2 URL rewrite IndexHow Magento 2 url rewrite works?How to remove parent category from subcategory URL?How can i rewrite my category url for redirect new siteMagento 2 Rewrite Category to CMS Page?Remove random number from rewrite urlIs Possible Main Category URL Rewrite Management?Magento 2 query url rewrite
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to remove url of prodcuts for a specific category. How can i remove specific category URL-REWRITE? using Query pro-grammatically
magento2 products url-rewrite
add a comment |
I want to remove url of prodcuts for a specific category. How can i remove specific category URL-REWRITE? using Query pro-grammatically
magento2 products url-rewrite
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
add a comment |
I want to remove url of prodcuts for a specific category. How can i remove specific category URL-REWRITE? using Query pro-grammatically
magento2 products url-rewrite
I want to remove url of prodcuts for a specific category. How can i remove specific category URL-REWRITE? using Query pro-grammatically
magento2 products url-rewrite
magento2 products url-rewrite
edited Jul 9 at 6:20
Asad Ullah
asked Jul 9 at 5:58
Asad UllahAsad Ullah
42613 bronze badges
42613 bronze badges
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
add a comment |
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
add a comment |
2 Answers
2
active
oldest
votes
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
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
);
);
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%2f281288%2fhow-to-remove-products-url-for-specific-category-url-rewrite%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
answered Jul 10 at 5:51
Asad UllahAsad Ullah
42613 bronze badges
42613 bronze badges
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
1
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
add a comment |
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
add a comment |
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
answered Jul 9 at 6:05
Shoaib MunirShoaib Munir
5,2886 gold badges23 silver badges69 bronze badges
5,2886 gold badges23 silver badges69 bronze badges
add a comment |
add a comment |
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%2f281288%2fhow-to-remove-products-url-for-specific-category-url-rewrite%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
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47