How To Convert Shipping Options' Display In OnePage Checkout From Bullets To Dropdown In VPCart ?

How To Convert Shipping Options' Display In OnePage Checkout From Bullets To Dropdown In VPCart ?

How To Convert Shipping Options' Display In OnePage Checkout From Bullets To Dropdown In VPCart ?

Do you know that you may convert the shipping options' display in OnePage Checkout from bullets to dropdown ? In order to do that, you will have to undertake the following steps :

Step 1 :Locate the file called "shoponepagecheckout_common_subs.asp" in your server and open it using a code editor like Notepad or Notepad++.

Step 2 : Find the code shown below (which is around line 59 - 94) as shown in the screenshot.

Step 2

sub generate_onpeage_shippingmethod (iFieldnames,ifieldvalues,currentvalue,selectname,totalcnt) if trim(Shiptozip) = "" and trim(shiptocountry) = "" then exit sub dim i for i = 0 to cint(totalcnt)-1 if iFieldnames(i) > "" then dim tempcomparevalue tempcomparevalue = cstr(ifieldvalues(i)) tempcomparevalue = replace(tempcomparevalue, """","") if instr(tempcomparevalue, "[") > 0 then tempcomparevalue = left(tempcomparevalue, instr(tempcomparevalue, "[") - 2) end if dim tempcurrentvalue tempcurrentvalue = cstr(currentvalue) tempcurrentvalue = replace(tempcurrentvalue, """","") if instr(tempcurrentvalue, "[") > 0 then tempcurrentvalue = left(tempcurrentvalue, instr(tempcurrentvalue, "[") - 2) end if htmlwrite "

" dim selectstring selectstring = "" '800 - 2015.07.15 - Better handling on Free shipping cart option if tempcurrentvalue= tempcomparevalue or lcase(currentvalue) = lcase(cleanchars(iFieldnames(i))) then selectstring = "checked=""checked""" end if '800 - 2015.04.28 - Bug Fix: Onepage: if Xdefaultshippingmethod set to No, there should no have any shipping selection if lcase(getconfig("Xdefaultshippingmethod")) = "no" then selectstring = "" end if htmlwrite "
" htmlwrite "
" end if next end sub



and change it to the following :

sub generate_onpeage_shippingmethod (iFieldnames,ifieldvalues,currentvalue,selectname,totalcnt) if trim(Shiptozip) = "" and trim(shiptocountry) = "" then exit sub dim i htmlwrite "" end sub



Step 3 :Save the changes.

Step 4 :Now, locate another file called onepagecheckout.js which is available in the /js/checkout/ folder.

Step 5 : Find the code shown below (which is on line 55) as shown in the screenshot.

Step 5

var strshipmethodtype=$('input[name=shipmethodType]:checked').val();

and change it to :

var strshipmethodtype=$('#shipmethodType :selected').text();

Step 6 :Refresh your browser and you shall see the changes taking into effect (as shown below). Please clear your browser's history and caches if changes are not taking into effect.

Step 6

Thank you.


Times Viewed:
3114
Added By:
Debbie
Date Created:
12/23/2015
Last Updated:
12/23/2015