Project Overview
To find an electronic component, customers can choose a category on the Chenmko website, compare specifications across models, and download a datasheet to check the details. The website is available in Traditional Chinese, English, and Japanese. Company staff use an admin dashboard to update the catalog, homepage banners, contact details, and company history.
Different types of components need different specifications. Staff choose which fields each category uses. When they add a product, the admin form shows the fields for that category, and the public catalog uses the same fields to display the specifications.
My Role
I turned the client’s designs into responsive pages with Bootstrap and developed the PHP backend. I designed the product and category data model and worked with the team to store field definitions, category settings, and product specifications separately. I connected the same settings to the admin form and the public product table.

Choose a category and add a product
To list a new transient-voltage-suppression (TVS) diode, an administrator selects “TVS Diodes” in the dashboard and clicks “Add Product.” They can also use the sidebar to switch categories and see the products already listed in each one.

The form shows the fields enabled for that category, including the model number, breakdown voltage, and a datasheet upload. Once the administrator enters the specifications, uploads the datasheet, and saves, customers can compare the new diode in the public TVS Diodes table. When editing the listing later, staff can keep the existing datasheet or replace it.

Use the same category settings for the public table and admin form
Products in a category need the same columns so customers can compare them side by side. If each category had a separately maintained form and public table, every change would require two edits. If the two fell out of sync, staff might enter a value customers never see, or the site might show a column with no corresponding input.
I added switches under “Edit Category Fields” so staff can enable the fields they need. The form and public table use the same category ID to look up the enabled fields and their order. Both use field IDs to match the inputs to the saved specifications. For example, enabling breakdown voltage adds an input to the admin form and a corresponding column to the public table.

Trade-off
One setting keeps the two views in sync and applies to every product in the category. If staff enable a field that older products have no value for, the public table shows a blank cell until someone fills it in.
Store field definitions, category settings, and specification values separately

cols_configs determines which fields each category uses, and products_col_link stores the values entered for each product.Categories can share fields such as model number and datasheet while still requiring different electrical specifications. I separated the core product record from its variable specifications. Staff can change which existing fields a category uses without changing the structure of the product table.
categorystores the category hierarchy, andproductsstores each product ID and its category.cols_htmlstores field IDs, display markup, and the value type used for sorting. More than one category can use the same field definition.cols_configsuses the category ID and field ID to record whether a field is enabled and where it appears.products_col_linkuses the product ID and field ID to store values such as model numbers, voltages, and datasheet file paths.
Assemble the public specification table
The public page reads the category’s enabled fields and builds a query from them. It uses an INNER JOIN to retrieve specification values, GROUP BY to group them by product ID, and MAX(CASE …) to turn the separate values into columns on one product row. The category view supports column sorting and shows up to 50 products per page. A model-number search can span categories, with results shown in each category’s own columns.
Trade-off
Categories can reuse fields, and staff can change which fields appear through configuration. Queries need extra joins and aggregation, and sorting takes more work when values are stored as text. For numeric specifications, the query uses SUBSTRING to extract the number, casts it to a numeric value, and then applies ORDER BY. New specification formats need to be checked against that extraction rule.
Other admin tables
Company information, homepage banners, company history, and login verification each use a separate table. They are company, banner, company_history, and backend_psw_config.
Manage homepage banners
Staff can review the images in the homepage carousel, upload a new banner, or remove one they no longer use.



