Magento - How to create a custom url based on attributes? - magento

In the Magento Admin > Catalogue > Attributes > Attribute Sets, we have a set of attributes for "Manufacturers" which group products under designers.
I am trying to create a hyperlink that maps a custom route to an attribute query like so
this is route i want:
{{base_url}}/designers/some-designer-name/
this is what it will map to:
{{base_url}}/?designer=136
I have tried creating a custom url rewrite under Catalogue > URL Rewrite Management with no luck.

Please refer this this may help you
http://www.atwix.com/magento/products-list-cms/

if you want to create custom url, than follow the steps...
From the Admin panel, select Catalog >> URL Rewrite Management
In the upper-right corner, click the Add URL Rewrite button
In the Add New URL Rewrite section, set Create URL Rewrite to “for Product.”
Find the product in the list below and click to open the record and click Skip Category Selection button
In the URL Rewrite section, do some following things:
a.In the Request Path field, enter the new value for the updated URL. The Request Path must be unique for each rewrite.
b.Set Redirect to one of the following:
Temporary (302)
Permanent (301)
For your own reference, enter a brief description of the rewrite.
click to save and enjoy ;)

Related

Blog Link in magento

I'm working in magento blog
i have 2 store views each one for different country
the problem is when we add the blog link in the social media page .. we must to write only one store view in the URL
How can i add a blog URL that match with customer store view
ex: if customer from store view 1 open the link .. the URL will be (example.com/storeview1/blog)
and if customer from store view 2 open the link .. the URL will be (example.com/storeview2/blog)
I tried to make the URL be (example.com/blog)
but it refers to 404 page
Try this.
Open Admin panel
Goto System->Configuration
Change Current Configuration Scope to storeview1 or storeview2 from top of leftbar.
search for keyword blog under "aheadWorks Extensions" at leftbar
Try to change Route to Blog from settings.
Hope this will help some how.

how to redirect the URL in magento?

how to redirect the URL in Magento if i click on category or subcategory it should show page which i have created because of responsive design i'm doing this
I've created the URL for pages in such a way that the both category and subcategory URL is equal to page URL.
For this all you have to do is to add URL rewrite. For example if you category id is 10 and cms page link is "cmspage.html", then in magento backend admin go to
catalog->URLrewrite Management and search for id 10 in ID path column copy the "Target Path" field data now write a custom url rewrite for this "Target Path"
go to Catalog->URL rewrite Management, Click Add URL rewrite button. choose “Custom” from “Create URL Rewrite” drop-down list. add the details like belwo
Request Path — It must be the Target path which copied before (catalog/category/view/id/10) in above.
Target Path — It should be the CMS page URL
That's it you will have linked category with custom cms page

How to rewrite SEO URL in Magento?

I am working on FAQ custom module which lists all FAQ related with particular product.
The following is the my product view page link:
http://mydomain.com/magentoassignments/index.php/watches/titan-suprimo-501.html
And following is the my custom FAQ page link for this product:
http://mydomain.com/magentoassignments/index.php/faqmodule/product/list/id/1/category/3/
Now, my requirement is create above link SEO friendly respective with product like following:
http://mydomain.com/magentoassignments/index.php/watches/titan-suprimo-501/faqmodule.html
OR
http://mydomain.com/magentoassignments/index.php/watches/titan-suprimo-501/faq.html
How can I achieve this?
First of all you have to create your custom rewrite in admin.
Just go to url rewrite management and choose custom url rewrite type
Give unique id path in id path field
In request path give this http://mydomain.com/magentoassignments/index.php/watches/titan-suprimo-501/faq.html
This is your request path from frontend
And in target path give this http://mydomain.com/magentoassignments/index.php/faqmodule/product/list/id/1/category/3/
internally magento use your target path.
And save your url rewrite

Magento migration from single store to multistore. Redirects

I have 1 website for now. Its URL is www.test.com, for example.
I want to create second website on the same domain adding store codes to URLs. So my URLs will be
www.test.com/first/
www.test.com/second/
But as I can see all my previous URLs will show 404 on their open. So if I open
www.test.com/product.html
it will show 404. It is not good because I loose my SEO.
How can I create redirects so if user opens
www.test.com/product.html
he will be automatically redirected to default website, like
www.test.com/first/product.html
Shall I have any issues with such redirects? (Like API will not work)
Or is it possible for URL
www.test.com/product.html
to show product from default website, if exists?
Magento has a very good system for SEO.
For Rewrite Management these are the steps:
1.Loginto Admin.
2.Move mouse over Catalog and you will find a drop down.
3 Select URL Rewrite management.
Catalog >> UrlRewrite Management
4.Then click on ADD URL Rewrite Button.
5.Then on next screen select custom from option provided
Create URL Rewrite : Select Custom
Now following important fields and values that should go:
Request Path (Old URL ) Target Path ( New URL ) redirect (Permanent 301).
Note : This approach will be good if you have few products but if you have too many product then some .htaccess rule is recommended.

Magento 1.7.0.2 Index Management overwriting URL Rewrites

I have a slight problem with the Index Management on Magento 1.7.0.2.
I have quite a few custom URL rewrites for categories.
When I re-index the Catalog URL Rewrites it deletes all of my custom rewrites for the categories and sets them back to the system default.
Before re-indexing: http://i.imgur.com/4s1oo.png
After re-indexing: http://i.imgur.com/0U8zE.png
Also on a side note, What are the differences between cache management and index management?
Any help is appreciated, thanks.
Magento is changing those because you didn't change the id_path. If you specify different id_path value for your Custom Category rewrite, Magento will not overwrite it.
Also what you want to achieve could be done with Custom Url Rewrite. For example:
request path: catalog/category/view/id/118
target path: 'corporate'
In this way you're making a destination of system rewrite yours start point.
This was driving me absolutely bonkers until I figured out a nice little work-around.
I create my new object (in my case it was a category for the top nav
I go to URL Rewrite and note the ID Path of the new category
I delete the system generated URL Rewrite
I create a custom Rewrite specifying the ID Path of the deleted object, The request path, and then the path to the desired URL
I then go to phpmyadmin > core_url_rewrite and find my newly created custom Rewrite
I change the store_id to 0 (not changing anything else)
I then go back to Magento and run a reindex. This creates a new system generated Rewrite with a higher url_rewrite_id (see in phpmyadmin > core_url_rewrite table)
I then create my page with the desired path
Reindex / flush caches and presto.. my top nav now has a menu item to my new page.

Resources