if you changed the file name, you need to change references of all 'static' to 'product' so it should be Class ControllerInformationProducts now
How to show my latest product on custom page. i already created a custom page bt didn't solve these product problem can u plz. tell how can i do that??
use the layouts function in system > design > layouts. And do not PM me for personal support!
I got this to work but am getting an error which goes away when you click search. My goal is to have the page load no results until the person enters a search, then display the records matching, also if they hit search without putting anything in i want it to say no results. It seems to work but something needs to be tweaked to stop that error. Here is the link.
http://www.indoorharvestgardens.com/ind ... ion/static
http://www.indoorharvestgardens.com/ind ... ion/static
Hi I got this to work but when you load the page there is an error and also it will display all the records if you just hit search, can i make the field required and also not get this error?
http://www.indoorharvestgardens.com/ind ... ion/static
http://www.indoorharvestgardens.com/ind ... ion/static
Code: Select all
if (isset($this->request->post['terms'])) { your codes }
got it to work making a minor change, thanks so much!MarketInSG wrote:you are missing thisCode: Select all
if (isset($this->request->post['terms'])) { your codes }
Code: Select all
if (isset($this->request->post['term'])) { your codes }
it means your controller file isn't found. They are looking for Controllerinformationstatic
Awesome tutorial, thank you! The only thing I cannot get to work is this:
tophat wrote:Simply amazing. That was easier than I thought.MarketInSG wrote:Add that code into your htaccess file right after the rewrite on part. So to access your page, you can go to yoursite.com/static instead of the long url.Code: Select all
RewriteRule ^static$ index.php?route=information/static
I had to put it directly belowfor it to work, anywhere else it didn't regardeless of other rewrite rules.Code: Select all
RewriteBase /
Thanks again.
Is your server apache? And if so, do you have a .htaccess file? Adding that line of code would allow you to access index.php?route=information/static as website.com/static
categories are routed themselves through the system seo_url.php
as long as you link the pages properly, they wont
Hi,
this is exactly what I was looking for, because I wanted a page called weekly specials, and use the featured module on that page to create a landing page in my store for my weekly specials.
So I went ahead and created the files, but changed all "information/static" to "product/weekly-specials" and of course uploaded the files to the proper /product folders. I created the route in layout and added the Featured module to the route.
I am getting a blank page, so I was hoping you could help me? Thank you for your time!
Here is the code for my files:
controller/product/weekly-specials.php
view/theme/default/template/product/weekly-specials.tpl
language/english/product/weekly-specials.php
this is exactly what I was looking for, because I wanted a page called weekly specials, and use the featured module on that page to create a landing page in my store for my weekly specials.
So I went ahead and created the files, but changed all "information/static" to "product/weekly-specials" and of course uploaded the files to the proper /product folders. I created the route in layout and added the Featured module to the route.
I am getting a blank page, so I was hoping you could help me? Thank you for your time!
Here is the code for my files:
controller/product/weekly-specials.php
Code: Select all
<?php
class ControllerProductWeekly-specials extends Controller {
private $error = array();
public function index() {
$this->language->load('product/weekly-specials'); //Optional. This calls for your language file
$this->document->setTitle($this->language->get('heading_title')); //Optional. Set the title of your web page.
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('product/weekly-specials'),
'separator' => $this->language->get('text_separator')
);
$this->data['heading_title'] = $this->language->get('heading_title'); //Get "heading title" from language file.
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/weekly-specials.tpl')) { //if file exists in your current template folder
$this->template = $this->config->get('config_template') . '/template/product/weekly-specials.tpl'; //get it
} else {
$this->template = 'default/template/product/weekly-specials.tpl'; //or get the file from the default folder
}
$this->children = array( //Required. The children files for the page.
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);
$this->response->setOutput($this->render());
}
}
?>
Code: Select all
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
<div class="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
<?php } ?>
</div>
<h1><?php echo $heading_title; ?></h1>
<p>My own content</p>
<?php echo $content_bottom; ?></div>
<?php echo $footer; ?>
Code: Select all
<?php
// Heading
$_['heading_title'] = 'Weekly Specials'; //Add as many as you want, but remember to call for it in the controller file before you can use it in the template
?>
Code: Select all
class ControllerProductWeekly-specials extends Controller {
Who is online
Users browsing this forum: No registered users and 192 guests