Jump to content
  • 0

Order Pages


ServZoo

Question

What would be the easiest way to pass along signup information to a review popup on the checkout page. 

 

What I'm trying to do...

 

I use Shopper Approved and it has a pop up that comes up on the checkout complete page with 2 questions and star ratings. It has options for customer name and email that can be pre-populated from the script it's being used in.

 

Just curious if there is an easy to way to populate those two fields on the checkout complete page. Basically, is there a way to grab and display those two fields?

 

Clear as mud? LOL

 

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Example of setting/displaying variables:

 

/order/controllers/checkout.php

public function complete() {
    ...

    $account = array('user' => "username", 'email' => "me@mydomain.com");
    $this->set("account", $account);
}

/order/views/templates/{type}/checkout_complete.pdt

<div class="col-md-12">
    ...

   Username: <?php $this->Html->_($account['user']);?><br />
   Email: <?php $this->Html->_($account['email']);?>

   <?php
   // Auto-populate a form field
   $this->Form->create();
   $this->Form->fieldText("username", $this->Html->ifSet($account['user']), array('id' => "username"));
   $this->Form->fieldText("email", $this->Html->ifSet($account['email']), array('id' => "email"));
   $this->Form->end();
   ?>
</div>
Link to comment
Share on other sites

  • 0

probably best for a plugin mate.

 

I wouldn't think so. I mean, it's really just echoing a variable, much like the way the checkout complete page displays the order number. I'm too rusty to just take a stab at it, so I thought I would ask here as it might be easier than it looks. :-) Worse case, I will pay someone to do it.

Link to comment
Share on other sites

  • 0

I wouldn't think so. I mean, it's really just echoing a variable, much like the way the checkout complete page displays the order number. I'm too rusty to just take a stab at it, so I thought I would ask here as it might be easier than it looks. :-) Worse case, I will pay someone to do it.

 

Oh you just want to add some code you need to find the checkout.php page in the order form your using. But remember every update to update it. A plugin wouldn't need you to re-edit the file.

 

/plugin/order/...

Link to comment
Share on other sites

  • 0

Right. I have the code added already. I'm just trying to figure out how to auto populate two fields (name and email) from the signup information to display on the checkout complete page. I'm not a programmer by any stretch of the definition, but I remember when I dabbled with my inefficient sloppy code, you could pull a stored variable from either the session or the db and echo it, "echo $text;

 

The Blesta code is so pretty that I can't figure it out!  :)

 

Just curious what I would need to do to simply display those fields as text. I can handle getting them in the right spot for the code I added.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...