Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Cant get fmcompute to work

  1. #1
    Join Date
    Oct 2009
    Posts
    63

    Default Cant get fmcompute to work

    Alright. I have been working on this for two days no and have had no luck.

    I have one fmcompute(fmcompute1) on the second page of the form. it sets a few strings to certain text phrases to match the product they ordered. WORKS great. Then on the second to last page I have this code:

    PHP Code:
    <input type="hidden" name="fmcompute2" value="
      import function FMFatalError,FMFatalUserError;
      import function FMUserError;
      import string first_name,last_name,s_first_name,s_last_name,phone1,phone2,phone3,rush1,fPrice1;
    export string source_code,customername,shipto,telephone,RushDescripta,rushquan,rushdel;
      export float fPrice1(2,'.',','),rushdel(2,'.',',');

    RushDescripta = 'Rush Delivery';
    rushdel = 0;
    rushquan ='0';



    /*determines if rush delivery was selected and sets shipping accordingly*/
     
    if (rush1 == 'Yes')
    {
    rushdel = 7;
    rushquan = '1';
    }

    elseif (rush1 == 'No')
     {
        rushdel = 0;
        rushquan = '0';
        
      }
      
     /*This part works fine*/
    customername = first_name.' '.last_name;
    shipto = s_first_name .' '. s_last_name;
    telephone = phone1.'-'.phone2.'-'.phone3;
    "
    /> 
    It will not export anything to the confirmation page at all. Everytime I try something it just does not show up. Is it because I have more than one fmcomputes in the multipage form or what?

    I have no clue.

    There is a lot more code to go under this one, but I got rid of it to go back to being simple for troubleshooting purposes. Once I can get this to work I will add each section one at a time until its complete.

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Cant get fmcompute to work

    Hi,

    It all looks pretty good.

    I think the problem must be somewhere else.

    Can you post or PM me the URL for the first page of your form and I'll take a close look at each page in the process?
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Oct 2009
    Posts
    63

    Default Re: Cant get fmcompute to work

    Ok the url is https://www.600mg.biz

    But the pages go

    600mg.biz/index.php
    600mg.biz/billing.php- contains fmcompute

    then depending on what they chose on index.php

    600mg.biz/offer1.php
    600mg.biz/offer1a.php--->600mg.biz/upgrade.php



    then they go to -
    600mg.biz/offer3.php- contains fmcompute

  4. #4
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Cant get fmcompute to work

    Hi,

    OK, you'll need to tell me exactly which URL to visit to get started, and then provide me with instructions to fill in the fields (apart from the obvious), and what answers to provide.

    Then I need you to tell me what should appear that doesn't.

    I've run through the order on the first $29.99 product, and I'm not sure what I'm looking for that indicates a problem.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Cant get fmcompute to work

    To clarify...

    The phone number, name, and shipping address all appear on the summary page.

    So, based on your earlier post, they are being exported from the computation.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  6. #6
    Join Date
    Oct 2009
    Posts
    63

    Default Re: Cant get fmcompute to work

    Exaclty correct. The names and phone numbers all work perfect. The problem is below where it says order details.

    First go to
    https://www.600mg.biz
    click on any of the products.
    click no on everything except rush shiping. make sure to click yes.

    On the final page under order details , it should say

    Product Quanity Unit Price Amount
    Rush Delivery 1 7.00 7.00


    but it doesnt.
    Im still havent fixed it.

    Once I can get this to work, i plan on making it display the products they ordered thru the other pages you clicked no on and multiplying it by the quantity and etc., but i cant even get it to display rush delivery .

  7. #7
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Cant get fmcompute to work

    Hi,

    OK, I see that.

    I'm wondering whether the problem is that the field is called "fmcompute2" and you don't have an "fmcompute1".

    Can you rename it to "fmcompute1" and see if that resolves it?

    Otherwise, I think it will be most efficient if I can login to your server and check things out directly.

    If you're happy with that, please send access details using this secure form:

    https://secure.rootsoftware.com/~tectite/sendsecret.php
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  8. #8
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Cant get fmcompute to work

    Hi,

    Just checked the FormMail logic again...

    I'm sure the problem is that "fmcompute2" is not executed because there's no "fmcompute1".

    The rename should fix it.

    I'll also add onto our TO DO list for FormMail to do something sensible about this.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  9. #9
    Join Date
    Oct 2009
    Posts
    63

    Default Re: Cant get fmcompute to work

    fmcompute1 is on the billing page. It sets some variables to display dynamic content.

    on the billing page I have

    PHP Code:
    <div id="contentblock2">
    <
    form action="https://www.600mg.biz/order.php" method="post" name="form1" onsubmit="return Mod10(document.form1.CardNumber.value);">
    <
    input type="hidden" name="this_form" value="$this_form_url/> 
    <
    input type="hidden" name="bad_url" value="https://www.600mg.biz/fmbadhandler.php" />
    <
    input type="hidden" name="bad_template" value="https://www.600mg.biz/fmtemplates/error.php" />
    <
    input type="hidden" name="product1a" value="$product1/>
    <
    input type="hidden" name="fmcompute1" value="
      import function FMFatalError,FMFatalUserError;
      import function FMUserError;
      import string product1a;
      export string next_form ,price ,price22, cont;
      export float fPrice1(2,'.',','), fsavings(2,'.',','), ship(2,'.',',');
      
      cont = 'not ready';
      fPrice1 = 0;
      price = 'not ready';
      price22 = 'not';
      fsavings = 0;
      ship = 0;
      
    if (product1a == '1' || product1a == '3')
    {
    next_form = 'offer1.php';
    }
    elseif(product1a == '2' || product1a == '4')
    {
    next_form = 'offer1a.php';
    }

    if (product1a == '1' || product1a == '2')
    {
    price22 = '59.98';
    }
    elseif(product1a == '3' || product1a == '4')
    {
    price22 = '69.98';
    }
     

     if (product1a == '1')
     {
     fPrice1 = 29.99;
     price = '29.99';
     ship = 4.95;
     }
     if (product1a == '2')
     {
     fPrice1 = 59.98;
     price = '59.98';
     ship = 6.95;
     }
     if (product1a == '3')
     {
     fPrice1 = 34.99;
     price= '34.99';
     ship = 4.95;
     }
     if (product1a == '4')
     {
     fPrice1= 69.98;
     price = '69.98';
     ship = 6.95;
     }

     if (product1a == '1' || product1a == '2')
     {
     cont = 'Your Continuity Club will be modified to match.';
     }
     else
     {
     cont = ' ' ;
     }


     if (product1a=='1')
     {
     fsavings = 37;
     }
     elseif(product1a=='3')
     {
     fsavings = 42;
     }

    "
    /> 
    and on the Rush Shipping page(offer3.php) I have

    PHP Code:
    <div id="contentblock1">
    <
    form action="https://www.600mg.biz/order.php" method="post" name="form1">
    <
    input type="hidden" name="this_form" value="$this_form_url/>
    <
    input type="hidden" name="required" value="rush1" />
    <
    input type="hidden" name="bad_url" value="http://www.600mg.biz/fmbadhandler.php" />
    <
    input type="hidden" name="bad_template"value="error.php" />
    <
    input type="hidden" name="good_template" value="confirmation.html" />
    <
    input type="hidden" name="recipients" value="teamdevastation@msn.com" />
    <
    input type="hidden" name="product1a" value="$product1/>
    <!--
    start computations-->
    <
    input type="hidden" name="fmcompute2" value="
      import function FMFatalError,FMFatalUserError;
      import function FMUserError;
      import string first_name,last_name,s_first_name,s_last_name,phone1,phone2,phone3,rush1,fPrice1;
      export string source_code,customername,shipto,telephone,RushDescripta,rushquan,rushdel;
      export float fPrice1(2,'.',','),rushdel(2,'.',',');

    RushDescripta = 'Rush Delivery';
    rushdel = 0;
    rushquan ='0';



    /*determines if rush delivery was selected and sets shipping accordingly*/
     
    if (rush1 == 'Yes')
    {
    rushdel = 7;
    rushquan = '1';
    }

    elseif (rush1 == 'No')
     {
        rushdel = 0;
        rushquan = '0';
        
      }
      
     
    customername = first_name.' '.last_name;
    shipto = s_first_name .' '. s_last_name;
    telephone = phone1.'-'.phone2.'-'.phone3;
    "
    /> 

    So I think they are named correctly?

    could the patch you made to mine formail regarding auto respond have affected anything?

  10. #10
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Cant get fmcompute to work

    Hi,

    No, let me clarify....

    On each page, the first fmcompute on that page should be "fmcompute1", and the second one "fmcompute2" and so on.

    An "fmcompute1" on a page does *not* mean you must have "fmcompute2" on the next or subsequent page.

    The idea of the numbering is so you can split up very long computations into several fields.

    Each page is seen separately by FormMail, so there's no conflict having "fmcompute1" on every page in the sequence.

    The problem is that an "fmcompute2" on a page without an "fmcompute1" on that same page is simply being ignored.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need a little direction with fmcompute.
    By billy in forum FormMail Computation Module
    Replies: 29
    Last Post: 19-Dec-2008, 01:06 AM
  2. help with csv and fmcompute
    By drquijote in forum HOWTO Guides and Tips
    Replies: 1
    Last Post: 09-Dec-2008, 08:21 AM
  3. Trouble loading fmcompute module
    By aaron_w in forum FormMail Computation Module
    Replies: 2
    Last Post: 09-May-2008, 01:29 AM
  4. email not sent after fmcompute
    By aussieworld in forum Features Questions
    Replies: 4
    Last Post: 12-Jun-2007, 07:55 PM
  5. Cant get good url to work (after 6h work)
    By BadDevil in forum Community Support
    Replies: 8
    Last Post: 29-Jan-2007, 12:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •