URL rewriting in shopping cart site best practice? - url-rewriting

I am building an eCommerce web site with a shopping cart.
Each item in this portal belongs to one category. So when I display an item, in an item details page, which is the best practice to create the URL from the following?
1. <domain>/<item-category>/<item-name>
2. <domain>/<item-name>

The reasons for URL rewriting are (a) to make URL's more human readable and (b) to make the URL's more search engine friendly. In this respect, whether you include the category probably makes little difference to humans if they can distinguish the product from the name alone. Adding category might make the links more understandable to a search engine, but there can be a penalty for depth of link too. With just three sections, you should be OK, but in instances where you have a deeper hierarchy, you might look at joining the item category and name with a separator that isn't '/', such as '-'.

Related

Should Magento sitemap contain empty categories?

From SEO point of view, isn't it dangerous to give out a page without any practical value? If you advertise to have content for a particular category, but you actually don't, wouldn't that make the poeple who clicked on the link to just move along?
More importantly, would the empty category not make guys working at Google mark your website as spammy? Cause you have 100 categories in your sitemap, and only 10 actually contain products?
If you are not using them for content or other presentation you should hide/disable categories that are empty until you have products in them.

Setup multiple Magento designs on single website

I'm setting up a Magento site and have some design requirements that we can't quite get right. What is the best way to setup for the website, store, store view and then the categories for the needs below?
Overview:
One domain name, one set of customers
3 similar product lines that appeal to different industries
Specific Requirements:
The home page should show static content about the company and featured products from all three main categories of products
Each main category of products should have a distinct visual design that carries through when looking at any of the products in those categories
It should be seamless for customers to move from one category of products to another and have the design change without having to choose a store from a dropdown etc.
Home Page: Design A, any and all products may show.
Category 1: Design 1, products only from cat 1 show
Category 2: Design 2, products only from cat 2 show
Category 3: Design 3, products only from cat 3 show
Every combination of websites and stores and store views that we have tried results in strange behavior like changing a store and getting "There was no Home CMS page configured or found." instead of seeing the unique design and category it should be showing. So far we can only get the designs to be different by making new CMS pages which doesn't seem practical.
This seems like something that Magento is made to do and I have to be missing something.
Thank you for any help.
-Shane
Your design needs imply work and considerations from multiple areas of configuration. I'll tackle them in turn. The tl;dr is that there may be more than one way to accomplish what you want, with the number of options at your disposal depending on your needs.
1) One domain name, one set of customers
Domain names (URLs) are configurable for all configuration scopes: Global (aka "Default"), Website, and Store (aka "Store View"). Ultimately, Magento configuration comes down to the most granular/specific scope, which is the store ("Store View") scope. If a configuration value is not specified at the store scope, its value is derived (inherited) from the website or global scope.
Customers are configured to "belong" to all websites or to an individual website (System > Configuration > Customer Configuration: Account Sharing Options). There is no out-of-box capability to restrict customers to a particular store.
2) 3 similar product lines that appeal to different industries
Depends on things discussed below.
1) The home page should show static content about the company and featured products from all three main categories of products
Assuming that you are using the standard configuration of having the Mage_Cms module serve up the home page (System > Web > Default Pages), that CMS page should be visible for all store views. CMS blocks and pages are restricted based on store. Now, later on in your post you mention that you see different behavior in the home page "instead of seeing the unique design and category it should be showing", which indicates that you would like to have different but analogous content for each store's home page. You can use one homepage to do this, but rather than specify content in the content area, you'll need to include your content by specifying a block in Layout XML Update - this block will load a particular category based on the store.
2) Each main category of products should have a distinct visual design that carries through when looking at any of the products in those categories
Establishing theme variants from global scope is possible at the website- and store-wide scopes. Theme variants can also be specified per CMS page, product, and category [each entity having a tab in its admin panel for effecting this change], with the latter having the option of "waterfalling" its custom theme settings to "child" categories and products. Which approach you take depends on your catalog hierarchy as well as the variations present in your themes.
It should be noted that if you need to present different category structure, or if you need to enable/disable products differently based on context, then you will be dealing with multiple websites. This is because category structure relies on root categories, and only websites are associated with root categories. As a reminder, "websites" in Magento have no implicit connection to distinct URLs, it's just an unfortunate naming convention for a scope level.
3) It should be seamless for customers to move from one category of products to another and have the design change without having to choose a store from a dropdown etc.
Based on this final stated requirement, and assuming that you are relying on Magento's native navigation, you are locked into one category structure, and will be using the approach of waterfalling category design, which you will set for each top-level main category under your single root using the "Custom Design" tab:
Another approach would be to create three distinct websites with distinct root categories and then build a menu by hand which links to each of the three stores, but I think this is less ideal based on your stated needs. You could also use one root category and then hide categories by website. Again, less likely that this will be appropriate for you.
Based on the information above you might end up clarifying or adding to your question. I'll update my answer in response if necessary.

