Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Sep 2012
    Posts
    23
    Plugin Contributions
    0

    Default Re: Submitting data to Trusted Shops

    Hi

    This looks much better. Inserting var_dump(get_defined_vars()); gave reams and reams of data, including everything I need, as follows:

    ["customers_email_address"]=> string(20) "[email protected]"

    ["order_total"]=> string(4) "6.94"

    ["currency"]=> string(3) "GBP"

    So the next stage is just getting this data into the form.

    Your instruction above was:

    $Customer_email_address = $_SESSION['Customer_Email'] ; // This is what you identified as the needed field from the 'print_r()';

    <input type="hidden" name="email" value="$Customer_email_address"/> ;

    I assume this doesn't apply anymore (It doesn't seem to get the result anyway)

    Can you suggest what needs to be entered into Value to get this last bit going?

    Thanks

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Submitting data to Trusted Shops

    Quote Originally Posted by whitsolltd View Post
    ["customers_email_address"]=> string(20) "[email protected]"
    ["order_total"]=> string(4) "6.94"
    ["currency"]=> string(3) "GBP"

    So the next stage is just getting this data into the form.

    Your instruction above was:

    $Customer_email_address = $_SESSION['Customer_Email'] ; // This is what you identified as the needed field from the 'print_r()';

    <input type="hidden" name="email" value="$Customer_email_address"/> ;

    I assume this doesn't apply anymore
    You are starting to scare me. I fear I may be leading you into places you shouldn't be going.

    No, it won't apply anymore.

    The "$Customer_email_address" needs to be populated with that variable that you found/discovered with the dump_vars() command.

    Using the data you have provided, the code would be:

    $Customer_email_address = ["customers_email_address"] ;

    BUT, I can tell you right now, all that'll do is produce a syntax error. The reason being is that ["customers_email_address"] is an *array* variable but you've neglected to include the NAME of the array.. Valid code would look like:

    $Customer_email_address = $_GLOBAL["customers_email_address"] ;
    or
    $Customer_email_address = $customer["customers_email_address"] ;
    or
    $Customer_email_address = $some_other_name["customers_email_address"] ;

    Cheers
    Rod

    ps. I don't wish to offend you, but the reason you didn't get a response to your original post is/was probably because 1) It isn't a ZenCart issue, and 2). We are NOT here to teach you the basics of programming. If I thought my 'hint' to get you going (after you bumped the thread) was going to lead into a beginners step by step tutorial I would simply have refered you to http://www.w3schools.com/php/default.asp

    pss: No apologies needed. No apologies given.

 

 

Similar Threads

  1. v151 Google Trusted Site
    By WWWD in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 14 Mar 2013, 06:04 PM
  2. using two shops with one data base
    By JasonRocket in forum General Questions
    Replies: 2
    Last Post: 29 Jan 2009, 08:10 PM

Posting Permissions

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