Jump to content


  • Content count

  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Bonnie Walker
  1. snobordmmy

    Payment page radio buttons vs. text fields

    OK, I've got it all working and even up to osC snuff now -- no being lazy. If you accept both credit cards and check/money order for payments, to add JavaScript validation to prevent someone from being stupid and choosing pay by check/MO AND entering credit card information you need to edit the following files (having first backed up everything): Back up the following files: store/incudes/modules/payment/moneyorder.php store/incudes/languages/english/modules/payment/moneyorder.php NOTE: if you use any languages other than english, you also need to edit the corresponding language_name/modules/payment/moneyorder.php for each additional language. It is up to you to translate the error message into other languages. store/incudes/modules/payment/moneyorder.php Find the function javascript_validation() around line 58 It should contain only the line 'return false;'. I commented that out and added the following javascript validation: function javascript_validation() { //return false; //check that there is no credit card information $js = ' if (payment_value == "' . $this->code . '") {' . "\n" . ' var cc_number = document.checkout_payment.authorizenet_cc_number.value;' . "\n" . ' if (cc_number != "" || cc_number.length > 0) {' . "\n" . ' error_message = error_message + "'.MODULE_PAYMENT_MONEY_ORDER_TEXT_JS_CC_NUMBER.'";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' }'; return $js; } Next file: store/incudes/languages/english/modules/payment/moneyorder.php add the following definition to the end of the file. define('MODULE_PAYMENT_MONEY_ORDER_TEXT_JS_CC_NUMBER', '* You have chosen to pay by Check/Money Order AND submitted a credit card number.\n --To pay by Credit Card, please select the Credit Card Radio Button in the right hand column.\n --To pay by Check/Money Order, please remove your credit card number\n'); Continue adding this definition to any other corresponding language files as necessary. Feel free to change the error message to suit your needs and to translate it into any other languages as necessary. Just be sure to keep the variable name 'MODULE_PAYMENT_MONEY_ORDER_TEXT_JS_CC_NUMBER' the same in each language file. I hope this comes in handy to someone else but please use at your own risk as I cannot provide any support or warranty or suitability for any purpose. blah blah blah. ~Snowboard Mommy
  2. snobordmmy

    Payment page radio buttons vs. text fields

    Thanks for the tip. Not like it was quite that straightforward to figure out WHERE in the hell to put it, but I guess I'm smart and figured it out. For posterity's sake and anyone else who encounters stupid customers who don't even read their own payment confirmation screens, the JavaScript validation needs to go into the payment module 'moneyorder.php' (store/incudes/modules/payment/moneyorder.php). If you are using the original version of that file, then the class function javascript_validation() should contain only the line 'return false;'. I commented that out and added the following javascript validation. To be completely in osCommerce-approved format, the error message should be replaced with a variable and the variable defined in the includes/languages/english or whatever/modules/payment/moneyorder.php file and not here in the payment module, but i'm being too lazy right now since my cart is only in English anyway. If your cart has multiple languages you would need to take that extra step. In addition, it looks like you would also need to make sure that the language file got included as well. If/when I figure it out, I'll post again. For now, here is the first version: function javascript_validation() { //return false; //check that there is no credit card information $js = ' if (payment_value == "' . $this->code . '") {' . "\n" . ' var cc_number = document.checkout_payment.authorizenet_cc_number.value;' . "\n" . ' if (cc_number != "" || cc_number.length > 0) {' . "\n" . ' error_message = error_message + "* You have chosen to pay by Check/Money order AND submitted a credit card number.\n --To pay by Credit Card, please select the Credit Card Radio Button in the right hand column.\n --To pay by Check/Money Order, please remove any credit card information\n";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' }'; return $js; } My cart also uses PayPal, and so I also added the same validation to my paypal_ipn.php file just for consistency, although I have not had this particular problem with PayPal and people submitting CC info. Hope that helps someone else somewhere down the road. ~Bonnie
  3. snobordmmy

    Payment page radio buttons vs. text fields

    Hello, Still having the same annoying problem. Anyone have any ideas? thanks! ~Bonnie
  4. Hi, I've been having some problems with customers clicking "pay by check/money order" and then changing their minds and entering their credit card information BUT leaving the "pay by check" radio button checked (not clicking the "credit card" radio button). So, the shopping cart ignores the credit card information and processes the order as a "pay by check" (and then they call me up wondering where their order is and I'm still waiting for their check). Has anyone else had this problem and what did you do about it? I am trying to figure out the best way to add in error checking, but I am not sure if it should be on the checkout_confirmation.php page or the payment page and where the variables are kept so that I can check if "payment_method = check" and there is credit card information. Any hints or advice would be greatly appreciated. Thanks. ~B
  5. snobordmmy

    Credit Card middle #'s not being emailed

    this is actually a security feature. you should not be emailing credit card numbers. count your blessings that osCommerce has prevented you from making that mistake.
  6. ok, i sorta answered my own question, and i'm not sure if this is a CCGV issue anymore ... i had to add an option name and option value to the downloadable product in order for the system to recognize the download filename attribute. ... now both the gift vouchers and the downloads work, but the product description for the downloadable product has an unnecessary and potentially confusing product option drop down. if this isn't a CCGV issue and anyone knows of a forum or support doc I can get more help one, please let me know. thanks.
  7. hello, i have a pretty new installation of osC with the CCGV contribution (plus a couple others). i have not made any design or other modifications of my own but I have added the following contributions (which all appear to be working): CCGV, category descriptions, product sort order, PayPal IPN, and the how did you hear of us contributions. i am going to sell downloadable products (PDFs of games to play at parties) but cannot seem to get a successful download. I have enabled downloads in the admin panel I have added the products to the catalog and set the product attribute with the corresponding filename i have put the PDF file to be downloaded into the download folder i have set the pub folder to 777 and the download folder to 755 ... i think i've covered all the bases! at least the ones that are mentioned in the documentation for product downloads however, when i check out, (using the test cc and paypal IPN) no download link appears -- it just gives the default "your products will be delivered in 3-5 business days" message i have installed the PayPal IPN contribution (the one that is developed and supported by the OSC team), but i do not think the problem is related to that contribution as I also do not get a download link when I use the test credit card to check out. i disabled the gift voucher module in hopes that it would make the product downloads work, but no luck. did i miss something in enabling and setting up downloadable products ... or setting up the coupons and gift vouchers? any hints or shoves in the right direction would be appreciated thanks! ~Snowboard Mommy PS: sorry if this has already been covered in this forum. i did several searches of all forums and nothing really came close. the search for a particular topic kept giving me an "overflow" error.
  8. hello, i previously added code to my product_info.php so that it could parse php in product descriptions (so that i can add links using the tep_href_link function instead of static urls that i'd have to eventually update) ... i have just noticed that when i go to update the product description in the admin panel, it is adding the session ID to the php code and if I don't catch it it screws up the description. example: <?php echo tep_href_link(FILENAME_BLAH); ?> is displayed as: <?php&osCAdminID=0caca1f74a9ced502ca604f11bda79b4 echo tep_href_link(FILENAME_BLAH); ?> Does anyone know why this is happening? I have looked at the admin functions that create a textarea and that populate the text area with the product description, but i cannot see anything that would insert the SEssion ID into the php code in the product description. any suggestions (other than to quit using PHP in product description; i've figured that much out but hate to give up on this ... thanks) Thanks!
  9. Does anyone know if this contribution can handle this sitation for our skincare website: We have products that we group together into gift baskets so that customers can buy a product individually or as part of a gift set. We use product attributes to allow them to select which products they'd like in the basket (one soap, one cleanser, one moisturizer). If we were to install this contribution would it be able to delete stock for the gift basket attributes, from the actual product listings? Or would we have to allocate a certain amount of each prodct for the gift sets? Also, each attribute would be an individual product, not a small black t-shirt but one moisturizer and one soap. thanks!
  10. snobordmmy

    Wishlist 2.0 Support Thread

    i had the same problem with the "buy now" buttons and didn't have time to dig into it. i had to return my application_top.php to its original form and dump the wishlist stuff till i have more time to work on it (i'm still pre-launch and can't hold up the launch for imperfected wishlist technology!!). my guess is that the wishlist authors don't use buy now and simply commadeered that functionality for wishlist instead -- which makes it 100% incompatible for anyone using "buy now". if you want to poke around your application_top file, i think the changes in there are probably the place to start to get your real shopping cart back. good luck!!!
  11. hello, we have several content articles written about topics related to our products. we would like to link to the individual products mentioned in the articles. is it "safe" to just hard code a link like "product_info.php?cPath=29&products_id=43" or is there a way to dynamically (soft-code) from the database? thanks!
  12. hello, i just finished installing and trouble shooting cc-gb-510b and so far so good. A couple little tricks that seemed to be "unique" for me that I thought I'd post in case anyone else needs them (admittedly, i have not read through every page of this thread ... it could already be here!). To get the "check here to apply your gift voucher" to show up on the check out page I had to set the sort order for BOTH coupons and gv to 740. When I tried either one with a higher or lower sort priority, it didn't work, but both at 740 did. well, it sounds weird, but it works so i'm just going with it! also, to keep from adding shipping to a gift voucher purchase i had to enable downloads, give a weight to all of my physical products, give gv a weight of 0.0 AND i also had to go into catalog > product attributes and set up the "download" parameters there for the gift voucher. I gave it a dummy file name (like "gift_certificate") and download days of 90 and one download allowed ... i have no idea if these parameters will actually affect redeeming vouchers or not ... i guess to be safe I may extend that to 365 days or something unless someone here can tell me that it won't matter. also, instead of *deleting* vouchers, how about expiring them? i know it is illegal in some states/countries/areas to expire gift vouchers, but for the most part in the U.S. (where we are) it is possible to put an expiration on gift certificates and we would like to limit the liability they represent. We don't want someone coming back in 10 years trying to claim a 2004 gv!! I know we can set an expiration date for coupons ... anything for vouchers?? thanks a bunch for this contribution and any info on the expiring g.v.!! ~Bonnie