Dust every freaking where! There were some new junction boxes and updated wiring but the rest of the room still needed a bit more refacing . The categories.php file proved worthy of a new look, and new look it did indeed receive. I didn’t bruise too much, but the keyboard is a bit tore up now.
In following along with the configuration file layout, I applied the same look to the main categories and product data tables. There were several more actions to hook in than the configuration file, and things got a bit trickier. I couldn’t just place all the cases inside one switch below the data table because the table is actually split into 2 parts, 1 for categories and 1 for products. In theory – yeah right – I thought I could just have the new table rows that now replace the table_block and box coded below the end of the data table – but no go. It would work for the selected action and correct category or product, but would open in a new row underneath EVERYTHING, not the selected row.
To overcome this unwanted behavior I broke the various cases into 3 parts. There are a couple of loops – one around the categories section, and one around the products section. The category actions were moved to the end of the categories data table before the closing loop, and the same went for the products actions. BAM! Everything works as expected. But that is only 2, what about the 3rd I mentioned? The 3rd was a single action for creating a new category. I placed this at the end of everything and made it open up in a modal window. Perfect! A few knobs in the name of icon buttons and the exterior is done.
Moving on to the interior now – the old product administration sure has been the same from day-to-day, week-to-week, year-to-year, decade-to- WHAT! It really has been over a decade. Outstanding longevity!
So inside the product editing area I consolidated all the language fields into a Bootstrap nav-tab. I knew it would work as I’ve done it before with Bootstrap V2 series. For every installed language, the tab displays its corresponding flag icon. Within the tabs content are the name, description, and more fields. This looks nice and tidy giving lots more room for storage.
The image area falls immediately below the tabbed content inside of a Bootstrap well allowing room for any additional images. This part could probably be revisited as I am still making use of jQuery UI elements to control the additional images features. – which brings us to the date picker.
To the right of everything there are 3 sets of BootStrap list-groups. Everything basically falls in order as the old layout did, status radios, date picker, and manufacturer drop down. The date picker is still fueled by jQuery UI – there is a Bootstrap date picker available, and it is in use on the catalog side of the community build – but I don’t know enough about it to know if it is a suitable admin replacement due to the superb localization features that the jQuery UI date picker possesses.
Under that is a list group that has a nice coat of info blue paint. This keeps the tradition alive for quickly spotting your tax and pricing information. Your not gonna make a dime if you don’t use this area. Even if you leave everything else blank, at least you can coax someone into buying the blank space if the price is right.
The final element of the page, besides a couple of buttons, is another list group for holding the products weight, quantity and model number. I really wanted to move this into the first list group as they do go together, but doing so would have pushed the pricing info to far down the page. Perhaps the pricing info can go up top and then I can combine them – it’s up to the community feedback.
Our final area is the product preview. This was pretty straight forward – I again made use of the Bootstrap nav-tabs. For each language all info is loaded in its corresponding tab content. For me there’s not a lot of use for the product preview, but it is handy for information at a glance, especially if clicking on a product in the sales report.
The newly finished file can be found in the change log here: admin/categories.php