Juanu Posted June 3, 2013 Share Posted June 3, 2013 (edited) Hi! On My Module, I need to get the product URL, but regardless of being friendly or not, i need to always get the same, so, I decided to use something like: http://www.mystore.c...troller=product The problem is that i can´t hard-code this because if the installation is in a different directory, it won´t work. so... Here is the question: How can i get the real product url (not friendly URL) or how to get the current installation path to make the path by myself. Thanks! Edited June 3, 2013 by vekia (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 3, 2013 Share Posted June 3, 2013 but why you don't want to use $link method? You will be redirected automatically to the friendly url link even if you will use non-friendly url Link to comment Share on other sites More sharing options...
Juanu Posted June 3, 2013 Author Share Posted June 3, 2013 I see... what would be the way to use the link method? I´ve never used it Link to comment Share on other sites More sharing options...
vekia Posted June 3, 2013 Share Posted June 3, 2013 $link->getProductLink($id_product) - this function returns VALID link to the product, this is the best way to achieve this - function always return valid link Link to comment Share on other sites More sharing options...
Juanu Posted June 3, 2013 Author Share Posted June 3, 2013 (edited) Where is the $link variable defined? Or where should it be? EDIT: I got it: Usage: Link::getProductLink($id_product); Thanks! Can be marked as SOLVED! Edited June 3, 2013 by Juanu (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 3, 2013 Share Posted June 3, 2013 exactly :-) thanks for infomation! so im going to mark this thread as [solved] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now