SurfShopCart Documentation

Setting Up Shop Has Never Been Easier!

User Tools

Site Tools


Action disabled: revisions
parameters

Parameters and Place Holders

Required Parameters

storeid Identifies separate data directories to the program if you are using multiple stores.
Defaults to “1”
c Name of content template returned by program. Usually “start.htm”, “search.htm”, “viewcart.htm”,
“info.htm”, “confirm.htm”, “receipt.htm”, or “sorry.htm”.

Optional Parameters

i_[itemid]=[number] Tells program to add [number] of catalog item [itemid] to customer's cart
t Name of master template returned by program.
Defaults to “main.htm”.
return_page Flag tells program to return/parse original static HTML page
instead of program page.
conversion Multiplier for currency conversion calculations.
(Displayed with conv: modifier)
conv_prec Number of decimal places to display currency conversion calculations.
(Displayed with conv: modifier)
v_[field]=[mode] Tells program to verify value of [field]. [mode] tells type and
arguments of verification used. (q.v., “Verification Methods”).
This is used in the forms during the checkout sequence.
a=[mode] action parameter - tells program to perform one of the following
specific [mode] functions
login Tells the program that this is an authentication request;
requires 'userlogin' and 'userpass' fields.
lookup Tells the program this is a lost password request
requires 'userlogin' field (email address or ‘Ecom_BillTo_Online_Email’).)
viewcart Forces program to return “viewcart.htm” instead of any other output.
Not necessary if ‘c=viewcart.htm’ is used.
deletecart Forces program to delete user’s current cart and return to
the default page, “start.htm”.
newlogin Tells the program this is a new registration.
Add username and password to database and authenticate for this session.
tryagain Tells program to generate a new orderid
(some card processors will not accept duplicate order ids, even from same order).
start Tells program to return “start.htm” instead of any other output.
Not necessary if ‘c=start.htm’ is used.
logout Tells program to clear user’s cookie, reset authentication flag and
return to the default page, “start.htm”.

Used in forms generating search results

categories Unique identifier(s) if categories to match in search results. You can create a drop-down menu
of your current categories using the catalog admin page. Otherwise, the <! categories:links> placeholder
will generate a list of links to each of the categories in your catalog.
searchtext Text to match in a search. Text in quotes (“…”) receives a higher rank than text without quotes.
sortby Fields by which to sort results. Multiple fields can be submitted, comma separated, and will be ranked in order.
show Number of items to show per page. Defaults to 20 if no value is given. (“search.htm” and “start.htm”
default to 9 per page.)
cols Number of columns to display search results. Widowed rows will be centered.
orderlookup Specific orderid to display. Used by authenticated customers searching order history.
THIS FIELD WILL BE IGNORED UNLESS AUTHENTICATED.
b Name of database used in search (not necessary if <! search:[database]:[sortby]:[show]> syntax is used)
scount Position in current search results. This field is generated automatically by the program.

Optional Parameters - Authentication

userlogin username field for customer authentication request
userpass password field for customer authentication request
couponid id to authenticate use of coupon/gift certificate during checkout
couponpass password to authenticate use of coupon/gift certificate during checkout

Automatically Generated Parameters

user_id 10-digit unique customer identifier
ud encrypted unique identifier (contains user_id, userlogin, and timestamp)
orderid unique order identifier
dlfile identifies specific payload file to be delivered
dlclick confirmation flag to initiate payload download routine

Place Holders

Automatically replaced by the program in any generated page

