GRD_SPEC Grid Component
Purpose
The GRD_SPEC grid component displays the products that are on sale with discounted prices. The customer can order a product by clicking the shopping cart image.

The GRD_SPEC grid component [Picture]
Description
The GRD_SPEC component is a read-only tabular grid based a view that incorporates fields from the specials and product tables. By default, when the grid displays, it shows three randomly selected records. The filter expression is: random_records(3) .and. (cdate(sale_until) = "" .or. sale_until>=date()).
The grid has a calculated field.
Sale_Price = if(Specials->Sale_Price>0, "Special! " + alltrim(str(Specials->Sale_Price, 10, 2, "$")), "") |
Containers
Notable Grid Control Property Settings
Control |
Property |
Description |
Thumb |
Image Properties > Image path |
"[PathAlias.ADB_Path]" |
Desc |
Display Settings > Control type |
"Link" |
Link Properties > Display what in link |
"Value in Field" | |
Link Properties > Link address type |
"Computed from fields in the grid" | |
Link Properties > Link address |
Opens the PRODUCTINFO.A5W page and displays the data that matches product_id. productinfo.a5w?pid={Product_Id} | |
List |
Column Properties > Freeform layout |
"True" |
Column Properties > Freeform template |
<p align=center><font size=1> Regular Price<br> {List}</font> </p> | |
Retail |
Column Properties > Freeform layout |
"True" |
Column Properties > Freeform template |
<p align=center><font size=2><strong><font color=#000080> Our Price<br> {Retail}</font> </strong> </font> </p> | |
Sale_Price |
Column Properties > Freeform layout |
"True" |
Column Properties > Freeform template |
When the customer clicks the image, the script calls the add_to_cart() function, passing the product_id as a parameter. <p><font color=#ff0000 size=3><strong> {Sale_Price}</strong></font> </p> <a onclick="add_to_cart('{Product_Id}')"><img height=19 alt="Add to Shopping Cart" src="Images/add_cart_mini.png" width=19 border=0></a> | |
Product_Id |
Column Properties > Hide column |
"True" |
See Also
Supported By
Alpha Five Version 7 and Above