Is there a way to change Magento dynamic faceted search pages into static pages?

I've just been given the task of turning around a site's plummeting SEO. One of their issues is their well ranking deep products have now been cut off due to them now being shown as part of a dynamic faceted search option. It can't and won't be indexed and the faceted search is important to the way they need to display their products.
You could create a rewrite rule to make it appear like they are static pages, but I would recommend not doing that.
Ask yourself if Google would want to crawl search result pages: probably not. It's very common to NOINDEX, NOFOLLOW search result and tags pages because they are low quality in terms of content.
Here's a free extension to help you accomplish just that.
Here's a helpful article on SEO in relation to Magento.
Sounds like they got hit by Panda/Penguin. You should be focusing on building links to your main categories and your homepage. Clean up poor quality pages (eg search result pages). Build deep links to products that perform well, but vary your anchor tags considerably. Without a link we can't give much more advice than that.

Opencart, remove category string from the canonical URL of a product

In Magento there's a tick box - if you want or not to have the category in the product's link.
In Opencart there's no such think. What there is in Opencart - is a file which manages the SEO interpretation of links.
If you'll add "/" in front of the link within that file (the professionals who worked with it know about it) that will make the link absolute instead of relative and the product will appear at the beginning of the web site root.
My concern is that at some point this will break and I'm looking for a solution which can be applied on a commercial platform 20k+ products where failing can bring real damage.
The files I was talking about are these:
1.4.x: /catalog/model/tool/seo_url.php
1.5.x: /catalog/controller/common/seo_url.php
The change I already know you need to do is:
$url .= '/' . $query->row['keyword'];
replace with:
$url = '/' . $query->row['keyword'];
It breaks things such as breadcrumbs, again - my concern is that I don't know what other things it breaks therefore I'm looking for another solution.
SEO is mandatory, any SEO advice / plugin applied on Opencart will be more than welcomed. I'm constantly researching the market for related software, I'm willing to change the CMS (which will involve investing hours of development) if I can get better solutions.
Currently I'm dealing with Magento which is NOT flexible, each change drives us crezy - we're looking for something nu that buggy and difficult to work on.
What version of OpenCart are you working with? The latest?
The standard MVC structure of OpenCart combined with native PHP coding makes it a tremendously flexible CMS solution.. (I actually use the core for numerous types of sites).
OpenCart currently depends on the two files you mentioned combined with the SEO table in the database to handle rewrites.
It does not really 'break' the breadcrumbs. Breadcrums are more a history/navigation aid. With SEO urls if you enter a specific product URL you are navigating immediatly navigating to a specific item. So in the heirarchy it would only be one level below the home page..
e.g. yoursite.com/seoproduct
'home' -> 'seo product'
If you use the navigation heirarchy it still renders correctly (without the mod you mentioned)
'home' -> 'category -> 'sub-category' -> 'seo product'
That said, in theory it is easy to acomplish whatever you want with SEO urls. A simple modification to the two files is enough.
In practice, it just depends on how you want to handle them...
How are you going to handle specifying the SEO url for the product? Based on product name? Product model? Or are you going to use the native SEO field in the product info?
If it is the latter, the cart will automatically handle the rewrite. Unfortunately, letting the cart handle it natively also carries the greatest risk of links breaking over time as changes are made.
If it is one of the former options, you will need to make some modifications to how the SEO rewrite is handled.
Once you determine how you are going to be handling the rewrite you can put it in action...
The easiest modification would be to use the native SEO but then add in a redundant search fallback. If no results are found on the in the common/seo controller, have it search for results. If one is found display the product - if more than one is found display the results..
On the other hand, you could completly modify both files and go with a custom SEO handling. (again using a search to find the product)...
I have done it both ways... The first tends to have a bit better performance as it does database/text search only if the direct query returns no results...
There is a canonical tag in the head (at least in version 1.5.0) and in my testing this stayed the same regardless of whether or not the page was access through http://example.com/category1/product-123 or http://example.com/product-123.
<link href="http://example.com/product-123" rel="canonical" />
I would recommend looking at How can I create custom SEO-friendly URLs in OpenCart? for your other pages (information, cart, checkout, etc).
I've took the decision to:
Not set a string on the SEO field of each category
This will not add the category name before the product
This means that instead of /category/product I'll have /product
As CarpeNoctumDC said, I could change the PHP files so that the category could've been removed automatically but the disadvantages I can see are:
You need to update the core PHP files on each update
Can't certify of there are places where that turns against you, since it's not part of the theme but it's part of the core of opencart
The good news is that there's no need for the brand / manufacturer string before the product name (as many of us probably need) because we can use the manufacturer feature for that.
In this way the category / subcategory can be non relevant SEO text (which in my case is), the product link is legitimately set by opencart to /{link} which is totally SEO friendly and if I need a representation of the link with the manufacturer I only have to set a SEO link to the manufacturer itself. This will generate /{manufacturer}/{link_of_the_product} which on top it has within the header a canonical link pointing towards /{link_of_the_product} - in this way Google will not be disappointed.
As this very moment I'm doing the exports / imports form the old Magento 1.6 which turned to be a pain to the opencart customized as mentioned above.
We've passed Google Panda - there's no bad history on the domain, no duplicate content so far (~10k products) - we'll see how things turn after this major update.
If Google doesn't agrees with this config, I will post warnings on this topic.
Bogdan

