Modifying Powerstore 2
Hi everyone,
I have Powerstore2 which, out of the box, only comes with a side menu displaying the Categories and then the products below the categories.
I wanted to revise the store to include Subcategories so that the menu on the left will display firstly the main category as it is now, then below this would be the subcategory, then indented again below the subcategory would be the product.
I've modified the database on the backend so that I now have a subcategories table as follows:
SubcatID int(10) UNSIGNED auto_increment
Subcat varchar(20)
SubcatCategoryID int(11)
I've also revised the products table by adding the following column:
`ProductSubcatID` int(11) NOT NULL,
This is now the full products table:
CREATE TABLE `products` (
`ProductID` int(12) NOT NULL auto_increment,
`ProductSKU` varchar(50) NOT NULL,
`ProductName` varchar(100) NOT NULL,
`ProductPrice` float NOT NULL,
`ProductWeight` float NOT NULL,
`ProductCartDesc` varchar(250) NOT NULL,
`ProductShortDesc` varchar(1000) NOT NULL,
`ProductLongDesc` text NOT NULL,
`ProductThumb` varchar(100) NOT NULL,
`ProductImage` varchar(100) NOT NULL,
`ProductCategoryID` int(11) NOT NULL,
`ProductSubcatID` int(11) NOT NULL,
`ProductUpdateDate` timestamp NOT NULL default CURRENT_TIMESTAMP,
`ProductStock` float default NULL,
`ProductLive` tinyint(1) default '0',
`ProductUnlimited` tinyint(1) default '1',
PRIMARY KEY (`ProductID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
At this stage I've built a set of pages to manage these tables using DataAssist.
I now need help modifying the code on the front end in order to get it working. Apparently I need to modify the code on the intermediate.php page and I was told that currently the code works as follows:
1) It starts by creating the ProductCategories recordset, then loops through that recordset.
2) Within the loop, it sets the $catParam variable to be equal to the currant record cat id, $row_ProductCategories['CategoryID'];, and creates the ProductMenu recordset to show the products whithin that catagory.
To get it to work I was told that I would need to add the subcategory recordset with the Category loop, to show the sub categories in the main category, and add the logic to filter the correct products to display.
My knowledge of php is still fairly basic so I wondered if I could get some help to modify the code as explained above.
If anyone is interested in helping me with this, can you advise how much this would cost?
Would really appreciate any help etc.