Checkout cart on a response page showing @NANA for tax/total

Problems installing or using the NOP Design Free Shopping Cart. **ARCHIVE** Please post new topics to one of the groups below.

Moderator: scott

Checkout cart on a response page showing @NANA for tax/total

Postby DRAGFIRE » Wed Mar 12, 2003 2:02 pm

Can you please explain why the Checkout page properly shows the checkout cart in its entirety with tax and total values calculated, but
when the form submission calls a response page, that page shows the checkout cart with the tax line and the TOTAL line showing @NANA. I can not seem to locate the reason.

thanks

bob
DRAGFIRE
 
Posts: 15
Joined: Sun Feb 02, 2003 10:26 pm

Postby scott » Fri Mar 14, 2003 5:42 pm

Post your URL.
scott
Site Admin
 
Posts: 558
Joined: Sun Jul 14, 2002 7:00 pm
Location: Phoenix, AZ

Response page showing @NANA for tax and total - reply

Postby DRAGFIRE » Fri Mar 14, 2003 11:26 pm

Hello Scott,

Here is the form handler on the checkout.html that calls my response page

<FONT CLASS="checkout">
<FORM ACTION="/cgi-bin/email/dragfire/checkout.eml" METHOD="POST" onSubmit="return CheckForm(this)">
<Input Type="hidden" NAME="subject" VALUE="Incoming customer order">
<Input Type="hidden" NAME="ResponsePage" VALUE="http://members.aol.com/dragfire/thanks.htm">
<NOBR>
<SCRIPT>
CheckoutCart();
</SCRIPT>

These pages are on ...members.aol.com/dragfire AOL does not permit access to a cgi-bin and I believe I can not use the perl file.

On the response page, thanks.htm, the code looks like this...

