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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by aerogel » 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.

New member

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.

New member

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

Post by straightlight » Thu Jun 18, 2020 11:28 pm

No problem. However, this issue has already been fixed in the pre-release as well.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by Necky15 » Mon Sep 28, 2020 8:18 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.
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.

User avatar
Newbie

Posts

Joined
Mon Nov 20, 2017 10:40 am

Post by OSWorX » 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 } ?>

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Necky15 » Mon Sep 28, 2020 9:40 pm

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

User avatar
Newbie

Posts

Joined
Mon Nov 20, 2017 10:40 am

Post by OSWorX » Mon Sep 28, 2020 10:54 pm

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.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by x1628 » Mon May 31, 2021 9:43 pm

I followed these steps but it didn't work can you please provide the exact php and twig files?

Newbie

Posts

Joined
Mon May 24, 2021 1:23 pm

Post by straightlight » Tue Jun 01, 2021 2:07 am

x1628 wrote:
Mon May 31, 2021 9:43 pm
I followed these steps but it didn't work can you please provide the exact php and twig files?
Lack. I can't believe, still on this day, how people are behind schedule to patch this. After all this time, what a shame.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Users browsing this forum: No registered users and 23 guests