It would be nice if 7.x-1.x-dev could also have the feature as described in http://drupal.org/comment/reply/1165056

Please consider. Thanks!

Comments

willvincent’s picture

Status: Active » Closed (won't fix)

This doesn't strike me as a very realistic request. There are a lot of variables that could be in a search query, handling all of those would be a nightmare.

By all means, feel free to provide a patch, but this isn't going to be a development priority.

awild’s picture

Assigned: Unassigned » awild

As I thought this was a pretty important update for SEO purposes I've got this working on a test site of mine using the URL structure as follows:
/store/SearchIndex-Music/BrowseNode-16/Keywords-deluxe%20CD/

I've used the /x-y/ format rather than /x/y/ because I felt it was easier to control. With the /x/y/ format if someone had searched for a value such as "BrowseNode", "Keywords", "Artist" etc. this may have caused a problem - the /x-y/ format avoids this (although I know it was very unlikely). This "Clean URL" change can be enabled or disabled in admin, so the old query based URLs will still be available by default, and existing links should still function correctly.

I still need to test this a bit more, and look into issues such as canonical URLs and/or redirecting if people want to switch from the query based URLs to the clean URLs on an existing site. Also, the category (SearchIndex) doesn't seem to stay on the current category you are browsing, so I will look into that as well. The parameters which currently work are SearchIndex, ItemId, BrowseNode, Brand, Author, Composer, Artist, Manufacturer, MinimumPrice, MaximumPrice, MinPercentageOff, Keywords and Sort.

If people interested in this could let me know if they are happy with what I have done, or if you know of any problems /x-y/ might cause, then reply here and I'll either make changes or get the patch ready.

awild’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new56.68 KB

Here is the patch (slightly later than planned).

Adding clean url and canonical url functionality.

New functions:
amazon_store_clean_url_get
amazon_store_clean_url_set
amazon_store_clean_url_sort
amazon_store_clean_parameters
amazon_store_clean_url_item
amazon_store_theme_pager_link
amazon_store_theme_registry_alter

Also updated amazon_store_cart, amazon_store_item_detail, amazon_store_search_results and amazon_store_similar_items_panel templates to use the new functions.

New 'Use clean urls' and 'Use canonical urls' options added to Amazon Store admin page.

Could someone please give this a test and let me know if any changes are required. I've tried on a fresh install of Drupal and also with CTools and Panels. I'm not sure all of the functions are in the correct files so if you want any moving around let me know.