Page 3 of 3

Re: Blank contact success page

Posted: Wed Feb 20, 2019 6:55 pm
by leatherboy
straightlight wrote:
Tue Feb 19, 2019 10:21 pm
Is there any idea.
Ensure to clear your OC cache after applying these steps. FAQ: viewtopic.php?f=176&p=739789#p718325
Thank you for the fast response.
I always clear caches and Journal's too.
I didn't mention that this is a workable eshop since 2017. Contact form worked fine. My client called me 3 days ago and told me that he noticed the contact form problem. He didn't do any update.

VQmod is not installed. You mean the storage folder?
I did contact Journal (they use default contact form).

What other steps do you mean;

Re: Blank contact success page

Posted: Wed Feb 20, 2019 10:51 pm
by Airassisted
straightlight wrote:
Sat Nov 04, 2017 10:38 pm
Revert all the changes from this topic. Then, in catalog/controller/information/contact.php file,

find:

Code: Select all

$this->response->redirect($this->url->link('information/contact/success'));
add above:

Code: Select all

$this->session->data['success'] = true;
Then, find:

Code: Select all

$data['continue'] = $this->url->link('common/home');
add below:

Code: Select all

if (!empty($this->session->data['success'])) {
			$data['text_success'] = $this->language->get('text_success');
			
			unset ($this->session->data['success']);
		}
In catalog/view/theme/<your_theme>/template/common/success.twig file,

find:

Code: Select all

</ul>
add below:

Code: Select all

{% if text_success %}
  <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ text_success }}</div>
  {% endif %}
  
This should resolved the problem.

Thank you Straightlight, your efforts on this forum are greatly appreciated...

Re: Blank contact success page

Posted: Wed Feb 20, 2019 11:31 pm
by leatherboy
I saw this post and I already tried this .
I will do it once again tomorrow.
Thanks

Re: Blank contact success page

Posted: Thu Feb 21, 2019 5:19 am
by straightlight
Thank you Straightlight, your efforts on this forum are greatly appreciated...
No problem.

Re: Blank contact success page

Posted: Mon Aug 19, 2019 9:42 pm
by sedra
xxvirusxx wrote:
Sun May 06, 2018 6:40 pm
Just add this line before $data['continue'] = $this->url->link('common/home'); in public function success() { from catalog/controller/information/contact.php

Code: Select all

$data['text_message'] = $this->language->get('text_success');
Work without problems.

LE. Or just replace file in controller...
thanks a lot! worked me for me too on 3.0.2.0

Re: Blank contact success page

Posted: Fri Oct 25, 2019 8:35 pm
by nudylady
worked on 3.0.2

Re: Blank contact success page

Posted: Wed Dec 11, 2019 7:34 am
by sajuk
Had the Same issue on Opencart 3.0.2.0, followed all the steps working just fine, had to make some slight changes to my layout,
the success massage was displaying before the page title (Contact US), moved it below the page title also changed the page title to read "Thank You" on success instead of Contact Us

pasted this code:

Code: Select all

{% if text_success %}
  <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ text_success }}</div>
  {% endif %}
after

Code: Select all

div id="content" class="{{ class }}">{{ content_top }}
      <h1>{{ heading_title }}</h1> 
      {{ text_message }}
around line 24

also removed

Code: Select all

 <h1>{{ heading_title }}</h1> 
and replaced
with

Code: Select all

<h1>{{success_heading_title}}</h1>
edit
catalog/language/YOURLANGUAGE/information/contact.php

find

Code: Select all

$_['heading_title']  = 'Contact Us';
below that added

Code: Select all

 $_['success_heading_title']  = 'Thank You';

Re: Blank contact success page

Posted: Fri Mar 06, 2020 7:02 pm
by tantadruj
This was a solution for me. My success page was blank. No massage.
Opencart version 3.0.3.2


Look in catalog/view/theme/YOUR_THEME/template/common/success twig .... and see what code you have under

Code: Select all

<h1>{{ heading_title }}</h1>
It should be

Code: Select all

{{ text_success }} 
and NOT

Code: Select all

{{ text_message }}


Hope this helps

Re: [SOLVED] - Blank contact success page

Posted: Sun Mar 15, 2020 7:17 pm
by paul@gothai.land
You are a legend straightlight - I have just come across is this in OpenCart 3.0.3.2, I know this thread is a few years old but it is still an issue.

I did an OCMod using your guidelines and worked perfectly.

I have added the file modification code below for OCMod incase anyone else hits the same issue (it modifies the default theme).