Magento custom browse catalogue workflow

I'm evaluating Magento for a particular client of mine. They want to enforce a particular workflow for browsing the catalogue. They're a travel company which puts together custom holiday packages and want to make sure users enter things like the number of adults / children before selecting accommodation (as number of people will affect available accommodation and pricing).
Note that accommodation is just an example, there are several other different components to a holiday package. And they've given me a 7 step (mostly) linear workflow they want users to follow before we get to anything which might resemble a checkout process (and even then their concept of "checkout" is quite different to Magento's).
I'm thinking of storing accommodation (and each of the other package components) in separate product categories. Then I can restrict what users can see as they browse the catalogue based on what they've already added to their shopping cart.
My research indicates that Magento doesn't really do this kind of thing out of the box. Am I mistaken? Are there add-ons which would support this kind of thing?
If I was to go down this road, would I be redesigning (or indeed, replacing) a large chunk of Magento's catalogue browsing functionality?
Well there are several approaches that you can take to implement something like this; but all require that you do custom development work.
You could define your packages as simple products with attributes for each of the specific package options and use that to filter each package from the others, now you would need to create a new module that adds a route on the frontend that is going to be your multistep form that will get all the information once you have all the information you can get a collection of all the products(packages) that match those attributes.
Now the deal there is if that price changes depending on the options selected if that's the case then you might need configurable products or something custom to change the price of each package.
It's really hard to say without real specifications of what your client needs, but if the question is if it's possible with Magento then the answer is yes it all depends on your level of skill :)
Kind Regards
So I ended up going with Magento as a product base and extending it using some custom code (been a while since I've developed in a LAMP environment!)
I created a static block which is used as the root of the workflow. There are 8 steps in the workflow which get listed in an ordered list. Each item has two custom Magento widgets next to it, which are a) a little tick image displayed when you've completed the workflow stage and b) a link which displays when you're up to that stage, clicking the link takes you to an appropriate catalog page (eg: choose accommodation, hire car, confirm shopping cart, etc).
I disabled the normal top catalog navigation to encourage users to keep within the workflow. That is, the mouse over to see more catalog detail of the "holiday planner" is disabled (although you can just navigate to the correct urls if you know them, or are smart enough to use the SEO link at the bottom of the page!).
Everything in your holiday is added as cart products (which has the positive side effect of Magento will remember your holiday if you get part way through it).
There is a big state machine in a helper class to determine what stage of the workflow you're up to. This checks your cart to see if products with particular sku's or from a particular attribute set are added.
I also overrode many URLs and redirects (eg: after you add a product) to send the user back to the root holiday planner page. This added to the workflow as almost every action you did or product you add bounces you back to that workflow page (which always tells you what the next step is).

Resources