How To Make All Shipping Fields Required In VPCart

How To Make All Shipping Fields Required In VPCart

By default, the shipping fields are not mandatory in VPCart (eg Ship to Name , Shipping address, Shipping City etc..).

If you need to make them all to be mandatory, please follow these steps :

1. Open file shopcustomerform.asp using notepad or text editor.

2. Locate this code :

CreateFieldSetRow GetLang("langShipName"),"shipname", strshipname,"No",""

3. Please change to :

CreateFieldSetRow GetLang("langShipName"),"shipname", strshipname,"Yes",""

4. Locate this code :

CreateFieldSetRow GetLang("langCustAddress"), "shipaddress", strshipaddress,"No",""

5. Please change to :

CreateFieldSetRow GetLang("langCustAddress"), "shipaddress", strshipaddress,"Yes",""

6. Locate this code :

CreateFieldSetRow GetLang("langCustCity"), "shiptown", strshiptown ,"No",""

7. Please change to :

CreateFieldSetRow GetLang("langCustCity"), "shiptown", strshiptown ,"Yes",""

8. Locate this code:

CreateFieldSetRow GetLang("langCustPostCode"),"shipzip", strshipzip,"No",""

9. Please change to:

CreateFieldSetRow GetLang("langCustPostCode"),"shipzip", strshipzip,"Yes",""

10. Locate this code:

CreateFieldSetRow GetLang("langCustCountry"), "shipcountry", strshipCountry,"No",""

11. Please change to:

CreateFieldSetRow GetLang("langCustCountry"), "shipcountry", strshipCountry,"Yes",""

12. Locate this code :

HtmlWrite "<label>" & GetLang("langCustState") & "</label>"

13. Please change to :

HtmlWrite "<label>" & "* " & GetLang("langCustState") & "</label>"

14. Locate this code:

htmlwrite "<label>" & getlang("langCustPostCode") & "</label>"

15. Please change to:

htmlwrite "<label>" & "* " & getlang("langCustPostCode") & "</label>"

16. Locate this code :

HtmlWrite "<label>" & GetLang("langCustCountry") & "</label>"

17. Please change to :

HtmlWrite "<label>" & "* " & GetLang("langCustCountry") & "</label>"

18. Save the file and upload to your site via FTP.

19. Open file shop$common_checkout.asp using notepad or text editor.

20. Locate this code :

if GetConfig("xhearaboutusrequired")="Yes" and strhearaboutus="" then
SError = SError & GetLang("langhearaboutus") & GetLang("langCustRequired") & "<br />"
session("serror_hearaboutus") = "yes"
end if

21. Below that code, please insert :

if (instr(lcase(request.ServerVariables("script_name")), "shopcustregister.asp") > 0) then
else
if strshipname = "" then
SError = SError & GetLang("langShipName") & GetLang("langCustRequired") & "<br />"
end if
if strshipaddress = "" then
SError = SError & "Shipping " & GetLang("langCustAddress") & GetLang("langCustRequired") & "<br />"
end if
if strshiptown = "" then
SError = SError & "Shipping " & GetLang("langCustCity") & GetLang("langCustRequired") & "<br />"
end if
if strshipstate = "" then
SError = SError & "Shipping " & GetLang("langCustState") & GetLang("langCustRequired") & "<br />"
end if
if strshipzip = "" then
SError = SError & "Shipping " & GetLang("langCustPostCode") & GetLang("langCustRequired") & "<br />"
end if
if strshipCountry = "" then
SError = SError & "Shipping " & GetLang("langCustCountry") & GetLang("langCustRequired") & "<br />"
end if
end if




Times Viewed:
2740
Added By:
Wilson Keneshiro
Date Created:
6/27/2017
Last Updated:
10/19/2021