How to get the customer’s LightSpeed Webstore minicart to show in WordPress Theme

For ages I’ve known how to get WordPress stuff to show up in my Webstores. But getting Webstore stuff to show up in my WordPress themes seemed to be beyond me.
I’d tried and tried and given up many times. So today when working on a client project I don’t know what made me try again. I just felt like I knew more now than I did and this time I might be able to do it. And I did it. Amazing.

Enough with the chitter chatter here is how I did it.

Went to (where webstore is installed), opened index.php and found this: require_once(‘includes/’);.

Then I made a copy of my_webstore_location/templates/my_template/minicart.tpl.php.

And in my WordPress theme I created a new file called “webstore-minicart.php”.

In webstore-minicart.php I pasted the contents of minicart.tpl.php.

And webstore-minicart.php, after the first < ?php, I pasted require_once('/path/to/webstore_location/includes/'); The path to file is very important. It has to be 100% correct or you'll get a nasty error or just a white page. You don't want that. If you don't know the server path to your webstore location ( where your webstore files are) here's the easiest way to find it out: create a file named info.php in the same directory where your shop is installed. If it's in /shop place info.php in /shop. In info.php paste: [php] <?php phpinfo();?>[/php] Then load the file in your browser by going to Find PHP Variables and locate _SERVER["SCRIPT_FILENAME"] everything before the actual name of the file is the server path to the file. On one server the path to the file could be /home/user/username/htdocs - just for example. On another server it could be /blah/blahbla/public_html. In any case if you load info.php you ought to be able to find it out. Note: PHP errors will include the path so if you get the path wrong pay attention to any errors that occur. Whew. So now that we know where the file is and how to tell PHP where to find it we can display the minicart in our WordPress theme! [php] <?php get_template_part('webstore-minicart');?> [/php] Unfortunately, I have had to be secretive when it comes to customizing LightSpeed Webstore because there are very large multiple person team companies that do the same work as I do and charge a lot more than I do and get more customers than I do but never ever share their code! So I'm not going to post webstore-minicart.php for you on this site but if you contact me and ask me for it I will send it to you.

Embed Audio files for music product in LightSpeed web store

Out of the box, LightSpeed web store is not as robust as some other eCommerce solutions. But that doesn’t mean there aren’t ways to make it more robust. One such example: creating a solution to hear music samples in a Single Product detail page on the web store. We didn’t want to just click over to an external site (like the vendor’s wholesale page which had provided the samples). In my solution the customer does not leave the page to hear them.

I created a custom post type in WordPress for each CD/album title being sold on the web store. Each post has its own music player loaded with a playlist (of song previews). The .mp3 samples were uploaded with the Media Uploader and a music player WordPress plugin called Haiku was activated to play the samples. Then the links to the single custom posts were embedded in the appropriate LightSpeed Product Cards and then web store was updated.

When the link in the product description is clicked, the custom post loads and plays the samples in a lightbox window (using Fancybox which ships with web store), so the customer never has to leave the product details page to listen before they buy. All you have to do is embed the link to the custom post type in the product description and voilà.

Is Your WordPress Theme Threaded-Comments-Enabled?


Threaded comments make it possible for your readers to start (or end) conversations with each other. Either way, it’s a cool feature to have.

Check your theme’s header.php file for a line of code that looks like this (should be before the body tag):

<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>

If it isn’t there paste it in and save the file changes.

Then go to Settings>> Discussion and select the option to turn on threaded (nested) comments.

More options for threaded comments:

  • Break comments into pages with [15] comments per page and the [first] [last] page displayed by default.
  • Comments should be displayed with the [older] [newer] comments at the top of each page.

Please ONLY attempt the next steps if you are comfortable using FTP or your Control Panel File-Manager and editing theme files. And always back up.

  • Grab the latest comments.php file from WP 2.8+ /wp-content/themes/default.
  • Copy and Paste your theme’s comments CSS into a text file.
  • Open the Default theme style.css, Copy everything related to comments and Paste into your theme’s style.css.
  • Use your theme’s comments CSS as a reference for colors and borders,etc so the comments style will match your theme.

WordPress As A CMS: Getting Started

In This Post: The Dashboard De-mystified. Posts or Pages? Categories &Category Relationships. Changing the Look of the Default Sidebar. The Plugins I Like.

Maybe you’ve already chosen WordPress or are seriously considering it. Maybe you’ve even already done the famous 5 minute WordPress installation. Maybe you’ve already chosen one of the free themes or enlisted some paid help getting one made just for you? Whatever the case, you should be very pleased with yourself to have gotten this far and I’ll bet you’re super jazzed to have your own website that uses your own domain name.

Trouble is, now what? How to make sense of the Dashboard? What does what? What do all these crazy terms mean? You’re scared to touch anything! Some settings are self explanatory but the only way to get comfortable is to jump in and start looking and reading. It’s like a new house with lots of rooms and who can stand not knowing what all the rooms look like? If you don’t think its a good idea to change a setting, don’t. But don’t be afraid to at least log in and look at the pages – because just looking does no harm.

Dashboard Settings

