nbowman Posted October 27, 2008 Posted October 27, 2008 if (firstname == '' & & lastname == '' && street_address == '') { return true; } else { return check_form(form_name); } } //--> is appearing at the top of the https://www.leavemeb.com/checkout_shipping_address.php page. When I click "change address" and it goes to this page, it shows the above code there. What could have happened? This was not happening before. I did just change the usps shipping modules file, as well as its language - english shipping module file. But why is this happening?? I can still change the address, but that code looks bad. Anyone have any idea? Sorry, you have to login to the checkout part to see that. I have set up a test login id if you want to use it instead of creating your own. email: [email protected] pass: customer there is already something in the cart, so if you just go to checkout and then try to "change the address" by pressing the button and going to the checkout_shipping_address_php page you will see the code at the top there... :huh: Thanks in advance for anyone checking this out!!!
Guest Posted October 27, 2008 Posted October 27, 2008 That is part of the php code in the file - if it is appearing it probably means a ?> has been misplaced when the file was modified - Compare it to your backup taken before installing your recent mods
nbowman Posted October 27, 2008 Author Posted October 27, 2008 That is part of the php code in the file - if it is appearing it probably means a ?> has been misplaced when the file was modified - Compare it to your backup taken before installing your recent mods But I didn't touch this particular file. So I can just add a ?> ? Maybe I can compare it to an original file from the oscommerce install files. Mine are old and have gone through many transfers to different servers, etc. They are haggard :( But I am sure I didn't touch this one!
germ Posted October 27, 2008 Posted October 27, 2008 It's misplaced javascript. Look in the file for this code: if (firstname == '' && lastname == '' && street_address == '') { return true; } else { return check_form(form_name); } } //--></script> Put it in the <head> section just after this code: function check_form_optional(form_name) { var form = form_name; var firstname = form.elements['firstname'].value; var lastname = form.elements['lastname'].value; var street_address = form.elements['street_address'].value; If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
nbowman Posted October 27, 2008 Author Posted October 27, 2008 It's misplaced javascript. Look in the file for this code: if (firstname == '' && lastname == '' && street_address == '') { return true; } else { return check_form(form_name); } } //--></script> Put it in the <head> section just after this code: function check_form_optional(form_name) { var form = form_name; var firstname = form.elements['firstname'].value; var lastname = form.elements['lastname'].value; var street_address = form.elements['street_address'].value; Thanks both of you. I did a file compare with a downloaded version of oscommerce I downloaded fresh to my desktop this evening with the file on our servers (swear it says I haven't touched it since march of this year when we did a server change) and lo and behold the head tag was before the javascript something something. So I moved down the close head tag below the javascript code (to match the new file) and now it works! Thanks to both of you. (I wonder if that means all of our files have that same mixup - uggg it would be nice to be able to quickly and easily upgrade the version, but we've made too many mods I don't know all of them...) Anyhoo, THANKS AGAIN!!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.