<HTML>
<HEAD>
<TITLE>Thanks.htm</TITLE>
<SCRIPT SRC="language-en.js"></SCRIPT>
<SCRIPT SRC="nopcart.js"></SCRIPT>
<STYLE>
.greetext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;color: #006600;}
.blacktext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;color: #000000;}
.checkout {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
.checkoutinput {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
.nopcart {background: #464444;border: 1px;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #ffffff;}
.nopheader {background: #464444;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF;}
.nopentry {background: #CCFF99;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
.noptotal {background: #CCFF99;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
.nopbutton {background: #CCFF99;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;}
</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFCC">
<P ALIGN=Center>

<font size="3"><B><img border="0"
src="../dragfire/images/gdragon.gif" width="61" height="53" align="left"><img border="0"
src="../dragfire/images/dragonfire_fire.gif" width="187" height="42" align="left"><img border="0"
src="../dragfire/images/rechargers_fire.gif" width="195" height="42"
align="left">P.O. BOX 41001</B>,
<B>BRECKSVILLE, OH. &nbsp;44141-0001</B></font>
<P ALIGN=Center>
&nbsp;
<P ALIGN=Center>

<NOBR><SCRIPT>
CheckoutCart( );
</SCRIPT>
</NOBR>

*******************THIS IS WHERE THE CART DOES NOT SHOW
TAX AND TOTAL*******************

THANKS.

BOB
DRAGFIRE
 
Posts: 15
Joined: Sun Feb 02, 2003 10:26 pm

Email response page does not show @NANA - almost have it.

Postby DRAGFIRE » Sat Mar 15, 2003 1:26 am

Scott,

I found out that when I set TaxByRegion on nopcart.js to false, then the final response page does show tax and totals correctly. But I want to tax by region..that is...if a customer is inside Ohio, I collect the tax. If outside, I do not. So I need the feature. However, setting this attribute to true yields @NANA on tax and total. False gives good values, but no choice how to tax.

I can't quite figure out where the error is. It almost seems like nopcart.js is not remembering that a radio button was checked when a second call is made to CheckoutCart( );

thanks
bob
DRAGFIRE
 
Posts: 15
Joined: Sun Feb 02, 2003 10:26 pm

Have you set...

Postby winkphoto » Tue Mar 18, 2003 6:36 pm

the tax rate properly?

it would be in the format of .00725 for 7.25%

Also, you have to have a numeric value for price and shipping for each of your products. If you leave the items blank, or use just "0" you can get the same behaviour.

Regards,

Marc
winkphoto
Guru
 
Posts: 176
Joined: Fri Nov 15, 2002 9:21 pm
Location: Nashua, NH

@nana on response page for tax and totals - continued

Postby DRAGFIRE » Wed Mar 19, 2003 3:15 am

Hello Marc,

The tax rate is set to .007. Once again, here is the scenerio.

I make purchases and post to the cart. Then I call up managecart.

All numbers are correct. I make a selection in tax by region for ohio (7% tax. This is with nopocart.js ( taxbyregion=true).

I click to checkout, and the checkout page is called up. The cart appears correct with tax and total fields correct.

I fill out the ship and bill to form and submit. The submission is to a "response" page. I am not useing the .pl page as I have no cgi-bin
on aol behind my members. place screen name where this all is.

The response page appears and I again call checkoutcart.

The cart once again appears but NOW the tax and total fields are @NANA.

By simply setting tax by region on nopcart.js to false, the calculations are
correct.......BUT I loose the tax by region feature.

If you like, go to http://members.aol.com/dragfire and make a dummy purchase. Work your way through to checkout and you will see what happens. I will leave the "problem" there for a few days.

thanks

If anyone spots the problem, please drop me a line at dragfire@aol.com.

Thank you very much. I am so close to having this working.
DRAGFIRE
 
Posts: 15
Joined: Sun Feb 02, 2003 10:26 pm

Ok, here is th problem

Postby winkphoto » Wed Mar 19, 2003 1:33 pm

or at least what I think is happening.

It appears that when you go to your "thank you" page, you are calling
Code: Select all
CheckoutCart( );


but in your actual checkout page, you are calling:

Code: Select all
CheckoutCart();


First, remove the space between the parens. Also, it could be possible that the script is losing the choice of the "taxable" region when you go to the checkout page.

Try taking the HTML page you use for yoru checkout page and make a copy of it and rename it to thanks.htm. Then test the checkoutpage. If you get to the thanks page without the NaNaNa error, then it is the space in the parens.

From there, you can trim down the page and make it look the way you want.

I really can't see any other reason for it to not work.

Regards,

Marc
winkphoto
Guru
 
Posts: 176
Joined: Fri Nov 15, 2002 9:21 pm
Location: Nashua, NH

@NANA in thank you page - continued

Postby DRAGFIRE » Wed Mar 19, 2003 2:59 pm

Hi Marc,

Thanks for the suggestion regarding the extra space between the () in my thank you page. However, that did not do the trick.

I think that the nopcart.js script is not remembering which radio button was selected from the first call to the checkout page and the second call from the thank youpage.

Can you think of an easy way to "remind" the nopcart script that when it draws to know once again which radio button was selected?

Also, this may help too.

The complete file set of my ecart is contained on my local drive in a common folder.

I simple go to a products page, make some selections, and click to go to checkout. The checkout.htm page is called and looks good.

I minimize THAT page and manually click on thanks.htm and call it up.
It shows the cart with the @NANA problem. so on the second call
to checkoutcart....the nopcart has lost the understanding of the radio button choices.

thanks for your help

bob
DRAGFIRE
 
Posts: 15
Joined: Sun Feb 02, 2003 10:26 pm

Cut and paste

Postby winkphoto » Wed Mar 19, 2003 4:32 pm

Cut and paste the code from your checkout page to a new page and then rename that page thanks.htm

Don't change any of the page at all.

Now, when you go from your managecart page, you select the taxable region and it then takes you to the checkout page.

Fill in your data as you normally would, submit the order and now you should go to a duplicate of your "checkout" page, it's just named differently.

If you do this, does the thanks page now work?

Marc
winkphoto
Guru
 
Posts: 176
Joined: Fri Nov 15, 2002 9:21 pm
Location: Nashua, NH

Postby lmtoe » Wed Mar 19, 2003 5:32 pm

I had come across this exact scenario previously in this post, so this problem definately exists... http://www.nopdesign.com/forum/viewtopi ... highlight=

I had wanted to have a paypal form on the "thankyou" page so that I could call the checkout.pl to have the purchase written to the CSV file

Basically, once you call checkout.pl, the "thankyou" page will contain the NANA for tax & total if you have the chekoutcart() script on that page.

One thing I noticed however, is that if you go back to your products pages and go through the checkout agin, all of the info comes in normally. So I think we could actaully call the same checkout page from the checkout.pl script and it should work.

Specifically, you wouldn't actually want the same checkout.html page so make a copy of it, say checkout2.html. Then make the changes needed in checkout2.html (in my case, this is where I would make the form for paypal checkout).

The key to this though is that typically the thank you page is located in /cgi-bin. The call from checkout.pl would need to point to checkout2.html in the standard directory where the rest of the regular site files are located.

I have not tested this, but I think this will work. I will try this out tonight and let you know

-Toe
lmtoe
 
Posts: 66
Joined: Sun Dec 15, 2002 3:41 pm

@NANA on thank you page - copy of checkout.htm not the answe

Postby DRAGFIRE » Wed Mar 19, 2003 9:29 pm

Hello again Marc,

This is getting interesting.

Ok - I copied the script from checkout.htm........to........a new page now called thanks.htm

I still submit my form to a response page called "thanks" but it now is a copy of your checkout.htm.

Nothing has been touched in nopcart.js.

I am not useing the perl script file....I have no cgi-bin directory. This is the same as all site content is in a folder on your hard drive.

When the call is made to checkout the first time, the cart is correct. If I fill out the form and submit to the response page of "thanks.htm" ( now a second image of checkout.htm - - there is @NANA for tax and total.

Are we writing anything to a cookie and clearing it out after the first checkout pass or something like that? If you would like a zip file of this
site content sent to email so you can put it in a directory and examine it, I would be most glad to do so.

thanks
bob
DRAGFIRE
 
Posts: 15
Joined: Sun Feb 02, 2003 10:26 pm

Postby lmtoe » Wed Mar 19, 2003 9:43 pm

Bob

I just went to your site and went through the order process, and I see the NANA on your thankyou page. But from there, I clicked on the shop button and clicked "check out now" which takes you to the manage cart page. From here, again I did see all of the info in there (did not have the NANA)

So perhaps you would have to have the ManageCart() script in place of the CheckoutCart() script on the thankyou page.
lmtoe
 
Posts: 66
Joined: Sun Dec 15, 2002 3:41 pm

@nana issue for IMTOE

Postby DRAGFIRE » Wed Mar 19, 2003 9:49 pm

Hi,

Thanks for joining in on my problem. You are correct in your observations.

What I am trying for is to have the cart show up on the thankyou page in its clean final form..with tax calculated and total. If I move the script to managecart...it is not a clean cart and has the radio buttons on it i believe.

If you would like to have a zip file to throw into a local folder of this site, I would be happy to send it to you.

thanks again
bob
DRAGFIRE
 
Posts: 15
Joined: Sun Feb 02, 2003 10:26 pm


Return to Installation and Setup Problems

Who is online

Users browsing this forum: No registered users and 0 guests

cron