General – where your site title and description goes.
Writing -where you pick the default post category.
Reading – controls what the first page of your site shows which, by default, are your posts. You can make a page called Home and pick that to be the first page. Go to Pages >> Add New and create it there. But then you should also choose another page to show the blog posts. So make another page and choose that to be your posts page. You can be very creative with the title: Jeffery Zeldman titles his “The Daily Report” and I think that is pretty cool.Because there is so much one can do with Templates this section really deserves a complete post. But to keep things going I’ve kept it short.
Discussion controls your comments.
Media – choose image sizes
Privacy – choose whether or not search engines can index your site.
Permalinks – choose the way your linkage is set up.
Miscellaneous – pick where your images get uploaded- default is uploads. Also by default they are separated into year and month folders.

And just because I care here are some screenshots to illustrate each page.

Default Blues
All first time WordPress installations have one category, one page, one post and one comment. I can’t tell you how many About Me pages I’ve seen explaining what a Page in WordPress is and how many posts I’ve seen in Uncategorized, too for that matter. You’re expected to rename, edit or delete that stuff. You can’t delete the Uncategorized category (because WordPress needs at least one category) but you can rename Uncategorized to something more personalized like Random or General…The main point is the more you change stuff the more you make it your own. Don’t leave something as is if it is going to be visible on your site. Tip: In your User Profile page, you can type in the name you want to appear in the greeting in the dashboard or next to your posts and then click save. Then you can choose this name from the drop down list box and this will be the author name (and might appear next to your posts if your template allows this). Isn’t Posted by (your name) better than “Posted by admin”?

Default sidebars tend to show everything from a pages menu to a calendar, this is because there aren’t any widgets being used yet. Once you add widgets – only the content displayed by those widgets will show in your sidebars.

The Empty Website Blues 🙁
At this stage you don’t need to worry too much about how your sidebar will look and which widgets to use. You have bigger fish to fry! The biggest problem for nascent websites is the lack of content. The most important thing to focus on right now at this stage of your site is adding some.

Should You Use Pages or Posts?
WordPress as a CMS is more powerful when it is used as it was meant to be used which is the displaying of posts assigned to categories. Pages should be used for About Me, Contact and Photo Galleries or whatever- as long as that content is going to remain the same for an extended amount of time. If you really really don’t need Posts and even though that will leave your site pretty limited go ahead and use only Pages. Its your website! WordPress can make a new Page as easily as it can add a new Post,that’s why it is such a great CMS.

What Do Categories Do?
Categories organize your posts. Categories make it possible to keep post content separate from other post content.
Example: If you write about Celebrities you could make a child category of Celebrities called Angelina Jolie. Whenever you add a new post about ms.thing you would choose the Angelina Jolie category. Then you could have a list in your sidebar of your posts about Celebrities with a nested list of posts about Angelina Jolie. You could make as many of these “Celebrities” child categories as there are celebrities!
If your posts will only pictures of Celebrities then make a child category of Celebrities called photos with a grandchild category called Angelina Jolie. In my mind that is a very practical use of the grandchild category. More about that later on in this post.

Categories Run Everything!
Many people misunderstand categories. They either don’t use them at all or they make up a new category each time they write a new post.

The folks that add a new category for each new post could eventually have a totally bloated amount of categories, each with just one post assigned to it. This defeats the purpose and makes it just as hard to find interesting content as if there were no categories at all. Try instead to use a few Parent categories and then use as many Tags as you want.

On the other end of the spectrum are the people who don’t use or create any new categories,ever so all their posts go into Uncategorized.

Before you get started think about whether the desire for a certain kind of category widget is behind your motivation for creating categories. Ideally, the organization of content should not be determined by a stylistic preference but rather because it is a vital step towards helping people find what they are looking for.

The Parent, Child and Grandchild Category Relationship
If you want to set up parent, child and grandchild relationships for your categories, first you need to know what the main focus of your site is going to be. If the focus is going to be on Kitchen Supplies, here is one way to begin cataloging that vast area. Although I do think this kind of micro managing of categories better suits product pages, not post pages.

Parent Category: Cutlery

Child : Fork
Grandchild : Salad Forks
Child : Seafood Forks
Grandchild : Shrimp Forks
Grandchild : Crab Forks

Child : Spoon
Grandchild: Dessert Spoons
Grandchild : Soup Spoons

Child : Knife
Grandchild : Steak Knives
Grandchild : Butter Knives

I could be wrong but I have managed quite a few WordPress as a CMS type websites for over 3 years and not one of my clients (so far) ever really needed a grandchild category relationship.

There are plugins for practically everything. When choosing plugins, keep in mind you are inviting code into your WordPress site that might conflict with other plugins, might not use code that produces 100% valid XHTML, might make you fall in love with it only to be dropped by the plugin creator next month. And might just not work! But here are some I swear by.
All In One SEO (by default WP is pretty SEO challenged)
XML-Sitemaps (then you can submit a sitemap to Google Webmaster Tools)
Flexi Pages (build your own sidebar page menu that shows only pages you want)
WP Database Backup (if disaster strikes- this is plugin is going to save your hide)
Tiny Contact Form (little contact form)
Cforms (build any kind of form you can think of)
WP-Ecommerce (online shop plugin, robust and highly supported with frequent upgrades and an active user forum, vital!)
NextGen (excellent photo gallery and album manager)

If it is a business site keep the personal topic posts to a minimum, less than 5%. Set up a category called Personal so it will be obvious what that section is about.
Be careful with what you reveal, even sites meant to be 100% personal don’t need to get too personal.