Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Add-ons for VP-ASP
 Hakkatil''s checkbox for shipping info
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kgashler
Starting Member

9 Posts

Posted - February 07 2003 :  00:26:43  Show Profile  Reply with Quote
Hello:

I've been trying to use Hakkatil's "Use a check box to copy customer info into shipping form" script. I'm using VP-ASP 4.50. When I cut and paste the script as per his instructions, shopcustomer.asp does not come up after clicking "checkout now." Instead, the site just sits there, unable to load anything, after clicking on the checkout link.

Any clues on this one?

Thanks,
Karl

Mark Priest
VP-CART Expert

United Kingdom
580 Posts

Posted - February 07 2003 :  07:13:35  Show Profile  Reply with Quote
I had this problem aswell, although i did get the page to load i couldnt get the javascript to work

I will try and sort something out and post it on my MOD site.



Regards,

Mark
http://www.isee-multimedia.co.uk
Go to Top of Page

Hgardner
Starting Member

2 Posts

Posted - February 27 2003 :  18:09:14  Show Profile  Reply with Quote
Hello,
I have found two problems with this code and thought I would pass what I learned on to everyone else.
First, the code to add to the shopcustomerform.asp around line 80 is missing an end if at the very end of the code block. It should read:

If getconfig("xShippingDatabaseRecords")="Yes" then
If GetSess("Shipmethodtype")="" and getconfig("xDefaultShippingMethod")<>"Yes" then
shipmethodtype=LangCommonSelect
end if
response.write Response.Write("<td colspan=2>" & getconfig("xfont") & LangShipSame & "</font> ")
response.write "<input type=""checkbox"" name=""copy"" OnClick=""javascript:ShipToBillPerson(this.form);"" value=""checkbox""></td>"
end if


Second, for anyone who has their cart setup to add a drop down list for the states you may have a problem with the script because of a form field naming issue and case sensitivity with Javascript. To correct this problem in shopcustomerform.asp somewhere around line 32
look for:
ShopStates "strstate", strstate
and change it to:
ShopStates "strState", strstate

The capital S here is important otherwise the Javascript won't work.
These seem to fix the probelms I was having, hope it clears up some problems for other people, and thanks to Hakkatil's for all the great free scripts!
HGardner

Found another fix after I posted this message:
This problem is similar to the one above but involves the dropdown list for the countries.
In shopcustomerform.asp:
about Line 48 look for
ShopCountries "StrCountry", strCountry
change to
ShopCountries "strCountry", strCountry
and
about Line 128 look for
ShopCountries "shipCountry", strshipCountry
change to
ShopCountries "shipcountry", strshipCountry



Edited by - Hgardner on February 28 2003 16:59:46

Edited by - Hgardner on March 03 2003 09:56:19
Go to Top of Page

support
Administrator

4679 Posts

Posted - February 27 2003 :  18:26:59  Show Profile  Visit support's Homepage  Reply with Quote
VP-ASP can auto fill the shipping fields in the database by setting in Shop Configuration

xshippingsetfields=Yes

VP-ASP Support



Go to Top of Page

kgashler
Starting Member

9 Posts

Posted - March 02 2003 :  21:55:44  Show Profile  Reply with Quote
Thanks Hgardner for your post. It's great to get advice from members here! I'll go try your fixes and see if it works...

Also, thanks Support for pointing out the xshippingsetfields=Yes configuration option. I already had mine set to "Yes", however, customers still like to see a check box that allows them to copy billing information to the shipping information blocks. It's just one of those "warm fuzzy" things to help move things along smoothly. This might be a nice thing to add to VP-ASP 5.0, yes?

Cheers,
Karl

Go to Top of Page

kgashler
Starting Member

9 Posts

Posted - March 03 2003 :  21:54:54  Show Profile  Reply with Quote
I used Hgardner's fixes, and everything works fine now. Bravo!

Go to Top of Page

IngaC
Starting Member

9 Posts

Posted - August 05 2003 :  16:04:05  Show Profile  Reply with Quote
So close but not working. I have been following this string of conversation and was excited to see fixes posted by Hgardner. I am still getting this error:

Microsoft VBScript compilation error '800a0400'
Expected statement
/shopping/shopcustomer.asp, line 14
<script language="JavaScript">


I made all the extra fixes Hgardner listed in previous post. It is a little unclear as to Hakkatil's original instructions for adding the code to shopcustomer.asp. Perhaps I have it in the wrong place. Also, I am using v.4.0 - but looks like he did too.

Here were Hakkatil's original instructions for putting the code into customerform.asp:

quote:
Put this top of shopcustomer.asp under
<!-- #include file="shopcoupon.asp" -->
<!-- #include file="shopdeliveryshippingcalc.asp" -->
<!-- #include file="shopgiftregsubs.asp" -->
'VPASP 4.0
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var ShipFirst = "";
var ShipLast = "";
var ShipCompany = "";
var ShipAddress = "";
var ShipCity = "";
var ShipState = "";
var ShipZip = ""; (And so on with remainder of code here....)



Here is what my heading on customerform.asp page looks like now that I've added his code:
quote:
<%option explicit%>
<!-- #include file="shop$db.asp" -->
<!-- #include file="shopcustomerform.asp" -->
<!-- #include file="shopshippingcalc.asp" -->
<!-- #include file="shopgiftdb.asp" -->
<!-- #include file="shopcoupon.asp" -->
<!-- #include file="shopdeliveryshippingcalc.asp" -->
<!-- #include file="shopgiftregsubs.asp" -->
<%
'*********************************************************
' Display customer, shipping forms form is now in shopcustomerform.asp
' Version 4.00 March 2, 2002
'*********************************************************
<script language="JavaScript">
<!-- Begin
var ShipFirst = "";
var ShipLast = "";
var ShipCompany = "";
var ShipAddress = "";
var ShipCity = ""; (And so on with remainder of code following....)



I am so anxious to get this to work. We get numerous errors from other country customers when they don't change their country code in shipping field - we have it defaulted to US. Thank you so much for any help.

Go to Top of Page

kaudio
Starting Member

13 Posts

Posted - August 26 2003 :  02:48:03  Show Profile  Reply with Quote
Been trying to use the copy customer information javascript for 5.0 but it does not work. I get a microsoft vb error. Can anyone help?

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00