0

I would like to delete the email form that's in the contact us page by default, and just list my email address there. I also want to type in some more info on that page. How do I change that? Which file do I change in version 3.0? The new 3.0 version uses twigg language and there are not a lot of forums that I can find that help out with that. Thanks

Vy Do
  • 46,709
  • 59
  • 215
  • 313
Martin H
  • 29
  • 2
  • 3

1 Answers1

0

Open the contact page twigg file located \catalog\view\theme\<<your theme's name>>\template\information\contact.twigg now you can locate the start of the form by looking for the following line (class and ID attributes may differ):

<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">

Now find the end of the form, at following line:

</form>

You now have the beginning and end of the form element, to remove the form you can delete from (and including) the first line to the second line mentioned above. I would not delete this if I were you though, you can always comment it out and it won't show to your visitors and you can always re-enable it if you change your mind in future.

Change the first line mentioned above to:

<!--form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">

Now change the end of the form to:

</form-->

You can also add any HTML that you may want in this area although it may be best to use a module in Content Top or Content Bottom (depending on your store's configuration)

Daniel
  • 2,167
  • 5
  • 23
  • 44
  • Thanks for your help. I have done that but the form is still there, even after I refreshed the page, etc. I have even totally removed the form (instead of commenting it out) and it is still there. I know I am in the right file because if I rename it, it will give me an error message (because it will be missing). What am I doing wrong? Thanks. – Martin H Aug 19 '17 at 23:55
  • There are a few possible issues: It's possible that there is a cache file in OpenCart that's keeping the form alive, since OC3 has an easy way to do this: Click the blue button with the "gear" icon that's on the dashboard under the logout link (top right of page). Now choose to disable theme cache - you should re-enable once you've completed your changes to the site. The html comments may not be correctly applied: right-click the form in the page in your browser and "Inspect Element" - do you see the form markup in green text? Lastly, which template are you using on the store? – Daniel Aug 20 '17 at 09:49
  • You were absolutely right on with it. Thanks. I am using the default template, nothing special. HTML works great within twig, I am glad. – Martin H Aug 21 '17 at 00:48
  • I'm pleased you've managed to resolve the issue now, OpenCart isn't very difficult to learn once you understand how the MVC framework functions. Please accept the answer if it worked for you! – Daniel Aug 21 '17 at 11:38