To be able to add buttons on web pages for your shopping cart, follow these instructions:


1)  Download and open the file "s-cart/shop.phtml"

2)  Copy the following into that file at the end:

Save the file shop.phtml and upload it back to the server replacing the old one.





3)  You are now ready to convert your pages to shopping cart pages:

 A)  Copy the pages you want to place buttons on into the "s-cart/" directory.
 B)  Change the file extension on these files to ".php3" 
     (usually they will be ".htm" or ".html")
 C)  At the very top of these files include this text:
 
 	<? include "shop-head.phtml" ?>
 	
 D)  Then directly after the <body> element of the page place this text:
 
 	<? include "shop-variables.phtml" ?>
<? include "shop.phtml" ?> E) Repeat with each page and your pages are shopping cart button ready. Now, you may place three things on these pages thanks to the updated "shop.phtml" file. They are: Functions List: - ShowBasketMesg($image, $align, $text) This will put a "Click here for your basket" message in the page. You may specify a image to use, the alignment of the image, and the text of the image, or leave them blank to use the default settings. Examples: <? ShowBasketMesg('cart.gif','center',"Review Shopping Cart Contents"); ?>
<? ShowBasketMesg(); ?> Default set up (both). <? ShowBasketMesg('http://www.place.com/mycart.gif','right',"What's in the basket"); ?> Uses a special image, different alignment and different text. - ShowItemsList() This is a more simple function to use. Simply put this in you html file: <? ShowItemsList(); ?> and you will get a nicely formatted list of all your products with names, and prices as well as a add to cart button. - AddButton($ProdID, $AltText, $Color, $SizeVal, $includeName) This is the function you all want. General usage will look like this: <? AddButton('productID'); ?> But you may specify the color of the text, and it's size. <? AddButton('productID','','red','2'); ?> Or you can also use a different text than "Price:" <? AddButton('productID','something other than price','red','2'); ?> Finally, you can choose to include the name or not. (leave blank to include name, add any value to not include name) <? AddButton('productID','something other than price','red','2','no'); ?> Ta da! You know have you own pages formatted how YOU want them with the shopping cart contents worked into them. NOTE: Because this kind of programming is tinkering with something very delicate, we do NOT provide technical support. We can reset your original shop.phtml, however, we will not trouble-shoot pages as part of your hosting fee. We do provide programming for a fee if you should require it. Please contact us by emailing: support@freewebhost.com