Help with Links

5 posts by 2 authors in: Forums > CMS Builder
Last Post: June 27, 2011   (RSS)

Re: [dccreatives] Help with Links

By Jason - June 22, 2011

Hi,

Would you be able to attach search_products.php so I can take a look?

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Help with Links

By dccreatives - June 23, 2011 - edited: June 23, 2011

I uploaded the search_products.php and the results page.

Let me know if you come up with anything.

Thank You,

Re: [dccreatives] Help with Links

By Jason - June 23, 2011

Hi,

The issue seems to be here on search_results.php:

list($itemsRecords, $itemsMetaData) = getRecords(array(
'tableName' => 'items',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));

$itemsRecord = @$itemsRecords[0]; // get first record

...

// show error message if no matching record is found
if (!$itemsRecord) {
header("HTTP/1.0 404 Not Found");
print "Record not found!";
exit;
}


This is selecting 1 item from the items table based on a number in the URL. The results of this query don't seem to be used anywhere on the page, but if no item is returned, the page stops processing and outputs "Record Not Found"

Try removing this code since it isn't being used. That should take care of the issue for you.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Help with Links

Thanks, it works perfectly now