Smilehouse Workspace HOWTO Articles

Howto display alternative product picture when the original is broken /
not available

Load a required javascript here.

The script identifies if the picture is not present and displays an alternative picture.

Upload the script into Workspace using file manager:
Visual -> Tools -> Filemanager

Load the script on your page placing the following script between the <head> and </head> tags in your HTML template:

<script src="files/organization/html/checkload.js"></script>

Where the organisation is the organisation name of your Workspace.

Go to the product list page:
Visual -> WWW-outlook -> Page construction -> Product List

And place the following script where you want the picture to be loaded:

<img src="http://www.URLtotheproductpicture.com/$product_itemcode$.gif" lowsrc="http://www.URLtotheproductpicture.com/tuotekuvat/default.jpg" onload="checkLoad(this)" border="0">

Modify the URLs and create default.jpg which is shown if the original picture ($product_itemcode$.gif) cannot be viewed (missing or broken).

Notice that here we assume that all product pictures are in the format $product_itemcode$.gif but if they are not, you have to modify the script to match your needs.


<< Back to HOWTO index




Article information

Software: Smilehouse Workspace
Author: Juha Valvanne
About author: Juha Valvanne is working at Smilehouse as a User Interfaces Designer and Project Manager.
Contact author: juha.valvanne@smilehouse.com

HOWTO
Learn how to use Workspace more efficient! Find latest tips and tricks from here


 
© Smilehouse