[protect ADMIN,[lookup db=prefs.db&lookinfield=PREF&value=ADMIN&returnfield=value],[lookup db=prefs.db&lookinfield=PREF&value=GROUPS&returnfield=value]] Product Administration [text]OK=T[/text] [search db=products.db&eqSKUdatarq=[url][sku][/url]] [founditems] [showif [include file=protection.inc&owner=[url][the_OWNER][/url]]^N] [text]OK=F[/text] [/showif] [/founditems] [/search] [showif [OK]=T] [showif [action]=Section] [text]Section_Set=F[/text] [showif [hideif [button]=Select][lookup db=sections.db&lookinfield=S_RELATED&value=[s_id]&returnfield=S_ID¬found=][/hideif]=] [text]New_Sections=[s_id]+[/text] [search db=related.db&eqR_SKUdatarq=[url][sku][/url]&eqR_CTYPEdatarq=S][founditems] [text]New_Sections=[R_NAME][new_sections][/text] [/founditems][/search] [replace db=products.db&eqSKUdatarq=[url][sku][/url]]sections=[url][New_Sections][/url][/replace] [commitdatabase db=products.db] [search db=related.db&eqR_SKUdatarq=[url][sku][/url]&eqR_CTYPEdatarq=S] [showif [numfound]=0][math show=f]the_ID=[search db=related.db&neR_IDdatarq=find_all&deR_IDsort=1&R_IDtype=number&max=1][founditems][R_ID][/founditems][/search]+1[/math][/showif] [showif [numfound]>0][founditems][math show=f]the_ID=[R_ID][/math][/founditems][/showif] [/search] [replace db=related.db&eqR_SKUdatarq=[url][sku][/url]&eqR_CTYPEdatarq=S&append=T]R_ID=[the_ID]&R_SKU=[url][sku][/url]&R_NAME=[url][New_Sections][/url]&R_CTYPE=S[/replace] [commitdatabase db=related.db] [text]Section_Set=T[/text] [/showif] [/showif] [showif [action]=SecDel] [text]New_Sections=[/text] [search db=related.db&eqR_SKUdatarq=[url][sku][/url]&eqR_CTYPEdatarq=S][founditems] [listwords words=[R_NAME]&delimiters=[url]+ [/url]] [hideif [word]=][hideif [word]=[s_id]][text]New_Sections=[new_sections][word]+[/text][/hideif][/hideif] [/listwords] [/founditems][/search] [replace db=products.db&eqSKUdatarq=[url][sku][/url]]sections=[url][New_Sections][/url][/replace] [commitdatabase db=products.db] [replace db=related.db&eqR_SKUdatarq=[url][sku][/url]&eqR_CTYPEdatarq=S]R_NAME=[url][New_Sections][/url][/replace] [commitdatabase db=related.db] [/showif] [showif [action]=Add] [listwords words=[url][__R_NAME][/url]&delimiters=%0D%0A] [hideif [url][word][/url]=] [math show=f]the_ID=[search db=related.db&neR_IDdatarq=find_all&deR_IDsort=1&R_IDtype=number&max=1][founditems][R_ID][/founditems][/search]+1[/math] [math show=f]the_Rank=[search db=related.db&eqR_SKUdatarq=[url][__R_SKU][/url]&eqR_CATEGORYdatarq=[url][__R_CATEGORY][/url]&deR_RANKsort=1&R_RANKtype=number&max=1][founditems][R_RANK][/founditems][/search]+1[/math] [append db=related.db]R_ID=[the_ID]&R_CRANK=[lookup db=categories.db&lookinfield=C_ID&value=[url][__R_CATEGORY][/url]&returnfield=C_RANK]&R_CTYPE=[lookup db=categories.db&lookinfield=C_ID&value=[url][__R_CATEGORY][/url]&returnfield=C_TYPE]&R_RANK=[the_Rank]&R_NAME=[url][word][/url][formvariables name=__&exact=F]&[getchars start=3][name][/getchars]=[url][value][/url][/formvariables][/append] [commitdatabase db=related.db] [/hideif] [/listwords] [/showif] [showif [action]=Update] [hideif [url][__R_NAME][/url]=] [replace db=related.db&eqR_IDdatarq=[url][r_id][/url]]R_CRANK=[lookup db=categories.db&lookinfield=C_ID&value=[url][__R_CATEGORY][/url]&returnfield=C_RANK]&R_CTYPE=[lookup db=categories.db&lookinfield=C_ID&value=[url][__R_CATEGORY][/url]&returnfield=C_TYPE]&[formvariables name=__&exact=F][getchars start=3][name][/getchars]=[url][value][/url]&[/formvariables][/replace] [commitdatabase db=related.db] [/hideif] [/showif] [showif [action]=Delete] [delete db=related.db&eqR_IDdatarq=[url][r_id][/url]] [commitdatabase db=related.db] [/showif] [/showif] [include body_tag.inc] [hideif [action]=New] [hideif [action]=Edit] [hideif [Section_Set]=F] [search db=related.db&eqR_SKUdatarq=[url][sku][/url]&neR_CTYPEdatarq=S&asR_CATEGORYsort=1&R_RANKtype=number&asR_RANKsort=2][founditems] [/founditems][/search] [/hideif] [/hideif] [/hideif]
Related Information
[search db=related.db&eqR_SKUdatarq=[url][sku][/url]&eqR_CTYPEdatarq=S][founditems][listwords words=[R_NAME]&delimiters=[url]+ [/url]] [hideif [word]=][/hideif] [/listwords][/founditems][/search]
Category Listings
[lookup db=sections.db&lookinfield=S_ID&value=[word]&returnfield=S_Name]Delete
New Category Listing

Opt.Desc.Rank
[lookup db=categories.db&lookinfield=C_ID&value=[R_CATEGORY]&returnfield=C_Name][R_NAME][R_RANK]
Option
New Related Record
[showif [action]=New] New Related Record

[include file=related.inc&[listfields db=related.db][fieldname]=&[/listfields]] [showif [success]=T] [/showif] [showif [success]=F] [/showif]
Error! A product can not have multiple options that have the price and SKU override feature.

Please back up and select a different option.
[/showif] [showif [action]=Edit] Edit Related Record
[search db=related.db&eqR_IDdatarq=[url][r_id][/url]][founditems] [include file=related.inc] [/founditems][/search]
[/showif] [showif [Section_Set]=F] New Category Listing

[/showif]