Documentation
Basics Forms Shortcuts and URLs Modules Miscellaneous OtherGeneral Settings Specials eGroups Message Boards SEO Auctions Bookmarks Products Partners Email Marketing Campaigns
Product Search Functions And Indexes Product Module Manage Products
Functions and Indexes
How to edit indexes in keAdmin:
- to General Settings / Constants and Lists / Shopping
- edit options
Indexes:
- Main Index
- name: MAIN_INDEX (do not change!)
- default value: 1
- this value is used to globally change the product and classified prices
- each price is multiplied with this value
- Custom indexes
- name: INDEX_number (do not change!)
- default value: 0
- use description to give the index a useful definition
- the value can be used in functions
- each webmaster will define the usage of these indexes
- there can be unlimited number of custom indexes
Function builder
- basic operations:
+ - / * : plus, minus, divide, multiply
? : compare two values - usage: (x ? y), result 1 if x > y, else 0
%: compare two values - usage: (x % y), result 1 if x = y, else 0
- math functions:
sin - usage: sin (x)
cos - usage: cos(x)
tan - usage: tan(x)
cot - usage: cot(x)
sec - usage: sec(x)
csc - usage: csc(x)
arcsin - usage: arcsin(x)
arccos - usage: arccos(x)
arctan - usage: arctan(x)
exp - usage: exp(x)
ln - usage: ln(x)
log10 - usage: log10(x)
log2 - usage: log2(x)
abs - usage: abs(x)
sqrt - usage: sqrt(x)
round - usage: round(x)
floor - usage: floor(x)
power - usage: x^y
- custom index access
index - usage: index(number)
- custom values
Q or q: pi value
P or p: price
W or w: weight
C or c: line count (product count)
L or l: length
D or d: width
H or h: height
T or t: total count
Function usage:
Options Info for products / classifieds
- each option will have a key defined: comma delimited values with the possible use of *, which means that the key includes all the other similar, so far keys, that had no match after.
Sample:
*= p + 100
key1,*= p + 200
key1,key2,*= p + 300
key1= p + 400
- the price calculation will perform:
- if there is one key only and the key is key1, the price is p + 400
- if no match so far, if there are at least 2 keys and the first two key match key1 and key2, the price will be p + 300
- if no match so far, if there is at least 1 key and the key match key1, the price will be p + 200
- if no match so far, the price will be p + 100
The keys for each product are update from the shopping cart, using:
TG_SHOP_PRD_x_OPT_y
Where x is product index and y is key index
Sample
TG_SHOP_PRD_1_OPT_1 – update product 1, index 1
TG_SHOP_PRD_1_OPT_2 – update product 1, index 2
TG_SHOP_PRD_1_OPT_3 – update product 1, index 3