<% ' 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
Item #: <%=pIdProduct%>
SKU Description
Details
Price <%=pCurrencySign%>: List price <%=pCurrencySign%>:
Wholesale price <%=pCurrencySign%>: Cost <%=pCurrencySign%>:
Image file name Thumbnail file name
Weight Stock
Availability (days) Text to distribute (links, serials, etc)
Supplier <% mySQL="SELECT idSupplier, supplierName FROM suppliers" call getFromDatabase(mySQL, rstemp, "comersus_backoffice_modifyProductForm.asp") if rstemp.eof then response.redirect "comersus_backoffice_supporterror.asp?error="& Server.Urlencode("No suppliers defined") end if %> Category 1
Category 2 Category 3
Form drop down quantity Active >
Clearance > Hidden for listing >
Show in home >
Variation 1 Drop down name
Description Price Percentage
<%=pCurrencySign%> %
<%=pCurrencySign%> %
<%=pCurrencySign%> %
Variation 1 Drop down name
Description Price Percentage
<%=pCurrencySign%> %
<%=pCurrencySign%> %
<%=pCurrencySign%> %
<%call closeDb()%> <% Private Function isLeafOfTheTree (idCategory) isLeafOfTheTree=0 mySQL="Select idCategory from categories where idParentCategory="&idCategory call getFromDatabase(mySQL, rsTemp1, "comersus_backoffice_addproductform.asp") if rsTemp1.eof then isLeafOfTheTree=1 end if end function %>