You are here:  » Creating a User Friendly Price Tapestry Site


Creating a User Friendly Price Tapestry Site

Submitted by raid on Wed, 2009-12-30 22:49 in

Hi

I have got the feeds registered and the basic Price Tapestry site up, which shows the Search Box and the Browse By links.

Is there further info online about how to produce a full user friendly website?

Are there further guidelines for creating the final site or is that down to me now?

Thanks

Raid

Submitted by support on Wed, 2009-12-30 23:49

Hello Raid,

Do you mean in particular search engine friendly URLs?

This is something that you can enable in config.php - use

$config_useRewrite = TRUE;

(line 8), in conjuction with a .htaccess which you need to create from htaccess.txt from the distribution (the easiest way is simply to rename htaccess.txt to .htaccess using your FTP program - right click on the file in the remote window and look for the Rename... option)

If you're referring to other features that you'd like, please let me know what you'd like to do and I'll hopefully be able to point you in the right direction!

Cheers,
David.

Submitted by raid on Fri, 2010-01-01 18:52

I suppose what I am trying to establish is whether I have utilised all the features of the script available before I start modifying it to make what I consider a site suitable for the end-user.

Here's my ink cartridges site so far.

I will take a look at creating search friendly URLs, but other things I want to do are:

- Create pages such as "canon-ink-cartridges.php". I can see I already have a page like this created from search.php, but what if I want to create a separate .php file for this. Is this something I just have to work out for myself, or has someone created guidelines to do this? I just want there to be a unique page for a unique data driven query, just for SEO purposes.

- Create a proper home page with links to most of the category pages. Again, I can do this, I'm just wondering if there's already templates or scripts out there that I could be using to make things faster.

Thanks

Submitted by support on Sat, 2010-01-02 10:01

Hi,

One thing some users do to achieve query specific custom pages is simply to create a PHP script of the required name, preset the search keywords and then require("search.php"); for example:

canon-ink-cartridges.php

<?php
  $_GET
["q"] = "canon";
  require(
"search.php");
?>

(or perhaps you would use brand:canon as the query depending on how your products are represented - but that may not show 3rd party cartridges of course)

With regards to create a category index; I wouldn't ordinarily recommend using a query to generate the distinct category list on your home page as this will result in quite an intensive database operation for every view of your home page. Instead, and should be practical on a niche site such as your example, would be to hand-code the category links into your template - of course using the re-written versions of URLs, for example:

<ul>
  <li><a href='/brand/Canon/'>Canon</a></li>
  <li><a href='/brand/HP/'>HP</a></li>
  <li><a href='/brand/Lexmark/'>Lexmark</a></li>
</ul>

Hope this helps!

Cheers,
David.

Submitted by macnpaul on Sat, 2010-03-13 14:39

I've just tried the example above to create a query specific page and it seems like a good solution, however what would be the best way to create a page featuring products belonging to a certain brand, but also -

1. Display the results in slightly different way to the search results page (would still be keeping the original search results page for user entered queries).

2. Include around 250 300 words of my own original content on the page (probably at the bottom)to make it more search engine friendly.

3. Not display the search query in the search field (have it blank).

For point 1. I'm thinking I could create a second version of html/searchresults.php

What would be the best way to achieve all 3 on a single page that would be called something like panasonic.php and would it be based on one of the existing price tapestry files, or would it need to be created from scratch?

Thanks,

Paul

Submitted by support on Mon, 2010-03-15 10:24

Hi Paul,

Yes, you're on the right lines. To display brand search results; use a query of "brand:Brand Name:". One thing you can do then is create an alternative html/searchresults.php and set a variable in the containing page (see below) indicating the alternative HTML module to use. Finally, you can enter some HTML to display your custom content, and then add the to have that displayed above or below your custom html/searchresults.php as required. For example;

brand-page.php

<?php
  $_GET
["q"] = "brand:Brand Name:";
  
$customHTML "Custom content here":
  
$searchresultsHTML "html/searchresultsBrand.php");
  require(
"search.php");
?>

And then in search.php; look for the following code on line 293:

require("html/searchresults.php");

...and REPLACE with:

if ($searchresultsHTML)
{
  require($searchresultsHTML);
}
else
{
  require("html/searchresults.php");
}

And finally; in your custom searchresults.php (whatever you call it), simply add:

<?php
 
print $customHTML
?>

...at the beginning or end of the file depending on whether you want your custom content above or below the results.

Hope this helps!

Cheers,
David.

Submitted by bat on Fri, 2013-03-22 22:27

Hi David
I've been having a play around and looking to create some specific pages for groups of items that I don't want to make categories for. What would I do if I wanted to use:

<?php
  $_GET["q"] = "example";
  require("search.php");
?>

but I wanted to have my own title, meta description and to have a custom paragraph above the results?

Thank you,
Bat

Submitted by support on Sat, 2013-03-23 12:20

Hi bat,

First of all, a couple of simple mods to search.php. Look for the following code at line 320:

$header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);

...and REPLACE with:

if (!isset($header["title"])) $header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);

(that will allow you to set a title outside of search.php)

And then look for the following code where the search results themselves are displayed, at line 362:

  require("html/searchresults.php");

...and REPLACE with:

  if (isset($customHTML)) print $customHTML;
  require("html/searchresults.php");

With that in place, you can then create your calling script, let's say "example.php" as follows:

<?php
  $_GET
["q"] = "example";
  
$header["title"] = "Find the best prices on Example here!";
  
$header["meta"]["description"] = "Example price comparison search results";
  
$customHTML "<p>Check out the latest example offers form our merchants below!</p>";
  require(
"search.php");
?>

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Mon, 2013-04-01 14:43

Awesomes! Thank you David!!

Submitted by rolli1 on Mon, 2013-04-08 09:02

Hi David,
what I do not understand is: how is the sample.php displayed?

regards Roland

Submitted by support on Mon, 2013-04-08 09:08

Hello Roland,

After creating a custom page based on example.php, you would just need to create a link to it, for example from your header, if you have a menu bar, then you would add:

<a href='/example.php'>Example Page</a>

...and then your visitors would click the Example Page link to go to example.php!

Cheers,
David.
--
PriceTapestry.com