Page 2 of 2
Re: Creating a Custom Page in OpenCart 2.0
Posted: Tue Feb 07, 2017 1:15 pm
by damodaranudas
tpalella wrote:Anyone knows what needs to be changed for 2.2+?
thank you!
I follow your question

, is it 2.2+ tested?
Re: Creating a Custom Page in OpenCart 2.0
Posted: Fri Feb 10, 2017 9:00 pm
by MarketInSG
It should still work for 2.2
Re: Creating a Custom Page in OpenCart 2.0
Posted: Sun May 07, 2017 10:55 pm
by karlopencart
armand1610 = solved the problem for me
in /catalog/controller/information/static.php
Find this (around line 34)
Code: Select all
$this->response->setOutput($this->load->view('default/template/information/static.tpl', $data));
Replace with
Code: Select all
$this->response->setOutput($this->load->view('information/static.tpl', $data));
Basically it does not need the call to default/template/
Works in 2.3.0.2
Gosh: I'm still a newbie and I joined back in 2010, must post more often.
Re: Creating a Custom Page in OpenCart 2.0
Posted: Tue Jul 25, 2017 1:23 am
by rikmg67
Hi,
I have tried this method line by line and it didn't work
I'm using opencart Version 2.1.0.2.
Anyone know what I could try to get this working?
Thanks in advance!
Re: Creating a Custom Page in OpenCart 2.0
Posted: Fri Aug 04, 2017 11:09 pm
by MarketInSG
OpenCart 3 tutorial is out now:
viewtopic.php?f=23&t=186404
Re: Creating a Custom Page in OpenCart 2
Posted: Wed Sep 06, 2017 6:27 am
by photoscreenprint
Thank you, great tutorial. This was a big help.
I want to add, in the controller file change:
$this->language->load('information/static');
to
$this->load->language('information/static');
Best regards
Re: Creating a Custom Page in OpenCart 2
Posted: Thu Sep 07, 2017 9:13 pm
by cedcommerceteam
For 2.2+
in order to load template you can use $this->response->setOutput($this->load->view('your template path after template folder', $data));
and all template variables are store in $data.
Re: Creating a Custom Page in OpenCart 2
Posted: Sun Aug 26, 2018 1:03 am
by alancheong
Anyone have solutions for opencart 2.3.0.2 ?
Re: Creating a Custom Page in OpenCart 2
Posted: Thu Jan 10, 2019 10:24 am
by khnaz35
Hi Mark,
need your help on
Hi i am using OC 2.3.0.2 with J2.9, i am trying to make this url "
https://www.xyz.com/index.php?route=information/xyz " to "
https://www.maraley.com/xyz"
i have make a entry in db url_alias table
rl_alias_id int(11) 2053
query varchar(255) information/xyz
keyword varchar(255) xyz
but it doesn't help as i want.
Still the index.php?route=
how to go about it. Thanks in advance
the page is without opencart header and footer and it was not made directly from admin side
Re: Creating a Custom Page in OpenCart 2
Posted: Wed Jan 16, 2019 6:57 pm
by MarketInSG
Why not create a .htaccess rewrite for just that URL?
Re: Creating a Custom Page in OpenCart 2
Posted: Thu Jan 17, 2019 11:59 am
by khnaz35
MarketInSG wrote: ↑Wed Jan 16, 2019 6:57 pm
Why not create a .htaccess rewrite for just that URL?
Thanks That did already, was just trying to learn an other way of doing it
Re: Creating a Custom Page in OpenCart 2
Posted: Tue Apr 02, 2019 11:32 am
by nathan@vgcphils.com
HI MarketInSG,
can you also post a tutorial on how to create a custom static html product page for opencart 2.3.0.2?
idea is i need to create a custom designed product page, different from the current product page template of our shop.
just an html product page with a form and able to add to cart.
thanks.