Jump to content

Disable Guest Tracking in PrestaShop 1.6


Recommended Posts

Hello

 

How to disable Guest Tracking?

I use  guest order only (5 steps) and bank wire payment.

I allready delete "Follow my order" button in the order-confirmation.tpl file.

On the last page of order (order confirmation) when I refrech the page it directs me to the guest tracking page.

 

Thanks for help

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

found a solution for my v 1.5.6.0 so maybe can help you.

 

On the last page of order I have created Home link in order-confirmation.tpl:

 

changed this code on line 40-42:

<p>{l s='Your order ID is:'} <span class="bold">{$id_order_formatted}</span> . {l s='Your order ID has been sent via email.'}</p>
    <a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$reference_order}&email={$email}")|escape:'html'}" title="{l s='Follow my order'}"><img src="{$img_dir}icon/order.gif" alt="{l s='Follow my order'}" class="icon" /></a>
    <a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$reference_order}&email={$email}")|escape:'html'}" title="{l s='Follow my order'}">{l s='Follow my order'}</a>

to this:

<p style="font-size:15px">{l s='Your order ID is:'} <span class="bold">{$id_order_formatted}</span> . {l s='Your order confirmation has been sent via email.'}</p>
<p class="link-myhome"><a href="{$base_dir}" title="{l s='Home'}"><img src="{$img_dir}icon/home.gif" alt="{l s='Home'}" class="icon" /></a><a href="{$base_dir}" title="{l s='Home'}">{l s='Home'}</a></p>

Than cancel redirect to guest tracking in /www/controllers/front/GuestTrackingController.php

delete code on line 30:

public $php_self = 'guest-tracking';

change code on lines 117-130:

public function initContent()
    {
        parent::initContent();

        /* Handle brute force attacks */
        if (count($this->errors))
            sleep(1);

        $this->context->smarty->assign(array(
            'action' => $this->context->link->getPageLink('guest-tracking.php', true),
            'errors' => $this->errors,
        ));
        $this->setTemplate(_PS_THEME_DIR_.'guest-tracking.tpl');
    }

to this:

public function initContent()
    {
        parent::initContent();

        /* Handle brute force attacks */
        if (count($this->errors))
            sleep(1);

        $this->context->smarty->assign(array(
            'action' => $this->context->link->getPageLink('index.php', true),
            'errors' => $this->errors,
        ));
           Tools::redirect('index.php');
  }

So you have homepage link and after refresh also going to homepage

 

Have a nice guest check out ;-)

Edited by antoninmensik (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...