<! sspath> Displays the plain text URL to surfshop.cgi on your server. Uses secure URL if no plain text path is used.
<! secure> Displays the secure URL to surfshop.cgi on your server. Uses regular URL if no SSL is used.
<! imageurl> Displays the URL to your document root on your server. Will vary depending on whether or not SSL is used in URL.
<! homepage> Displays URL to your site’s home page.
<! YourMail> Displays your merchant email address.
<! YourCompany> Displays your Company Name.
<! storeheader> Displays URL to your default header graphic.
<! ss_appfield> Displays name of credit card approval field.
<! ss_approved> Displays “Approved” value of credit card approval field.
<! ss_declined> Displays “Declined” value of credit card approval field.
<! categories:[mode]> Displays list of catalog categories in different ways, depending on [mode] argument:
links Displays list of hyperlinks to generate searches based on each of your categories.
Only shows top-level categories and sub-categories related to current category.
label Displays category name only.
delete Displays multi-select menu of categories used for deletion (admin only).
list Displays multi-select menu of categories of limited height for list views (admin only).
trail Displays “breadcrumb trail” of categories hyper- linked to generate searches based on each of the
parent categories of the current category.
Tools > Power > Saws > Rotary > X-15 Super Saws

Query-specific Place Holders

<! popup:[name]:[field]:[database]:[label]> Displays a drop-down menu of data in [database] whose values consist of the values of [field] and
whose labels consist of the corresponding values of [label]. Often, this is used to add a category
drop-down to the search console. In “Template Options” of WebStore Admin, inserting the following
code in the “Navigation HTML” section:
<! popup:categories:UID:categories:GroupName>
<! add:item> Displays confirmation message when item is added to cart. Currently ‘item’ is a required argument.
<! loginchk> Login Flag. Returns 1 if authenticated. Used for <! if:…> tests on generated pages.
<! dllink> Displays HTML link(s) for payload delivery corresponding to payloads in customer’s order.
<! dllinkmail> Displays URL’s for payload delivery corresponding to payloads in customer’s order, used in email messages.
<! key> Displays list of unique items in cart as a single string. Used internally, but needs to be passed through card processing.
<! error> Displays description of error when a problem is detected (missing fields, invalid password, etc.)

Catalog-specific Place Holders

<! breaks:[fields](:[mode])> Displays price breaks of matching item. [field] will usually be 'itemid'. Set [mode](optional) to 'lowest' to show first tier only.
<! buyme> Displays drop-down menu listing options for matching item
<! instock> Displays message if the item shows is in inventory. (When inventory tracking is used.)

Containers - Display HTML based on certain conditions

<! if:[field]:[conditional]:[value]> HTML
<! /if>
Displays HTML if the expression evaluates to true.
[conditional] can be:
gt (is greater-than),
ge (is greater-than or equal to),
lt (is less-than),
le (is less-than or equal to),
eq (is equal to),
ne (is not equal to)
~ (contains). or
!~ (does not contain).
Numeric data and text data CANNOT be mixed in the expression.
<! iff:[field]:[conditional]:[value]> HTML
<! /iff>
Same as if: above, except nested inside an <! if:> container. <if:> containers CANNOT otherwise be nested.
<! orif:[field]:[conditional]:[value1]||[field]:[conditional]:[value2]> HTML
<! /orif>
Displays HTML if any of the expressions evaluate to true. Separate expressions with two pipe characters, e.g. ||
[conditional] can be:
gt (is greater-than),
lt (is less-than),
eq (is equal to),
ne (is not equal to) or
~ (contains).
Numeric data and text data CANNOT be mixed in the expression.
<! orif:[field]:[conditional]:[value1]||[value2]||[value3]> HTML
<! /orif>
A shorthand version of the above orif statement. Handy when you only use a single field. Separate values with two pipe characters, e.g. ||
<! andif:[field]:[conditional]:[value1]&&[field]:[conditional]:[value2]> HTML
<! /andif>
Displays HTML if all of the expressions evaluate to true. Separate expressions with two ampersands, e.g. &&
[conditional] can be:
gt (is greater-than),
lt (is less-than),
eq (is equal to),
ne (is not equal to) or
~ (contains).
Numeric data and text data CANNOT be mixed in the expression.
<! loginchk> HTML <! /loginchk> Displays HTML if user is authenticated using userlogin and userpass.
<! search(:[database]:[sortby]:[show])>
HTML
<! /search>
Displays HTML for each match in [database] sorted by [sortby].
Shows [show] items at a time. Defaults to values of b, sortby and show parameters if not included in <! search> tag.
Will match any field in [database] passed as form data, as well as searchtext and categories fields.
<! basket>HTML<! /basket> Displays HTML for each item in customer’s current cart.
<! minibasket>HTML<! /minibasket> Displays HTML for each item in EXISTING order matching orderid or orderlookup.

