close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Product Category Display Order

Thread began 10/14/2009 8:43 am by msjj000 | Last modified 10/21/2009 5:27 pm by Jimmy Wu | 1077 views | 5 replies |

msjj000Beta Tester

Product Category Display Order

Hi WA,

I've looked at the intermediate.php and I'm not sure what to add or change in order to get the product categories to display by alphabetical order (Categoryname) and not the category ID number. I have about 40 categories now. I could manually change the category ID number in the database in increments of ten for example to allow to slot in other categories later.

What would you advise as the simplest way to display by alphabetical order?

Thanks, Mark.

Attached Files
intermediate_cat_only.zip
Sign in to reply to this post

Jimmy Wu

To do this, go to your menu.php page in the CSSMenuWriter/cssmw_home/ directory within your powerstore and find the MySql query that looks like this:
"SELECT CategoryName, CategoryID FROM productcategories"

Change it to look like this:
"SELECT CategoryName, CategoryID FROM productcategories ORDER BY CategoryName ASC"

Sign in to reply to this post

msjj000Beta Tester

Thx

Hi Jimmy,

Thanks for that tip. I was able to use it on both the menu.php and intermediatee.php page to organise the categories.

Regards, Mark.

Sign in to reply to this post

Jimmy Wu

Great, glad it worked out for you.

Sign in to reply to this post

segalmedia367166

re-order another way

Hi WA,

My client wants something a little different. She has a catagory "coats" and a catagory "leashes". Both of those catagories have products named "wax cotton". She wants to make sure that "wax cotton" is the first item below both categories respectively. The same would apply for her "rope leashes" and "rope collars". For an example of what exists now, go to:
Products_Results.php?Search=true&CategoryID=1

So, again, the question is, can I control the placement of "wax cotton leashes" "wax cotton collars" and "wax cotton coats" so that they all take 1st place?

Thanks,

Lisa

Sign in to reply to this post

Jimmy Wu

If there are no products that will be alphabetically after the wax cotton items, then you can go into the CSSMenuWriter folder and find the $query_ProductMenu variable and order that by ProductName and have it be descending. It should end up looking like this:
$query_ProductMenu = sprintf("SELECT * FROM products WHERE ProductLive <> 0 AND COALESCE((SELECT GroupingID FROM productoptions WHERE productoptions.ProductID = products.ProductID LIMIT 1), ProductID) = ProductID AND ProductCategoryID = %s ORDER BY ProductName DESC", GetSQLValueString($catParam_ProductMenu, "int"));

Sign in to reply to this post

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...