SalesCart Advanced Programming
This FAQ contains answers to questions that pertain to
customization of your SalesCart web. If you are looking for answers to questions regarding
setup problems, error messages, and common setup issues and mistakes, see our 'Setup' FAQ page. If you are looking for answers to questions
regarding SalesCart add-on components, see our 'Add-ons' FAQ
page.
This FAQ is being updated on a regular basis, come back
and check for new issues, and tips.
Note: sometimes error message
wording may not be 'exactly' the same as that listed below.
Microsoft Access '97 wants to convert my
database, is this OK?
'ODBC; Zero length string' error. When
customers delete credit card information when placing an order.
Can I change the look of the add item or other
buttons?
How do I change or add payment options?
I have an SSL socket on my server and I want to
have the order processed in SSL.
Checkout Pages display 4 decimal places on
currency values
I want customers to by pass the shipping page.
How do I import SalesCart into an existing
FrontPage Web?
I want my customers to start ordering
immediately upon entering my web site, (generate an order number at the default web page).
I have only two (or 3-8) shipping options for
my customer. How can I reduce the shipping options?
Dynamic
SalesCart; there is not enough room in
the 'Price' field of the '[SalesCart] Product Link' component to add my variable name.
Dynamic
SalesCart, How do I add my product
database field names to the SalesCart Product Link component?
I want to have my shipping charged by dollar
amount sold, not weight.
I want my customer to stay on the product page
when entering the 'Add Item' button, instead of automatically going to the view order page.
I have two of the same shipping options, i.e.;
the shipping option lists twice for the same option.
Yes! You can use either Access '97 or Access '95 databases. The
default database is setup as an Access '95 so users of the older version will have
compatibility. For Access '97, let Access do the conversion, using a temporary filename.
Then re-name the file to the name of the original database (the default name is
'shop.mdb'), and place the database in your 'orderdb' directory on your web site.
If you want to allow persons to be able to delete the credit
card information do the following.
In Access, open the shop.mdb database.
Open the database for editing.
Open table view and select the 'payment' table.
Select design view, from the view menu.
Select the 'CardType' field and change the 'Allow Zero
Length' to Yes.
Do the same thing for the 'CardName',
'CardNumber', and
"CardExpire' fields.
Save and close the database.You will now be able to delete
the card information fields.
Yes. Modify the QTYbutton.gif or the
ADDbutton.gif in the mall folder to reflect the look you want.
Payment options are easily changed WITHOUT going into the
database. The steps to add or change payment options are as follows:
1. Open the 'payment.htx' file in the 'cgi-bin' directory.
2. To modify a payment option; right click on the radio button for the option and select
'form field properties'. Change the Value to 'Diners Club' or whatever. Now when an order
is placed, and you view the order, the payment method will indicate 'Diners Club' or
whatever.
3. To add a new payment simply copy an existing radio button and follow the instructions
in line 2 to modify its value to reflect the new payment option. You can edit the
.htx
form as required to add or delete options, add graphics, change the table widths, columns
etc. as necessary.
This is easily done. First you need to have a SSL certificate
for your domain, so that https://yourdomainname.??? is a secure site. Next you need to
determine at what point you want to start your secure transaction. The default setup is to
start secure transaction when the customer starts to input his personal data. Do the
following:
Open Front Page Explorer and open your WEB. Open the view.htx
file in the cgi-bin directory. Right click on the 'Order Now' button and select form
properties. Select 'option', in the action line input 'https://www.yourdomainname.???/cgi-bin/todetails.idc' and save it.
When the 'Order Now' button is pressed, all further
transactions are done in a secure socket.
Cause: This problem is the
result of the fact that currency values are stored in Access with 4 significant decimal
places for complex monetary storage where this significance is required.
WARNING:
THIS HOT FIX IS ONLY FOR 1.000 NOT 1.007.
If your serial starts with R117, DO NOT INSTALL THIS HOT FIX.
R117 already incorporates the hot fix.
Download HotFix1.4 and follow the installation instructions.
This instruction will let those persons who have shipping built into the cost of a
product, pass by the shipping page.
Please follow these instructions in a step by step manner.
- Open your WEB in FrontPage Explorer.
- Open the CGI-BIN directory
- RIGHT CLICK the 'getship.htx' file and select 'open with' (notepad) text editor.
- Change the line that reads: URL=toshipping.idc?country=<%idc.shipcountry%>&a..etc
specifically the toshipping.idc to togetpayment.idc so that the line
reads URL=togetpayment.idc?country=<%idc.shipcountry%>&a..etc
If you want to remove mention of shipping completely from the payment page, do
these additional steps:
- Open 'confirm.htx' in FrontPage editor, position your mouse on the field labeled
<%shipcost%>, right click your mouse and select Form Properties. Next click on
the Advanced Properties button. Select the field labeled theshipcost and click the
Edit button. Change the value from <%shipcost%> to 0. Select the OK
buttons until you return back to the form.
- At this point, if you wish you can select the entire shipping column summary field and
select edit, cut from the main menu to remove any mention of shipping.
- Open 'receipt.htx' in Front Page editor, and follow steps 5 and 6 above.
Your customers will now pass the shipping selection page.
SalesCart can be imported into an existing FrontPage Web by using the 'Add to current
web' button in the FrontPage Explorer. Important: before
doing this, back up your original web site!
- Open FrontPage Explorer and open the web site you want to add a SalesCart Web to.
- Select 'New / FrontPage Web' from the 'File' menu.
- Select 'From a Wizard or Template' and select '[SalesCart] Shopping Cart' from the
template list.
- Select the 'Add to current web' check box. Then select 'OK'
The template wizard will create a SalesCart Web in the current Web structure.
There are some cases when you want to have a customer assigned an order I.D. number
imediately upon entering your Web site. However this is definately the exception to the
normal handling of a SalesCart order I.D. and it is not recomended. If
you have "window shoppers" who are just looking at your site for prices, etc.,
an order I.D.number would be generated each time a user hits your site. This will add many
blank orders to you order database that do not have any information except the I.D.
number. Furthermore, the I.D. number cannot be used again unless you create a new orders
database from scratch.
If the above does not apply to you and you want to have the order I.D.
generated at your default web page you need to create a redirect through the order I.D.
gateway which is the 'getorder.asp' active server page. Do the following:
- Open the Web site in FrontPage Explorer, select files view, and select the default web
page, (default.htm, welcome.htm, or index.html dependent on your web providers server
settings).
- Make a backup copy, of the default web
page (rename the file default_backup or ????)
- Open FrontPage Editor, and select 'File / New / Normal Page'. If you have shared
borders, or other default elements, remove them from this page. Themes are OK, but
otherwise the page should be blank.
- Select HTML view and insert the following between the <Head> and <Title>
tags :
<meta HTTP-EQUIV="Refresh" CONTENT="0; URL=http://your-domain-name/mall/getorder.asp">
- Remeber to input your domain name where indicated.
- Save the file as the default web page, (default.htm,
welcome.htm, or index.html
dependent on your web providers server settings).
When a users go to the site, they will be redirected through the getorder.asp to the
lobby.asp page which you can change to look like your normal entrance page. Remember when
changing the lobby page not to edit or delete the scripting as indicated on the lobby page
comment.
This procedure will show you how to reduce the number of shipping options from the
default set by SalesCart. This procedure is also an example
of how to manipulate the shipping options in the orders database. This
procedure will be written to reduce the shipping options to two selections. This is useful
if you have light, small products that are easily shipped. Or if you have a standard size
package, and you want the customer to choose between a standard shipping charge or a
premium shipping charge. Make a back-up copy of the order
database before following this procedure!
As you follow the procedure, you will want to taylor the changes to your own
requirements. This example will assume the following scenario:
A) The customer can choose two options, standard and premium shipping.
B) The product weight is 1 lb. and the shipping charges will be the same (2choices) for up
to 10 lbs. of shipping weight.
C) The shipping charge does not change based on the destination and all shipping
destinations are in the US.
- Open the database 'Shop.mdb' the main switchboard will automatically open. Minimize but
do not close the switchboard.
- Maximize the database view and select the 'Tables' tab. Open the C-shipping table. The
table should open in Datasheet view, if not select datasheet view.
- The C-shipping table defines the relationships between shipping types, delivery
destinations, and weight ranges. By default, there are 48 entries that are posted to
help first time users get started. Select all 48 records and delete them. Close the table.
- Open the Look-shipping table is datasheet view. This table defines the types and
descriptions of various shipping types. There are 9 types by default. For our example
select and delete records three through nine. Close the table.
- Open the Look-weight table in datasheet view. The Look-weight table defines the weight
ranges that can be shipped. If you have a product that is 1 lb. and the customer orders 2
items, then the total weight is 2 lbs. and the weight range falls into the 1-2 weight
range. For our example lets delete records 2 through 10. Then under the HighW column or
record one, replace 1 with 10 to give us a weight range of 0 to 10 lbs. Close the table.
- Save your changes and minimize the database view. Re-enlarge the switchboard and select
the 'Define Shipping charges' button.
- If you select 'Define shipping types', a form comes up that allows editing of the
Look-shipping table, there are already two type defined in Look-shipping, so there is no
need to edit this for this example.
- If you select 'Define shipping weights', a form is presented that allow you to edit or
add weight ranges in the Look-weight table. The current 0-10 lb. weight range is
satisfactory for this example, so there is no need to edit this now.
- Select the 'Define Shipping Charges' button. Defining the shipping charges
correctly is critical. The form that appears sets the relationships between
shipping types, weight ranges, and destinations. I order for a shipping charge
relationship to function, all fields must be filled in for each relationship record.
- The shipping ID is automatically filled out for you, do not enter information here.
- In the destination field input "US" this is the default for shipping to all US
destinations. Note: this is where you would define shipping by state or country simply by
selecting a state or country from the drop down menu. See the Country table to define
these destination fields.
- In the weight code field, use the drop down arrow to select the 0 to 10 lb. weight
range.
- In the shipping code field, use the drop down button to select the first of the two
shipping types. You have now set up your first relationship and shipping option.
- Select the '>*' button to create a new record. In the destination field input
"US". In the weight code field, use the drop down arrow to select the 0 to 10
lb. weight range.In the shipping code field, use the drop down button to select the second
of the two shipping types. You have now set up your second relationship and shipping
option.
- Save and close the database. You can now publish the database and generate an order. If
your total shipping weight is between 0-10 lbs., and your destination is 'US', you will be
given the two shipping options to pick from.
From the procedure above you should now be able to edit
your orders database to get the shipping options and relationships you desire for your
SalesCart.
The 'Price' field of the product link component is intentionally left short. This will
create problems with dynamic SalesCart sites that need to include '<%unit price%>',
in the price field so that the field is automatically filled. The work around is as
described below;
This procedure assumes you have already created a dynamic SalesCart product
page as described in the SalesCart help file. Open the applicable web site in FrontPage, then open the applicable
'productpage.asp',
in FrontPage editor.
Single click on the 'SalesCart product link' (add item graphic), component to select it.Hit the left arrow button once to move the cursor to the previous form cell, then hit
the right arrow button once. This will move the cursor to the location just before the
'SalesCart product link'.
Select HTML view.When you go into HTML view the entire web bot will be selected. Hit the left arrow key
one time to move the cursor insert point to just previous of the web bot script, then hit
the enter button one time to insert a new line. Move the cursor to the empty line.
Insert the following; <%P=Cstr(fp_rs("unit price"))%> This
assigns the ASP variable named 'P' to the 'Unit Price' field of the database.Select normal view.
Open the 'SalesCart product link' by double clicking the 'Add item' graphic. In the
price field input the following; <%= P%> , select 'OK'.Save your page and exit editor.
Adding the following to each of the fields in the SalesCart Product Link Component: <%=Cstr(fp_rs("field-name"))%>
you will need to follow the question #11 above for the price
field. As an example, if the description field of your product database is named
'descrip'
then you would enter the following into the 'description' field of the SalesCart Product
Link Component; <%=Cstr(fp_rs("descrip"))%>.
Normally the 'weight' field is used to specify the weight of the product, and the total
weight of all products ordered are added up and sent to the weight range table of the
order database to determine a shipping charge. However, SalesCart can be configured
to compare the subtotal or the subvolume. To change to subtotal, edit the
file getship.htx located in your /cgi-bin folder and change the file
as follows:
Before:
<head>
<meta HTTP-EQUIV="Refresh"
CONTENT="0;
URL=toshipping.idc?country=<%idc.shipcountry%>&subweight=<%idc.subweight%>
&order=<%idc.order%>">
<title>Calculate Shipping Charges</title>
</head>
After:
<head>
<meta HTTP-EQUIV="Refresh"
CONTENT="0;
URL=toshipping.idc?country=<%idc.shipcountry%>&subweight=<%idc.subtotal%>
&order=<%idc.order%>">
<title>Calculate Shipping Charges</title>
</head>
Now, you can go to the orders database and edit your "weight ranges" to be
"dollar value" or "volume" ranges instead.
or,
as an alternative, this also can be easily been done by using the 'weight' field of the
SalesCart product link component. If you input the dollar value of the product instead of
the weight in the 'weight' field of the SalesCart product link component, you can then go
to the orders database and edit your "weight ranges" to be "dollar
value" ranges instead.
By default the customer is sent directly to the Order Contents page once an item is
added to the shopping cart. If a customer would never order a single item, you may
want them to return directly back to the current product page. You can do this by
editing the file shop.idc int the CGI-BIN folder and changing the name change.htx to
shop.htx. To edit the file, right click on the file, then select 'Edit with notepad',
change "change.htx" to "shop.htx" then save the file.
This problem is due to your not having the database configured properly for shipping.
This particular problem is that have the relationship for the shipping option set twice.
Open the database, go to tables view, and look at the C-Shipping table, the C-Shipping
table sets the relationships between weight, type, and destination. You will see the
LSHIPPING field which lists the shipping options. There will be two records with the same
information. See the advanced FAQ question 10 for more on setting up
shipping.
|