Place Holders returned with/displayed on pages with <! search> tags

<! scount> Current location in search results
<! hidden> Hidden input tags of current data set for use in HTML <form>
<! stotal> Total number of matching items
<! results> Text description of current location in search results
<! links> Links to all search results pages, separated by vertical bar
<! next> Link to next search results page (blank if none)
<! last> Link to previous search results page (blank if none)
<! backurl> URL for return links back to program (includes current query set)

Place Holders returned with/displayed on pages with <! basket> and <! minibasket> tags

<! quantity> The current quantity of the item
<! itemid> The itemid of the item
<! description> Short description of the item
<! options> Selected options of the item
<! weight> Weight of item (in whatever units being used)
<! volume> Volume of item (in whatever units being used)
<! optionprice> Additional price depending on options selected
<! unitprice> Current price of item, depending on current quantity plus sum of all optionprices
<! other> One-time charge for item, independent of quantity
<! shipping> Individual shipping charge depending on current quantity
<! netweight> Total weight of item (quantity time weight)
<! modify> Displays text input field containing current quantity used for changing quantity
<! netprice> Total price of item (quantity times unitprice plus other)

Order Values - Calculated after cart has been evaluated

<! shiptype> Currently selected shipping method
<! shipmethod> Displays drop-down menu of all available ship- ping methods, with current price calculated
<! totalweight> Sum of all weights of order
<! totalvolume> Sum of all volumes of order
<! totalqty> Sum of all quantities of order
<! taxtotal> Total of all taxable netprices of order
<! totalother> Sum of all “other” charges of order
<! subtotal> Total of all netprices of order
<! totalcalcs> Total of all non-shipping calculations of order
<! shipcost> Calculated cost of shipping based on shipping type selected
<! totalshipping> shipcost plus sum of all individual item shipping values
<! authamt> Calculated amount from coupon or gift certifi- cate to be deducted from order
<! chargetotal> Grand total of subtotal plus totalcalcs plus total- shipping minus authamt

Special Payment Placeholders

<! PmtType> The selected payment method: CreditCard, Check or Mail
<! Ecom_Payment_Card_ExpDate_Yr> The card expiration year in YY format
<! Ecom_Payment_Card_MoYr> The card expiration date in MMYY format
<! cardexp> The card expiration date in MM/YYYY format
<! cardabbr> The card number in 99**9999 format, where the 9's are the first two
and the last four numbers respectively
<! PmtAVS> The processor's AVS result code, based on the autoconfig.cgi setting
<! PmtMsg> The processor's rejection reason, if present, based on the autoconfig.cgi setting
<! PmtAuth> The processor's unique authentication code, based on the autoconfig.cgi setting

Modifiers

Convert value of [field], where [field] represents any returned data field

<! data:[field]:[value]> Sets [field] to [value]
<! html:[field]> Converts [field] to html: line breaks into <br> tags,
plus <, >, ”, `, &, and tab characters into HTML equivalents
<! url:[field]> URL encodes [field]
<! usd:[field]> The currency value of field based on the currency settings in autoconfig.cgi
<! date:[field]> [field] represented in Month DD, YYYY format.
Dates are stored in sortable format: YYYY|MM|DD|hh|mm|ss. A zero value will return Dec 31, 1969
<! conv:[field](:conversion:precision)> Returns conversion of [field] (:conversion:precision) are optional parameters
used in output of converted value. If not present, the value of conversion
and conv_prec parameters are used
<! decrypt:[field]> Decrypts [field] using EzCrypt algorithm based on key set in autoconfig.cgi
<! longcountry:[field]> Converts two character country code in [field] into longer, user-friendly version
parameters.txt · Last modified: 2018/07/03 04:55 (external edit)