Flashy CubeCart errors

October 23rd, 2007
No Gravatar

Since CC4 already uses script.aculo.us for Lightbox2 (for viewing images), it is fairly easy to add effects to other areas of the site.

For example, the notice that says “Product options must be selected before this item can be added to the basket.” can be tarted up very easily.

Edit yourskin/styleTemplates/viewProd.tpl

Locate <p class="txtError">{LANG_OPTS_NOTICE}</p>

and replace with

<p class="txtError" id="optsError">{LANG_OPTS_NOTICE}</p>
<script type="text/javascript" language="javascript" charset="utf-8"> // <![CDATA[ new Effect.Pulsate("optsError",{}); // ]]> </script>

Your error boxes will now have a flashy pulsate effect. You can of course have any effect in the library, see here. Easy as!

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Was this post useful to you? Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the CubeCart, HTML, CSS, AJAX, PHP category.

Leave a Reply