%
' Comersus BackOffice Lite
' e-commerce ASP Open Source
' Comersus Open Technologies LC
' 2005
' http://www.comersus.com
%>
<%
on error resume next
dim mySQL, conntemp, rstemp, rsTemp1
' get settings
pCurrencySign = getSettingKey("pCurrencySign")
pDecimalSign = getSettingKey("pDecimalSign")
pMoneyDontRound = getSettingKey("pMoneyDontRound")
pChangeDecimalPoint = getSettingKey("pChangeDecimalPoint")
' form parameter
pIdProduct = getUserInput(request.querystring("idProduct"),12)
if trim(pIdProduct)="" then
response.redirect "comersus_backoffice_message.asp?message="&Server.Urlencode("You must specify item #.")
end if
' get item details from db
mySQL="SELECT idProduct, idSupplier, description, price, listPrice, bToBPrice, cost, details, imageUrl, smallImageUrl, deliveringTime FROM products WHERE products.idProduct=" &pIdProduct
call getFromDatabase(mySQL, rstemp, "comersus_backoffice_modifyProductForm.asp")
' charge rscordset data into local variables
pIdProduct = rstemp("idProduct")
pIdSupplier = rstemp("idSupplier")
pDescription = rstemp("description")
pPrice = rstemp("price")
pListPrice = rstemp("listPrice")
pBToBPrice = rstemp("bToBPrice")
pCost = rstemp("cost")
pDetails = rstemp("details")
pImageUrl = rstemp("imageUrl")
pSmallImageUrl = rstemp("smallImageUrl")
pDeliveringTime = rstemp("deliveringTime")
' second query
mySQL="SELECT listHidden, hotDeal, active, weight, listPrice, sku, formQuantity, emailText, showInHome FROM products WHERE products.idProduct=" &pIdProduct
call getFromDatabase(mySQL, rstemp, "comersus_backoffice_modifyProductForm.asp")
' charge rscordset data into local variables
pListhidden = rstemp("listhidden")
pHotDeal = rstemp("hotDeal")
pActive = rstemp("active")
pShowInHome = rstemp("showInHome")
pWeight = rstemp("weight")
pListPrice = rstemp("listPrice")
pSku = rstemp("sku")
pFormQuantity = rstemp("formQuantity")
pEmailText = rstemp("emailText")
' end second query
pStock = getStock(pIdProduct)
' change , with .
if pChangeDecimalPoint="-1" then
pPrice = replace(pPrice, ",",".")
pListPrice = replace(pListPrice, ",",".")
pBToBPrice = replace(pBtoBPrice, ",",".")
pCost = replace(pCost, ",",".")
end if
' load variations
dim pHiddenIdOptions, pOptionDescrip1, pOptionDescrip2, pIdOptionGroup1, pIdOptionGroup2
dim arrayOptions1(3,3)
dim arrayOptions2(3,3)
call loadProductVariations(pIdProduct, arrayOptions1, arrayOptions2, pHiddenIdOptions, pOptionDescrip1, pOptionDescrip2, pIdOptionGroup1, pIdOptionGroup2)
%>
Modify product