Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Trying to get Coupon Code to work in Dynamic Forms, but just getting frustrated
Last Post 07-24-2013 05:25 AM by Ryan Bakerink. 8 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Thomas PettyUser is Offline
Posts:14
Avatar

--
07-18-2013 07:45 AM
    Hi, I followed the instructions in your Demo #32 as closely as I could, and it sort of works, but not quite right. Something's missing, and I can't figure it out, after going in circles.

    I created the coupon list, no problem
    Created the stored procedure no problem
    Created the event

    In the instructions, 1st Step, 4th Bullet, it says, "
    • Create an HTML field and include several SPAN/DIV Tags. These will be used to display to the user the discount percentage and total.
    That doesn't really help. I've used field Client Side Events to update an html
    so I understand how that part works.

    I added a client side event on the Verify Coupon Code to refresh the display of the price + discount. The first time you click "Verify", nothing happens. The NEXT time you click it, it briefly displays the new price and discount, then reverts back to the old price with no discount. If I don't have the CSE, it doesn't update the display.

    However, when I click "Register" to sign up, it does transfer the price over to PayPal, even though it doesn't display on the page (and only after I click "Verify" a second time. It seems as if when I click the "Verify Coupon Code", it's refreshing the page, which then reverts back to the original price.

    I'm pulling my hair out to get this to work.



    Test with TESTCOUPON which gives a $25 discount.

    Thoughts?

    Many thanks!
    Tom
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    07-19-2013 06:37 AM
    Hello Tom,

    This error is on your page:

    SyntaxError: missing catch or finally after try
    https://maps.gstatic.com/cat_js/intl/en_us/mapfiles/460f/maps2/%7Bmain,mod_util,mod_act,mod_act_s,mod_actbr,mod_appiw,mod_mg,mod_mssvt,mod_pphover,mod_rst,mod_stars,mod_strr%7D.js
    Line 829


    Any JavaScript errors that are on the page can break any/all JavaScript calculations on the page.


    I noticed that when clicking the button the Discount was applied to your HTML. What you need to do is call the same function when clicking the Validate Button under Module Configuration -> Advanced Coding Options -> Custom JavaScript File -> Initial JavaScript.

    You need to make certain that the calculation is re-calculation when the page re-loads from the Question Event.

    Please let me know if this helps.

    Thanks,

    Ryan
    Thomas PettyUser is Offline
    Posts:14
    Avatar

    --
    07-19-2013 07:23 AM
    YAY! That was it. I had different (older version) of JS code in the Module Configuration that was wrong. I also didn't have the "Submit" version either. Changed both to be what is behind the "Verify Coupon Code" and now it works.

    THANK YOU SO MUCH!

    Happy camper here. 

    Is there a way to set an expiration date on a coupon so it expires on x date? If not, I'll just mark my calendar to remove it, so not a big deal.

    Tom
    Thomas PettyUser is Offline
    Posts:14
    Avatar

    --
    07-19-2013 07:51 AM
    OK, now I feel stupid. The "Register Now" button doesn't do anything. It was working before all this. Now it does nothing. Hmph.  I have the PayPal gateway properly configured, and when I was testing the form yesterday, it was passing the correct price across to PP (even though it didn't display properly). Thoughts? 

    Thank you.
    Tom
    CandaceUser is Offline
    river guide
    river guide
    Posts:2431
    Avatar

    --
    07-19-2013 09:49 AM
    Hi Tom,

    Usually, when the register button doesn't work, it means there's a validation that's failing somewhere. First thing I would recommend that you go to Module Configuration and under Validation, enable client side and server side validation and also choose to display validation summary.

    After you hit update, check your form again and see what errors show up. You might also check in Admin > Event Viewer for any errors logged there then paste it here.

    Thanks!
    Candace


    Thomas PettyUser is Offline
    Posts:14
    Avatar

    --
    07-21-2013 05:09 AM
    Candace, Thank you for your help. It's clear that it's something to do with the JavaScript. I couldn't get it to report anything with your suggestions. If I click "Register Now" (the Submit button), nothing happens.

    If I take out the Javascript, it works again (but doesn't display in the custom HTML field).

    The JavaScript in the "Initial" and "Submit/Save" is two lines:

    $(total) = 897 - $(discount);
    ClassTotal.innerHTML = '

    Your registration fee totals: ' + formatCurrency($(total)) + ' after a discount of ' + formatCurrency($(discount)) + '.

    ';

    I'm looking at it cross-eyed, because I don't see any problems with that code.

    Any thoughts? 

    Urgh. 

    Thanks so much!
    Tom
    Thomas PettyUser is Offline
    Posts:14
    Avatar

    --
    07-21-2013 05:10 AM
    OK the forum stripped out the last closing paragraph tag.
    Thomas PettyUser is Offline
    Posts:14
    Avatar

    --
    07-21-2013 05:11 AM
    Trying again:

    $(total) = 897 - $(discount);
    ClassTotal.innerHTML = &#39;<p><strong>Your registration fee totals: &#39; + formatCurrency($(total)) + &#39;</strong> after a discount of &#39; + formatCurrency($(discount)) + &#39;.</p>&#39;; 
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    07-24-2013 05:25 AM
    Hello Thomas,

    What is ClassTotal? I believe you may be violating the DOM.

    If "ClassTotal" is the ID of the field you're trying to inject this text into, then try the following:

    document.getElementById('ClassTotal').innerHTML = 'Your Text Here';


    If this does not fix your problem, then please debug your code line by line. To do so you should comment out each line of code except 1, test, and verify if the calculations still work with that line of code enabled. If it still works, move onto the next line of code, and so on, and eventually you'll narrow down 1 line of code that's causing the calculation to break.

    Let me know if you have any questions.

    Thanks,

    Ryan
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi