Jump to content

Wrong URL is constructed using reply_msg.txt


gabberlt

Recommended Posts

Workflow:

 

 

1. Homepage -> Contact us (In user language)

2. Customer writes message choosing some order

3. Admin replies back from admin site

4. Customer gets a message to write back regarding that order but the url is constructed in english, although email is in user language. URL is - en/contact-us?id_customer_thread=4&token=o7FXFiVQ1rJD

5. And then shit storm begins, user writes back again (from english site now, since url was for en site) and he gets email again from admin, just in complete english now.

 

It should be [user site language]/contact-us?id_customer_thread=4&token=o7FXFiVQ1rJD

 

Or am I doing something wrong? Maybe it can be changed somewhere? I cannot find any trace where and how this url gets constructed

post-781015-0-99821500-1461059840_thumb.png

post-781015-0-59455000-1461059841_thumb.png

Link to comment
Share on other sites

  • 1 month later...

Hello, I had the same problem on PS 1.6.1.5. I solved it by changing AdminCustomerThreadsController.php

 

Change (somewhere around line 418)

$params = array(
                        '{reply}' => Tools::nl2br(Tools::getValue('reply_message')),
                        '{link}' => Tools::url(
                            $this->context->link->getPageLink('contact', true, null, null, false, $ct->id_shop),
                            'id_customer_thread='.(int)$ct->id.'&token='.$ct->token
                        ),
                        '{firstname}' => $customer->firstname,
                        '{lastname}' => $customer->lastname
                    );

to (3rd parameter of getPageLink() method should not be null)

$params = array(
                        '{reply}' => Tools::nl2br(Tools::getValue('reply_message')),
                        '{link}' => Tools::url(
                            $this->context->link->getPageLink('contact', true, $ct->id_lang, null, false, $ct->id_shop),
                            'id_customer_thread='.(int)$ct->id.'&token='.$ct->token
                        ),
                        '{firstname}' => $customer->firstname,
                        '{lastname}' => $customer->lastname
                    );
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...