Community Forums 

Main Content

Gift Vouchers & Webplus X8

    Feb 01 2016 10:31:40

    #1

    heathzap

    Join date : 2016-01-13      Posts : 18

    Anyone managed to get gift vouchers to work with WebPlus X8? I could really use some help on this since I am not a script person. The only way I have managed is to use their standard e-commerce form for Mal's with a drop-down for different values. This suites our business process since we dont want to issue codes until the voucher is paid for. BUT...the issue is that i cannot see how to disable shipping for vouchers manually using this method since it adds vouchers to the shopping cart like any other product and assumes it is being shipped. I tried applying a discount equal to the shipping amount but then the invoice looks weird AND it screws up if you add other products to the cart for some reason



    Feb 01 2016 14:57:10

    #2

    heathzap

    Join date : 2016-01-13      Posts : 18

    Ok...so my progress is that I have managed to insert an HTML fragment into a panel where I want the Gift Voucher form to be. This HTML fragment is from the tutorial ie:

    <FORM METHOD="POST" ACTION="http://ww#.aitsafe.com/cf/voucher.cfm">
    <INPUT TYPE="HIDDEN" NAME="userid" VALUE="gg12345">
    <INPUT TYPE="HIDDEN" NAME="gift_amount" VALUE="15.00">
    Name: <INPUT TYPE="TEXT" NAME="gift_name">
    Email: <INPUT TYPE="TEXT" NAME="gift_email">
    Message: <TEXTAREA name="gift_message"></TEXTAREA>
    <INPUT TYPE="SUBMIT" VALUE="Buy Me">
    </FORM>

    This works but needs some styling and I need a combo box for drop down pricings of different vouchers.

    How do I get this submit to open the cart in a new tab in my browser ie a new window?
    Also worried about the security of this form. Any ideas?



    Feb 01 2016 18:02:33

    #3

    GT

    Join date : 2008-09-18      Posts : 3256

    Why not make the give amount a text box to enter their own value?

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Feb 02 2016 07:38:57

    #4

    heathzap

    Join date : 2016-01-13      Posts : 18

    GT said Why not make the give amount a text box to enter their own value?

    Thought about that but wondered how Mal's would cope with people entering nonsense values eg comma instead of decimals, alpha chars etc?

    Do you have any thoughts on form security and the need for it ie no CAPTCHA provided? Thought I saw something about this not being necessary but may be wrong?



    Feb 02 2016 11:44:38

    #5

    GT

    Join date : 2008-09-18      Posts : 3256

    Use java to allow only numbers in the box.

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Feb 02 2016 14:00:38

    #6

    heathzap

    Join date : 2016-01-13      Posts : 18

    GT said Use java to allow only numbers in the box.

    Appreciate your input!



    Feb 02 2016 15:29:26

    #7

    Debbie Q

    Join date : 2008-09-18      Posts : 5005

    All CAPTCHAs do is make it so BOTs can't use your forms. Not sure why that would be necessary.

    Debbie Q

    Mal's Support: www.mals-e.com/support.php
    GT's Forms and examples: www.malsforms.com
    Helpful java scripts: www.gemasana.com/mals
    Shipping help documents: www.stoner.org.uk/mals

    My Create-A-Book Publishing - mycreateabook.com
    Personalized Books, Music CDs and Gifts for all ages and occasions.

    Please help me out and share my site on your networks.




    Feb 02 2016 18:25:38

    #8

    GT

    Join date : 2008-09-18      Posts : 3256

    If the page is built using HTML5, use...

    <input type="number" name="gift_amount">

    type="number" is not supported in IE 9 and earlier versions.

    If not built using HTML5, then java will do it for you...

    <input type="text" name="gift_amount" onkeypress="return isNumber(event)">

    And the script would be...

    <script type="text/javascript">
    //<![CDATA
    function isNumber(evt) {
    evt = (evt) ? evt : window.event;
    var charCode = (evt.which) ? evt.which : evt.keyCode;
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
    return false;
    }
    return true;
    }
    //]]>
    </script>

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Feb 08 2016 09:51:33

    #9

    heathzap

    Join date : 2016-01-13      Posts : 18

    GT said If the page is built using HTML5, use...

    <input type="number" name="gift_amount">

    type="number" is not supported in IE 9 and earlier versions.

    If not built using HTML5, then java will do it for you...

    <input type="text" name="gift_amount" onkeypress="return isNumber(event)">

    And the script would be...



    Tx to GT and Debbie