You are here:  » product page and search page Q ?


product page and search page Q ?

Submitted by Henk3001 on Wed, 2006-08-16 08:11 in

is it possible to have the product.php page like: link and the search.php page like link

under each other, so you have a look also for these items/products page look a like : )

without the headers/footer from the search.php

Thx
HEnk

Submitted by support on Wed, 2006-08-16 08:55

Hi Henk,

There's a few threads on doing this as a "Related Products" feature...

http://www.pricetapestry.com/node/199

Cheers,
David.

Submitted by Henk3001 on Wed, 2006-08-16 11:04

Yep I tried this, first i got some errors, but when you take a close look at example from gynapod link there is no relevance to the product.

but when you get the pages what i first explaned under each other i think this is a better sollution.

Thx HEnk

Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/linkik.com/httpdocs/html/product.php on line 26

Submitted by support on Wed, 2006-08-16 11:47

I think the Gynapod guy is doing something slightly different as they are not the search results for the product on the page (which is what you want to do) - but the technique is the same...

Are you still getting the error? Check the order of the code in your products.php file, it needs to go:

<?php
  
if (isset($product)) require("html/product.php");
  if (isset(
$prices)) require("html/prices.php");
  
// ... new search code ...
  
require("html/searchresults.php");
?>

Submitted by Henk3001 on Wed, 2006-08-16 12:47

ok i got it working but now i want a better search result. see this link link and then press search, its now the same as Gynapod

HEnk

Submitted by support on Wed, 2006-08-16 13:36

Ok, I think this is happening because the first line of the mod:

$productName = $product["products"][0]["name"];

...is not valid because $product is overwritten by the prices HTML module.

So, in your mod to products.php, change this to simply:

$productName = $q;

That should produce better results...

Cheers,
David.

Submitted by Henk3001 on Wed, 2006-08-16 13:52

Worked :)

but why is a search different then this mod.

HEnk
THX.
Linkik.com

Submitted by support on Wed, 2006-08-16 14:44

It's because the Prices HTML module overwrites the $product variable, so the value used in the mod no longer contains the product name that is being displayed on the page.

$q is not touched on the whole page, so it still contains the product name.

Cheers,
David.