Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: How to move Order Comments from g_s_2 to g_s_3 ?  (Read 3802 times)

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
How to move Order Comments from g_s_2 to g_s_3 ?
« on: July 13, 2017, 06:46:19 PM »
I'd like to move the Order Comments from guest_step_2 to guest_step_3 (confirm.tpl). 

There are three steps.  I need help with the 3rd step. 

Step 1
Create a heading title for the comment box on the guest_step_3 (confirm) page.
Method: create a new language key: Block = checkout_confirm, Key = heading_title_joe, Translation = Add Comments about your Order here:    .

Step 2
Insert the new heading title into the form body of confirm.tpl.
Method: open confirm.tpl, on about line 42, add this:
Code: [Select]
<h4 class="heading4"><?php echo $heading_title_joe?></h4>
Step 3
Add the comment registerbox immediately under the heading title, like this:
Code: [Select]
<div class="registerbox">
<div class="content">
<?php echo $form['comment']; ?>
</div>
</div>

Step 3 didn't work because I don't know how to code. 

The confirm.tpl file does not recognize $form['comment'] the same way that the guest_step_2.tpl file does because <?[i don't know]; ?!!crap!* != [good outcome] ?qhq?>{bbq}.

I'm sure this is an easy one.  Any help?

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: How to move Order Comments from g_s_2 to g_s_3 ?
« Reply #2 on: October 18, 2017, 06:33:12 PM »
This is what I tried:

/storefront/controller/pages/checkout/guest_step_3.php

On line 76, insert this:

Code: [Select]
if ($this->request->is_POST()){
                    $this->session->data['comment'] = $this->request->post['comment'];
                    $this->extensions->hk_ProcessData($this);
        }

On line 165, insert this:

Code: [Select]
$form = new AForm();
$form->setForm(array ('form_name' => 'guest'));
$this->data['form']['form_open'] = $form->getFieldHtml(
array (
    'type'   => 'form',
                    'name'   => 'guest',
                    'action' => $action,
                    'csrf' => true
                )
        );

$this->data['form']['comment'] = $form->getFieldHtml(
array (
'type'  => 'textarea',
'name'  => 'comment',
'value' => $this->data['comment'],
'attr'  => ' rows="3" style="width: 99%" '));

/storefront/controller/pages/checkout/guest_step_2

Remove (comment out) line 114 and lines 411-417. 

////mytemplate/pages/checkout/confirm.tpl

On line 70, insert this:

Code: [Select]
<div class="ted"><h4 class="heading4"><?php echo $text_comment_dave?></h4></div>

<div class="registerbox">
<div class="content">
<?php echo $form['comment']; ?>
</div>
</div>

////mytemplate/pages/checkout/guest_step_2.tpl

Remove (comment out) the heading, registerbox, and form-comment from guest_step_2.

Outcome:

The Order Comments box is now located on GS3-Confirm page, but it doesn't work. 
The customer comments are not transmitted to AC system.  They cannot be viewed anywhere, they don't exist.

Can you help? 

Thanks.
« Last Edit: October 19, 2017, 04:40:33 PM by Geoffrey »

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: How to move Order Comments from g_s_2 to g_s_3 ?
« Reply #3 on: October 19, 2017, 03:22:44 PM »
Anyone?

 

Powered by SMFPacks Social Login Mod