Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 Tips and Tricks - HALL OF FAME
 PHP SEO Friendly Static Search Pages
Author « Topic »  

dewers
Ecommerce Template Guru

USA
1302 Posts

Posted - 05/10/2013 :  09:59:38  
http://www.ecom-mods.com/search.php?pg=1&stext=csv+utility&sprice=&stype=&scat=

Get rid of the ugly, hard-to-read links like the above and give your visitors meaningful links to helpful, SEO friendly static search result pages with the steps below:

1. Make a copy of search.php and rename it to the page name you want.

2. Open the new page in code/text view in your HTML editor or notepad and find the following line:
<?php include "vsadmin/inc/incsearch.php" ?>


3. Above this line, add the following code:
<?php
/************************************************************************************************
Static Search Page Settings
************************************************************************************************/
$_GET['stext'] = 'csv utility'; // The text to be searched on
$_GET['scat'] = ''; // The category number to be searched in, use commas between the numbers to search on multiple categories eg scat=12,13,14
$_GET['stype'] = 'all'; // 'any', 'exact' or 'all'
$_GET['sminprice'] = ''; // The minimum price parameter
$_GET['sprice'] = ''; // The maximum price parameter
$_GET['sman'] = ''; // This is to search by manufacturer eg, sman=xx - where xx is the id (Version 5.4 required)
/************************************************************************************************
DO NOT CHANGE THE BELOW VARIABLES
************************************************************************************************/
$_GET['nobox'] = 'true';
if(!isset($_GET['pg']) || !is_numeric($_GET['pg'])) $_GET['pg'] = 1;
$orprodsperpage=9999;
?>


4. Save the page, upload it to your server, and test.

Here are a few examples:
http://www.ecom-mods.com/csv-utilities.php
http://www.ecom-mods.com/100m-product-line.php
http://www.ecom-mods.com/all-products.php


Daniel Ewers
Ecom-Mods.com

PHP extensions from Ecom-Mods.com
Rate Our Products & Services

Edited by - dewers on 03/31/2015 20:57:21

dbdave
ECT Moderator

USA
10406 Posts

Posted - 05/10/2013 :  14:41:13  
I have been linking to static (renamed) search pages for years, but will all the junk added to the url...
Maybe I will try to figure out the .asp version of what you have there..

David

dewers
Ecommerce Template Guru

USA
1302 Posts

Posted - 05/10/2013 :  15:14:17  
Unfortunately, ASP is much much more limited than PHP. In ASP, the Request.Form or Request.QueryString values are read-only and cannot be overwritten.

An alternative would be to use .htaccess rewrites, but that will require a module for IIS.

http://www.helicontech.com/isapi_rewrite/

Daniel Ewers
Ecom-Mods.com

PHP extensions from Ecom-Mods.com
Rate Our Products & Services

1818charlie
ECT Moderator

United Kingdom
1192 Posts

Posted - 05/09/2014 :  15:11:02  
I like the look of this. How I haven't noticed this before I dunno.

Quick question. I'm not keen on the actual search box showing on the page. So what I have done is add this line of code prior to the closing head tag - <style>TABLE.cobtbl{display:none;}</style> The search box no longer shows and gives a customer the appearance of a standard php page with loads of dynamically generated stuff they are looking for.

Is there any disadvantage to SEO and search bots in having done this?

Billy in Bolton, Manchester, UK.

Using ECT Responsive PHP V 6.3.5

dewers
Ecommerce Template Guru

USA
1302 Posts

Posted - 05/09/2014 :  15:16:54  
Hi Billy,

The search box should not be showing on the page with the code provided. Specifically, the line "$_GET['nobox'] = true;" turns off the box on the search page. That said, hiding the box will not affect SEO.

Daniel Ewers
Ecom-Mods.com

PHP extensions from Ecom-Mods.com
Rate Our Products & Services

1818charlie
ECT Moderator

United Kingdom
1192 Posts

Posted - 05/09/2014 :  15:32:05  
Hi Daniel,

Cheers for the quick response. That line is definitely in the code, but such is life I suppose. I will stick with the 'workaround' I've implemented for the time being. It's only a small site for a customer.

Just to mention the version of the site I am trying it out on is the CSS none responsive on V6.3.5 https://www.ecommercetemplates.com/proddetail.asp?prod=Virtual-CSS-Pink-Ecommerce-Plus

Billy in Bolton, Manchester, UK.

Using ECT Responsive PHP V 6.3.5

robii1
Ecommerce Template Expert

United Kingdom
510 Posts

Pre-sales questions only
(More Details...)

Posted - 03/31/2015 :  17:41:44  
Hi Daniel, should this work for the current version (6.4.5)? I tried this but the page is returning all products on my site, regardless of what is written here - $_REQUEST['stext'] = 'csv utility'; //

Sinbad
ECT Moderator

USA
65937 Posts

Posted - 03/31/2015 :  17:58:02  
Hi this would work on older versions, sites using 6.4.5 can setup SEO friendly urls as outlined here https://www.ecommercetemplates.com/help/search-engine-friendly.asp#seourl

Winners never quit, quitters never win
User Manual for Ecommerce Templates

robii1
Ecommerce Template Expert

United Kingdom
510 Posts

Pre-sales questions only
(More Details...)

Posted - 03/31/2015 :  18:02:51  
I think this post relates specifically to static search results pages. Your link relates to seo friendly product details, products and category pages

dewers
Ecommerce Template Guru

USA
1302 Posts

Posted - 03/31/2015 :  20:59:08  
Hi Rob,

Because of changes ECT made to how they handle the $_REQUEST variables, you will need to change the $_REQUEST variables in the example code to $_GET variables. I have updated my original post if you want to just recopy it.

Daniel Ewers
Ecom-Mods.com

PHP extensions from Ecom-Mods.com
Rate Our Products & Services
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.04 seconds. Snitz Forums 2000