If it possible to make a list of all products appearing on each page? i.e. so I can generate an index, say on the left of the page.
Announcement
Collapse
No announcement yet.
Making a list of products on each page
Collapse
X
-
Hi,
It's not something that can be done automatically. However you can create your own javascript file that contains all your products and then tweak the javascript provided in our Advanced User Guide to suit. I did this by:
- creating a file called Act_product_tree.js in the site1 folder and added the following:
Code:var product_tree = new CreateArray(3); product_tree[1].sName = "Select Items From A List"; product_tree[1].pChild = new CreateArray(3); product_tree[1].pChild[1].sName = "Black Ink Cartridge" product_tree[1].pChild[2].sName = "Colour Ink Cartridge"; product_tree[1].pChild[3].sName = "Ink Jet Printer"; product_tree[2].sName = "Products With A Range of Options"; product_tree[2].pChild = new CreateArray(1); product_tree[2].pChild[1].sName = "Diary"; product_tree[3].sName = "Basic Products"; product_tree[3].pChild = new CreateArray(1); product_tree[3].pChild[1].sName = "Calculator";
Code:<SCRIPT LANGUAGE="JavaScript" SRC="Act_product_tree.js" TYPE="text/javascript"></SCRIPT> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- function ProductList(ab) { var strProdID = '<table border=0>'; for (var y=1;y<=ab.length;y++) { if (ab[y].sName !=null) { if (ab[y].pChild) { for (var z=1;z<=ab[y].pChild.length;z++) { if (z <= ab[y].pChild.length) { strProdID += '<tr><td><span class="actxxsmall">' + ab[y].pChild[z].sName + '</span></td></tr>'; } } } } } strProdID += '</table>' return strProdID } //--> </SCRIPT>
Code:<script language=Javascript1.1>document.write(ProductList(product_tree)) </script>
Code:]<SCRIPT LANGUAGE="JavaScript" SRC="Act_product_tree.js" TYPE="text/javascript"></SCRIPT> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- function ProductList(ab) { var strProdID = '<table border=0>'; if (ab[1].sName !=null) { if (ab[1].pChild) { for (var z=1;z<=ab[1].pChild.length;z++) { if (z <= ab[1].pChild.length) { strProdID += '<tr><td><span class="actxxsmall">' + ab[1].pChild[z].sName + '</span></td></tr>'; } } } } strProdID += '</table>' return strProdID } //--> </SCRIPT>
I hope this helps.********************
Tracey
SellerDeck
Comment