close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Changing "product list" text to category name

Thread began 3/21/2010 4:52 am by rmcadams351257 | Last modified 3/25/2010 4:42 pm by rmcadams351257 | 2371 views | 6 replies

Eric Mittman

This is not a supported feature of PowerStore 3 but if you alter the products query slightly you can get it to display the category of the first item in the recordset by making these changes.

1) on line 84 of Products_Results.php update the code from this:

php:
$WADbSearch1->whereClause .= "ProductID



to this

php:
$WADbSearch1->whereClause .= "ps3_products.ProductID



2) on line 136 update the query to look like this:

php:
$query_WADAProducts = "SELECT * , coalesce((select ps3_productoptions.GroupingID from ps3_productoptions WHERE ps3_productoptions.ProductID = ps3_products.ProductID limit 1),ps3_products.ProductID) AS GroupingID FROM ps3_products JOIN ps3_productcategories ON ps3_products.ProductID = ps3_productcategories.ProductID JOIN ps3_categories ON ps3_productcategories.CategoryID = ps3_categories.CategoryID WHERE ProductLive = 1 GROUP BY GroupingID ORDER BY ProductName";



3) you can then display the category name with this php code near line 426

php:
<?php echo $row_WADAProducts["CategoryName"]; ?>



Keep in mind though that this will only display the category for the first item in the recordset, and this will only display if there are items returned from the recordset. So if you do a search for a particular category it will work just fine, but if you view the results without any filtering then then you will see the category for the first item in the list.

It might be a better idea to make these changes then display the category name inside of the item display next to it's name.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...