SEO (Search Engine Optimization) should be a major concern for anybody starting a new e-commerce business. It is a known fact that broken links will result in a lower SEO grade so how do you handle products that you no longer have in stock (and you don't want shoppers viewing) but have already been indexed by the likes of Google, Bing, Yahoo, etc.? In LightSpeed's Admin Panel, they offer us three options for displaying products:
- Display and Allow Backorders
- Display but do not allow ordering
- Make product disappear
When working with one of our LightSpeed clients, we realized a third option was required. We call it, "Make Products Disappear From Search Results, Direct Link Still Works". Basically, it makes products disappear from all product categories and searches done on your site, but if somebody was to stumble across a direct link to the product that a search engine such as Google had indexed, then that product would still be available for viewing but would not allow ordering. Therefore, keeping all your links working, and your SEO score climbing to the moon.
Here's how we accomplished the modification:
First, we changed the setting in the stores admin panel to Display but do Not Allow Ordering. T
hen we modified /core/protected/controllers/SearchController.php on line 152 to
if (_xls_get_conf('INVENTORY_OUT_ALLOW_ADD') ==
Product::InventoryDisplayNotOrder)
$criteria->addCondition('(inventory_avail>0 OR inventoried=0)');
That's it! Simple modification but has had great SEO results for our clients. Contact us at
[email protected] if you need personal assistance.