Wrong url in magento paging - magento

I have a problem regarding paging of the custom module. When i click on the next page the it take the url as localhost/magento/fme-support/index/index/url/BC/?p=1, but this url doesn't work properly, the correct URL is localhost/magento/fme-support/category/BC/?p=1.
Please suggest me how and i change this url.
Thanks.

Try making url rewrites off
If it doesn't work there is some issue with your extension you have installed
Check for redirect in your extension

The "index" in the URL means you are calling the index controller of the module.
Magento module URLs work like this
http://magento_installation.com/(storeview)/moduleMame/controllerName/functionName/

Related

How to redirect to a specific part of a page in codeigniter

I want to redirect to a specific part of a page which has a specific id when using redirect(controller/view). Can you guys help me.
You can use #id_of_element with the URL you are constructing.
redirect('controller/view#id_of_your_html_element');
this will load the page to the specific location

Is there a way to change login page URL in Magento?

I want to change the URL for customer login in Magento.
From the URL,
www.mydomain.com/customer/account/login/
To something like this:
www.mydomain.com/login
How can I do this?
I have not tried this method yet but you can achieve this with url rewrite.
Go to url rewrite and add custom url rewrite, give unique id path.
And in request path give www.mydomain.com/login this url and in target path give this url www.mydomain.com/customer/account/login/ magento internally consider target path for its use.
For more Info on url rewrite you can see here http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/urlrewrite/index
http://blog.beetleweb.com/2012/10/creating-custom-magento-url-rewrites/
1)Login to magento admin panel
2)Goto catalog->URL Rewrite Management
3)In Requestpath give www.mydomain.com/login
4)In Targetpath give www.mydomain.com/customer/account/login/

Magento : Allow URL as parameter

I am integrating Bazaarvoice in Magento for Ratings and Reviews.
My issue is Bazaarvoice is redirecting to My site with some additional parameter in URL and it turns in to 404 error. I have contacted Bazaaevoice and they told me that Magento may not allow url as a parameter.
www.mysite.com/bazaarvoice?pid=4801-05E&bvdisplaycode=7529-en_us&bvappcode=rr&bvproductid=4801-05E&bvpage=http://abcd.ugc.bazaarvoice.com%2Fbvstaging%2F7529-en_us%2F4801-05E%2Fsubmitreview.htm%3Fformat%3Dembedded%26campaignid%3DBV_RATING_SUMMARY_ZERO_REVIEWS%26sessionparams%3D__BVSESSIONPARAMS__%26&bvcontenttype=REVIEW_SUBMISSION&bvauthenticateuser=false
IS there any solution that i can make the Magento to allow URL as a parameter.
Thanks
I dont think the issue is the parameter because this work
http://demo.magentocommerce.com/?pid=4801-05E&bvdisplaycode=7529-en_us&bvappcode=rr&bvproductid=4801-05E&bvpage=http://abcd.ugc.bazaarvoice.com%2Fbvstaging%2F7529-en_us%2F4801-05E%2Fsubmitreview.htm%3Fformat%3Dembedded%26campaignid%3DBV_RATING_SUMMARY_ZERO_REVIEWS%26sessionparams%3D__BVSESSIONPARAMS__%26&bvcontenttype=REVIEW_SUBMISSION&bvauthenticateuser=false
I think the issue maybe because you dont have this controller in your magento site
bazaarvoice
Does this url work or do you get a 404?
www.mysite.com/bazaarvoice

Custom URL for Magento's basket page

I'd like to implement custom URL for our Magento's basket. Magento out-of-the-box url paht is /checkout/cart but client request /checkout/bag.
I tried to somehow
* URL rewrite management in backend - it works, but I need to update all occurences in code to new url, because $this->getUrl('checkout/cart') doesnt translate into checkout/bag
* also I tried to follow some advices from http://alanstorm.com/magento_dispatch_rewrites_intro but basicaly it doesnt help me too.
* also I tried example from this post http://phprelated.myworks.ro/two-add-to-cart-buttons-with-different-redirect-actions-at-once-in-magnto/
So, is there any way how can I rewrite translation from path 'checkout/cart' into checkout/bag without updating all ocurrences in our templates and classes $this->getUrl('checkout/cart')
Any solution depending on web server architecture are not the ultimate solution.
I found solution
1) I rewrited model core/url to have desired output
EDIT 1 - sample implementation https://gist.github.com/jaromirmuller/132cdd9378e5b1018170
2) Added url rewrite into config.xml which rewrites url path from /checkout/bag to /checkout/cart
<global>
<rewrite>
<mynamespace_mymodule_checkout_cart>
<from><![CDATA[#^/checkout/bag#]]></from>
<to>/checkout/cart</to>
</mynamespace_mymodule_checkout_cart>
</rewrite>
</global>
3) Added url rewrite into Catalog > URL rewrite management which handles if anyone comes to /checkout/cart then he's redirected to /checkout/bag paht which is correct.
These 3 points makes site consisten and working without any issues. That's the easises way without rewriting tons of templates and classes.
The way Url Rewrites work means that you have some url test.com/some on the page and when you click on it, you'll get test.com/some2 instead. So Rewrites do not change the actual anchor link - they change the destination of that link to the new recipient.
There is no easy solution which will change all of the anchor links to the new ones (aside from parsing and replacing links on each page - which is not preferable).
So if you want to leave anchor links as they are and get the new Url after user clicks on the link, you should go with Url Rewrites. Though if you want to change the actual links on the page, you need to search for all occurrences and change them manually.
Mage::getUrl() is not a fabric which operates with aliases (like Mage::getModel()) - you'll get from it what you have inserted, and the only way to change the outcome Url is to change income parameters.
You can do it using apache url rewrites. Something like
RewriteRule ^/checkout/cart(.*)$ /checkout/bag$1 [R=301,NC,L]
This answer works for changing the wishlist name by changing the frontend routers in app/etc/local.xml. Maybe it can be adapted for your uses?
Change wishlist url in magento
To manage more url translation You can use this module:
http://www.magentocommerce.com/magento-connect/catalog/product/view/id/18160/

url routing in codeigniter like wordpress clean url

How to code or achieve this url like wordpress
for example
http://www.example.com/product/view/my-product-sample
is there way to have this url ? any tips tutorial example thank you guys :)
Well, this is already a valid URL without any alteration, calling the controller product, method view with the argument my-product-sample.
However, I think you are looking for routing.
Example:
$route['product/view/(:any)'] = 'products/view_product/$1';
This route is saying: If user requests
product/view/(something)
give them
products/view_product/(something)
As usual, see the user guide for more information.

Resources