Author |
Topic |
|
cps
VP-CART New User
South Africa
69 Posts |
Posted - July 01 2013 : 06:47:26
|
I just want to find out if there is a way to add ''QTY'' next to all the blocks where the customer fills out the quantity of the product they wish to order.
www.thecpswarehouse.co.za |
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - July 02 2013 : 03:57:43
|
You can add the "qty" text to the sub FormatQuantity in shopproductformat.asp file or you can add it to the product templates.
Regards,
Carrol www.deanston-electrical.co.uk |
|
|
cps
VP-CART New User
South Africa
69 Posts |
Posted - July 02 2013 : 06:11:28
|
Could you show me specifically where you would put the ''QTY'' in - I am not familiar with .ASP:
'' put out a quantity box unless using inventory products '' Inventory products cannot be purchased so put our nothing sub FormatQuantity if GetConfig("xproductcatalogonly") = "Yes" then exit sub end if
''6.5.1 - don''t display this if xpriceloggedinonly = True and customer isn''t logged in if (GetConfig("xpriceloggedinonly") = "Yes") and (GetSess("Login") = "") then exit sub end if ''6.5.1 - don''t display this if product is out of stock if GetConfig("xOutOfStocklImit") > "" then if lngcstock<= clng(GetConfig("xOutOfStocklImit")) then response.write "<input class=""txtfield"" type=""hidden"" maxlength=""4"" size=""3"" value=""0"" name=""quantity"" />" exit sub end if end if if GetConfig("xstocklow") > "" then if lngcstock<= clng(GetConfig("xstocklow")) then response.write "<input class=""txtfield"" type=""hidden"" maxlength=""4"" size=""3"" value=""0"" name=""quantity"" />" exit sub end if end if if productwithhtml = "Yes" then if inventoryquantitydisplay = false then '' exit sub end if end if if inventorycheck = true and inventoryquantitydisplay = false then ''6.08 - Quantity issue in inventory products response.write "<input class=""txtfield"" type=""hidden"" maxlength=""4"" size=""3"" value=""0"" name=""quantity"" />" QuantityFlag = True exit sub end if if strMinimumQuantity = 0 or strMinimumquantity = "" then if productwithhtml<>"Yes" then response.write ProdQuantityColumn & "<input class=""txtfield"" type=""text"" maxlength=""4"" size=""3"" value=""1"" name=""quantity"" />" & ProdQuantityEnd else response.write "<input class=""txtfield"" type=""text"" maxlength=""4"" size=""3"" value=""0"" name=""quantity"" />" end if else GenerateMinList end if QuantityFlag = True end sub
sub GenerateMinList dim PArray(100), PArrayCount dim minamount, amount, multiply minamount = strminimumquantity '' should we generate a list or just prevent the customer from order less if GetConfig("xproductminimumquantity") = "Yes" then if productwithhtml<>"Yes" then response.write ProdQuantityColumn & "<input type=""text"" maxlength=""4"" size=""3"" value=""" & strMinimumQuantity & """ name=""quantity"" />" & ProdQuantityEnd else response.write "<input type=""text"" maxlength=""4"" size=""3"" value=""" & strMinimumQuantity & """ name=""quantity"" />" end if exit sub end if parraycount = GetConfig("xproductminimumlist") if parraycount = "" then parraycount = 6 end if parraycount = clng(parraycount) for i = 1 to parraycount amount = i * minamount parray(i) = amount next dim i s= "<select size=1 name=''quantity''>" sSelect = sSelect & "<option selected=""selected"">" & minamount & "</option>" for i = 2 to parraycount sSelect = sSelect & "<option>" & Parray(i) & "</option>" next sSelect = sSelect & "</select></p>" if productwithhtml<>"Yes" then response.write ProdQuantityColumn & sSelect & ProdQuantityend else response.write sSelect end if end sub
www.thecpswarehouse.co.za |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - July 02 2013 : 06:21:24
|
Add the lines with red text.
'' put out a quantity box unless using inventory products '' Inventory products cannot be purchased so put our nothing sub FormatQuantity if GetConfig("xproductcatalogonly") = "Yes" then exit sub end if
''6.5.1 - don''t display this if xpriceloggedinonly = True and customer isn''t logged in if (GetConfig("xpriceloggedinonly") = "Yes") and (GetSess("Login") = "") then exit sub end if ''6.5.1 - don''t display this if product is out of stock if GetConfig("xOutOfStocklImit") > "" then if lngcstock<= clng(GetConfig("xOutOfStocklImit")) then response.write "<input class=""txtfield"" type=""hidden"" maxlength=""4"" size=""3"" value=""0"" name=""quantity"" />" exit sub end if end if if GetConfig("xstocklow") > "" then if lngcstock<= clng(GetConfig("xstocklow")) then response.write "<input class=""txtfield"" type=""hidden"" maxlength=""4"" size=""3"" value=""0"" name=""quantity"" />" exit sub end if end if if productwithhtml = "Yes" then if inventoryquantitydisplay = false then '' exit sub end if end if if inventorycheck = true and inventoryquantitydisplay = false then ''6.08 - Quantity issue in inventory products response.write "<input class=""txtfield"" type=""hidden"" maxlength=""4"" size=""3"" value=""0"" name=""quantity"" />" QuantityFlag = True exit sub end if if strMinimumQuantity = 0 or strMinimumquantity = "" then if productwithhtml<>"Yes" then response.write "Qty " response.write ProdQuantityColumn & "<input class=""txtfield"" type=""text"" maxlength=""4"" size=""3"" value=""1"" name=""quantity"" />" & ProdQuantityEnd else response.write "Qty " response.write "<input class=""txtfield"" type=""text"" maxlength=""4"" size=""3"" value=""0"" name=""quantity"" />" end if else GenerateMinList end if QuantityFlag = True end sub
Any problems, just ask.
Regards, Carrol www.deanston-electrical.co.uk |
|
|
cps
VP-CART New User
South Africa
69 Posts |
|
cps
VP-CART New User
South Africa
69 Posts |
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - July 08 2013 : 03:44:40
|
Open file shopproductinventory.asp Find the sub FormatInventoryQuantity() and add in the code highlighted in red.
sub FormatInventoryQuantity ( dbc, rs, objrs) dim selectname, checkname, msize, setselected, Loopend, subCatalogId dim formcaption, multiple, valuename, CatalogIds, quantityname dim fprefix, sSelect Formatinventoryformname fprefix, formcaption selectname = fprefix & "subproductquantity" valuename = selectname & "_CatalogIds" checkname = selectname CatalogIds = "" loopend = "False" s= "" setselected = "" sSelect = ProdFeatureCaption & formCaption & ProdFeatureCaptionEnd sSelect = sSelect & "<table cellpadding=""0"" cellspacing=""0"">" tempOption = "" do while LoopEnd = "False" GenerateSubProductName tempoption, rs subCatalogId = rs("CatalogId") if CatalogIds<>"" then CatalogIds = CatalogIds & "," end if CatalogIds = CatalogIds & subCatalogId quantityname = selectname & "_" & subCatalogId sSelect = sSelect & "<tr>" sselect = sselect & "<td> Qty: <input type=""text"" size=""1"" name=""" & quantityname & """ value=""" & "0" & """ class=""txtfield"" /> </td>" sselect = sselect & "<td>" & tempoption & "</td>" sSelect = sSelect & "</tr>" Rs.movenext if rs.eof then LoopEnd = "True" end if loop sSelect = sSelect & "</table>" response.write "<br />" & sselect & "<br />" response.write "<input type=""hidden"" name=""" & valuename & """ value=""" & CatalogIds & """ />" & vbcrlf response.write "<input type=""hidden"" name=""" & checkname & """ value=" & 34) & "Yes" & chr(34) & " />" & vbcrlf end sub
Regards,
Carrol www.deanston-electrical.co.uk |
|
|
|
Topic |
|