How to TIP: Customizing Xsilva Lightspeed Web Store

If you’re given the assignment to customize Web Store you might start out with the feeling that you are limited in what you can do as far as Web Store’s templating system goes.
We all know by now that each tpl.php in each template package – Deluxe or Framework – is included by one main file: index.tpl.php. That means that this file runs the whole show for every section of the online store. This means that if you add a block to index.tpl.php and you don’t know how to use PHP to hide it and you don’t want it to show on every section, it will.

Luckily, we can use the unique form ID that Web Store creates for Categories, Products, Cart and Checkout and more.
Because the form element that generates a unique ID is listed in the document right after the body element we can use it like we would use a unique id or class in the body element.

  • List of XLSWS Form IDs:

  • #xlsws_product = a single product details page
  • #xlsws_category = a single category page
  • #xlsws_cart = the edit cart page
  • #xlsws_checkout = the checkout page
  • #xlsws_gregistry = a single wishlist page
  • #xlsws_myaccount = an account page
  • #xlsws_custom_page = a single custom page
  • #xlsws_sitemap = the site map page
  • #xlsws_contact_us = the contact us page

Practical application:

Say you’ve got a block of content and you added it to index.tpl.php but for whatever reason you don’t want this content to show on a single product details page.

You could add this to webstore.css

[css]
#xlsws_product #block-you-dont-want-toshow {display:none;}
[/css]

Try it out for yourself & good luck with all your projects!

since re designing my site …

Google Analytics reports that my visitor rates have dropped 99.99% since April 21st when I first began working on the new design.

  • Possible reasons:

  • My landing page used to be my blog page, where all the good stuff is. Or at least where all the stuff people came to my site for is.
  • My blog landing page is now called work – which I might change – I’m still working on how to arrange stuff and what to call stuff after moving it.
  • My old site was completely different-looking so maybe they think they’ve come to the wrong site.
  • This might not have been enough of a warning that changes were coming?

In any event I apologize to the folks who didn’t find what they were looking for and left in 00:01:22. Soon things you need will be easier to find.
It might not be awesome to re design a live site but that is a privilege I reserve, just the same.

Greene-Ville Gardens’ Prices Climbing Steeply

Greene-Ville Gardens
373 Myrtle Avenue
11205

As anyone who lives in Fort Greene can tell you, it is not easy to shop for food around here. Considering how residential this neighborhood its kind of shocking that there are only 2 real supermarkets within walking distance.

When I don’t feel like dealing with the crowds at Associated, I go to Fresh Fanatic even though they’re not stocked as well as the chain supermarket and they are definitely not cheap. When I am on Myrtle Ave and need to buy fresh vegetables for less than 40 dollars a pound but want slightly fancier fare than Bravo offers (if it is not on the WIC program you will have a hard time finding it) I go to Mr.Coco’s.

But Bozzio, our beautiful 70 lb Pitbull has not been very tolerant of stranger affection lately and it started to be risky to leave him tied up outside Mr. Coco’s. A certain Mr. Coco’s employee with a mischievous nature likes to come out and visit with Bozzio while I’m inside. So even though Mr.Coco’s has the lowest prices for produce, I decided to patronize the newly opened Greene-Ville Gardens for a while – because sometimes you just want to be able to leave your dog unattended while you buy some food without having to worry that someone’s going to get growled at or worse.

I’m not always shopping for just vegetables so I appreciated being able to purchase a few staples in one store without getting cleaned out at the register. One thing that pleased me the most about Greene-Ville Gardens was finding Eli’s Bread for less than 4 dollars a loaf even if my cynical tendencies told me that this would not last. And it hasn’t.

Greene-Ville Gardens has raised its prices. A day ago in Greene-Ville Gardens, I was kind of shocked to see that loaves of Eli’s Bread are now 4.79 when they used to be 3.79. Looking around the rest of the items in the store, I noticed everything seemed to have gone up 1 or 2 dollars. They’ve also decided to go exclusively organic in the produce aisle which of course means 1 head of humble Iceburg lettuce costs almost 4 dollars. Applegate Farms items such as 7 oz packs of cold cuts are 5.79, no matter what kind of meat. Even Fresh Direct (bargain hunters beware) charges less. Greene-Ville Gardens charges almost 15 dollars for a 10 oz can of Lavazza Premium Drip Coffee, other shops show a little more restraint, charging only 5 to 6 dollars for the same.

Shopping for healthy food on a budget is a challenge and with prices of food at a 3 decade high, looks like it will continue to be. If you can buy nutritionally devoid Wonder Bread, Kraft Macaroni & Cheese and cans of Chef Boyardee for the price of one head of broccoli, which do you think people earning minimum wage will be buying?

Using WP 3.1, jQuery, Cforms & WP-E-Commerce? Frustrated by Javascript Errors?

The main error I’ve seen when using these 2 plugins and using WordPress’ jQuery is “jquery form.product_form .livequery is not a function” which makes it look like the wp-e-commerce plugin is at fault but it actually isn’t. I know it isn’t because I de activated all my plugins and re activated them one by one until the error came back. With my specific set up the error only came back when I had cforms and wp-e-commerce activated at the same time.

You’ve learned how to enqueue jQuery plugins with WordPress’ jQuery without errors.WP-E-Commerce relies on WordPress’ jQuery. CformsII uses jQuery 1.4.2. WordPress uses jQuery 1.4.4. So now you’ve got 2 versions of jQuery being loaded at the same time which we all know means Javascript errors.

The easiest thing to do is FTP into your server, go to wp-content/plugins/cforms/js, open jquery.js and paste in a copy of jQuery 1.4.4. Doing this will not disrupt cformsII on the backend or submitting forms on the frontend.

If you upgrade cforms you’ll have to do this all over again. But since you’re not editing lines of code this is a snap to repeat.

* Note: Just because FireFox Web Developer or Firebug are reporting JS errors doesn’t necessarily mean things are not working as they should be. But you should remember that Internet Explorer is going show a nasty message: “error on page” or “done, but with errors on page” that your clients and their customers will see. But if you fix it before they see it it can be one less thing you’ll have to hear about.

This advice can be used with other combinations of plugins. If any plugin is enqueuing its own copy of jQuery that is not 1.4.4 and you’ve already enqueued WordPress’ jQuery you can just empty the plugin’s jquery.js so that its enqueuing an empty file or paste in 1.4.4. You’ll have to make sure doing this doesn’t stop the plugin from functioning, I’ve only tested this “fix” with cformsII.

In any event as long as everyone is using the same version of jQuery there won’t be any errors.

How are you dealing with Javascript errors?