The mini cart is created from two "include" files:
You can copy either of these include files and make changes to suit your needs, and then include your changed versions in your page template for ShopSite Pro stores. You should be comfortable with JavaScript before editing the MiniCart.js file, and you should be comfortable with CSS before editing the style sheet. If you do not have experience in these areas, you should choose one of the other methods for adding the mini cart to your store.
Note: |
Because we cannot predict the nature of any changes that you might make to these files, these instructions only provide steps for copying and using the files, with a few suggestions for changes. You are responsible for the content of the changes and any troubleshooting.
|
You are, of course, free to make any changes that you desire and your technical skills allow. However, here are some changes that you might want to consider:
The mini cart display uses the values of four variables to set colors. You can either set these variables near the top of your page template, or you can hard-code values in the JavaScript and CSS code where you see these variables. Here is the list of variables with suggested settings:
[-- VAR.MiniCartColor "black" --] [-- VAR.MiniCartTextColor Page.LinkColor --] [-- VAR.MiniCartHoverColor Page.ActiveLinkColor --] [-- VAR.Media media/themesmedia --]
You can copy the include files used by the mini cart (and any ShopSite template files) in a few easy steps:
You can edit the include files in the ShopSite back office, or you can copy the contents of a file and paste it into an editor on your computer and then upload the changed file.
JavaScript functions are best defined in the <head> section of an HTML page. Once you have finished any changes to the mini cart JavaScript, place this code in the <head> part of your page template (assuming you used minicart as the name of your include file):
[-- IF MiniCart --] [-- INCLUDE minicart PROCESS --] [-- END_IF --]
The IF tag is optional and tests for whether the merchant has enabled the mini cart. If not, the JavaScript is not added to the page, which helps keep pages from being needlessly large.
Once you have made changes to the CSS file for the mini cart, you should include it in the <head> section of your template, like this:
[-- IF MiniCart --] [-- INCLUDE minicart.css PROCESS --] [-- END_IF --]
All that's left to do is adding the tag that calls your JavaScript and displays the mini cart. Scroll down in your template and find the location where you want the mini cart displayed. You may want to add a table cell or some other HTML structure to define the location. Once you find the spot, add lines like this:
[-- IF MiniCart --] <script LANGUAGE="javascript"> DisplayMiniCart("ss_cart_[-- STORE_Serial_Number --]","Subtotal"); </script> [-- END_IF --]
This example assumes that you have not changed the name of the function and that the function still takes two parameters. The first parameter is the cookie name (which includes the store serial number), and the second parameter identifies which mini cart style to display.
Save the changes to your template. If you were editing the template as a file on your computer, upload it to ShopSite. Regenerate your store and then view your store to see how the mini cart looks. Add one or more products to your cart and make sure the mini cart display updates correctly.
ShopSite Help and Resource Center February 13, 2004 Give Feedback |
© 2007, ShopSite, Inc. ShopSite Shopping Cart Software |