I m facing one Issue as below
I have created 1 product and assign it to category id 4 and create one product without category when i call 2nd product model
in 1st product detail page then it gives url link http://yoururl/categoryid4/producturl.html. instead of http://yoururl/producturl.html.
I debug the code and found that it's a magento core functionaliy issue, it takes parent category id during fetching the url
If anyone has its solutions please help.
These links can help you with you:
Let me know, if these don't help you.
Thanks for your reply but it is not my solutions
Do below steps in your fresh magento so you will get exact idea what i means to say
1) Create 2 Different Category like 1 is computer and 2nd is Mobile
2) Create 2 product and assign 1 product to Computer and 2nd to mobile category
3) open view.phtml and after $_product variable add below code
4) Save view.phtml file
5) Open 1st Product Full Url with Category path like http://yoururl/computer/1stproduct.html
6) See 2nd Product url in your product detail page you wil get url like http://yoururl/computer/2ndproduct.html instead of
please let me know if any query.