Today I’m working on the integration of the catalog application OptionCart in an XHTML/CSS site, for a client who sells BMW racing and performance car parts.
I’ve used OptionCart for quite a long time – we ran an online retail shop for 9 years and used OptionCart for the last 4 or 5. OC’s a front-end for Mal’s Ecommerce, another long-time vendor for us.
OC is nice because it’s easy to use and easy to drop into an existing website. We added sample categories, subcategories and 10 products last week, and that only took a minimal amount of time to set up. Today I’ve started on the actual integration – dropping in the PHP includes and customizing the look of the categories and products to match the rest of the site.
I wanted to have the current category name show up in the header section of the site, but OC didn’t provide a shortcode for that. No worries though, even with my rather limited experience in writing PHP, I figured out how to do it:
I created a div that I could position in the right place on the page, then put in some text that I want to surround the category name, which was a little snippet of PHP to display the variable on screen:
<div id="category-name">AKG Motorsports BMW <?php echo("$maincat") ?> Products</div>
Looks great! And only about 4 minutes to figure it out (don’t laugh, I’m not in any way a programmer).