I am working on cs-cart for online shopping
how can i get category list in product p开发者_如何转开发age
Thanks.
It all depends on your products data.
If you have a data table,
prod_id prod_more categ
-----------------------
1 ... book
(more rows)
To display all products, you run the query
select * from product
then loop through the results.
To display all categories, do a different query
select distinct categ from product
then adapt the loop slightly.
There are lots of code samples that explain how to do this, e.g. on w3schools
Click Design - > Blocks and make sure you have a block on the left sidebar that is Active to show the Categories. And be sure you have categories that are active with active products that can be purchased so the price is set and inventory/ordering options are set correctly.
精彩评论