Post by leatherboy » Wed Feb 20, 2019 6:55 pm

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;

Newbie

Posts

Joined
Fri Feb 12, 2016 2:32 am

Post by Airassisted » Wed Feb 20, 2019 10:51 pm

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...

Newbie

Posts

Joined
Wed Jan 13, 2016 1:13 am

Post by leatherboy » Wed Feb 20, 2019 11:31 pm

I saw this post and I already tried this .
I will do it once again tomorrow.
Thanks

Newbie

Posts

Joined
Fri Feb 12, 2016 2:32 am

Post by straightlight » Thu Feb 21, 2019 5:19 am

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

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sedra » Mon Aug 19, 2019 9:42 pm

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

New member

Posts

Joined
Thu Jan 04, 2018 8:14 pm

Post by nudylady » Fri Oct 25, 2019 8:35 pm

worked on 3.0.2

New member

Posts

Joined
Sun Feb 19, 2012 12:14 am

Post by sajuk » Wed Dec 11, 2019 7:34 am

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';
Last edited by straightlight on Fri Mar 06, 2020 7:30 pm, edited 1 time in total.
Reason: Please add the code tags.

Newbie

Posts

Joined
Tue Feb 07, 2017 7:10 pm

Post by tantadruj » Fri Mar 06, 2020 7:02 pm

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
Last edited by straightlight on Fri Mar 06, 2020 7:32 pm, edited 1 time in total.
Reason: Please add the code tags.

Newbie

Posts

Joined
Fri Jun 23, 2017 12:40 pm

Post by paul@gothai.land » Sun Mar 15, 2020 7:17 pm

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>
    


Posts

Joined
Mon Feb 25, 2019 4:46 pm

Post by jsw » Wed Apr 08, 2020 4:56 am

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!

jsw
Newbie

Posts

Joined
Wed Jun 12, 2013 11:42 pm
Location - Canada
Who is online

Users browsing this forum: No registered users and 9 guests