Code: Select all

    
    <file path="catalog/controller/information/contact.php">
        <operation>
            <search><![CDATA[$data['continue'] = $this->url->link('common/home');]]></search>
            <add position="after"><![CDATA[
		if (!empty($this->session->data['success'])) {
			$data['text_success'] = $this->language->get('text_success');
			unset ($this->session->data['success']);
		}			
	   ]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/default/template/common/success.twig">
        <operation>
            <search><![CDATA[</ul>]]></search>
            <add position="after"><![CDATA[
		{% if text_success %}
  			<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ text_success }}</div>
  		{% endif %}
	   ]]></add>
        </operation>
    </file>
    <file path="catalog/language/en-gb/information/contact.php">
        <operation>
            <search><![CDATA[$_['text_success']   = '<p>Your enquiry has been successfully sent to the store owner!</p>';]]></search>
            <add position="replace"><![CDATA[
		$_['text_success']   = 'Your message has been successfully sent - we will respond shortly, many thanks for your enquiry.';
		]]></add>
        </operation>
    </file>
    

Re: Blank contact success page

Posted: Wed Apr 08, 2020 4:56 am
by jsw
straightlight wrote:
Sat Nov 04, 2017 10:38 pm
Revert all the changes from this topic. Then, in catalog/controller/information/contact.php file,

find:

Code: Select all

$this->response->redirect($this->url->link('information/contact/success'));
add above:

Code: Select all

$this->session->data['success'] = true;
Then, find:

Code: Select all

$data['continue'] = $this->url->link('common/home');
add below:

Code: Select all

if (!empty($this->session->data['success'])) {
			$data['text_success'] = $this->language->get('text_success');
			
			unset ($this->session->data['success']);
		}
In catalog/view/theme/<your_theme>/template/common/success.twig file,

find:

Code: Select all

</ul>
add below:

Code: Select all

{% if text_success %}
  <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ text_success }}</div>
  {% endif %}
  
This should resolved the problem.
Just copied these changes in v3.0.3.2 and it worked! Thank you very much, straightlight!

Re: [SOLVED] - Blank contact success page

Posted: Thu Jun 18, 2020 11:28 pm
by straightlight
No problem. However, this issue has already been fixed in the pre-release as well.

Re: Blank contact success page

Posted: Mon Sep 28, 2020 8:18 pm
by Necky15
straightlight wrote:
Sat Nov 04, 2017 10:38 pm
Revert all the changes from this topic. Then, in catalog/controller/information/contact.php file,

find:

Code: Select all

$this->response->redirect($this->url->link('information/contact/success'));
add above:

Code: Select all

$this->session->data['success'] = true;
Then, find:

Code: Select all

$data['continue'] = $this->url->link('common/home');
add below:

Code: Select all

if (!empty($this->session->data['success'])) {
			$data['text_success'] = $this->language->get('text_success');
			
			unset ($this->session->data['success']);
		}
In catalog/view/theme/<your_theme>/template/common/success.twig file,

find:

Code: Select all

</ul>
add below:

Code: Select all

{% if text_success %}
  <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ text_success }}</div>
  {% endif %}
  
This should resolved the problem.
Hi. As you said, I did everything except the last item. Because the theme I use has a success.tpl file, not a success.twig file. Do you know what command should I include in the success.tpl file? I leave the file below.

Re: Blank contact success page

Posted: Mon Sep 28, 2020 9:10 pm
by OSWorX
Necky15 wrote:
Mon Sep 28, 2020 8:18 pm
Hi. As you said, I did everything except the last item. Because the theme I use has a success.tpl file, not a success.twig file. Do you know what command should I include in the success.tpl file? I leave the file below.
Is the template Journal (one of those using .tpl inside OC 3.x)?

Code: Select all

<?php if( $text_success ) { ?>
  <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> <?php echo $text_success; ?></div>
<?php } ?>

Re: Blank contact success page

Posted: Mon Sep 28, 2020 9:40 pm
by Necky15
OSWorX wrote:
Mon Sep 28, 2020 9:10 pm
Necky15 wrote:
Mon Sep 28, 2020 8:18 pm
Hi. As you said, I did everything except the last item. Because the theme I use has a success.tpl file, not a success.twig file. Do you know what command should I include in the success.tpl file? I leave the file below.
Is the template Journal (one of those using .tpl inside OC 3.x)?

Code: Select all

<?php if( $text_success ) { ?>
  <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> <?php echo $text_success; ?></div>
<?php } ?>
No. Theme "Porto". Opencart version 3.0.2.0

How will I use the code you provided?

OK. I added the code you gave to the 2nd paragraph in the .tpl file. Everything works fine thanks :) Can you look at this topic?
viewtopic.php?f=171&t=220216&p=800647#p800647

Re: Blank contact success page

Posted: Mon Sep 28, 2020 10:54 pm
by OSWorX
Necky15 wrote:
Mon Sep 28, 2020 9:40 pm
No. Theme "Porto". Opencart version 3.0.2.0
Also one of those "Template Creators" developing templates for OC 2.x and porting them to OC 3.x without additional work.
What a world - money goes round.