Followed everything but i get an error saying
Notice: Undefined variable: blog in C:\Server\xampp\htdocs\oc134\catalog\view\theme\dark_red\template\common\home.tpl on line 8
Any idea what it is?
Notice: Undefined variable: blog in C:\Server\xampp\htdocs\oc134\catalog\view\theme\dark_red\template\common\home.tpl on line 8
Any idea what it is?
www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel
Hi My home.php file (\catalog\controller\common\home.php) is as below.
Code: Select all
<?php
class ControllerCommonHome extends Controller {
public function index() {
$this->children[] = "module/blog";
$this->language->load('common/home');
$this->document->title = $this->config->get('config_title');
$this->document->description = $this->config->get('config_meta_description');
$this->document->breadcrumbs = array();
$this->document->breadcrumbs[] = array(
'href' => $this->url->http('common/home'),
'text' => $this->language->get('text_home'),
'separator' => FALSE
);
$this->data['heading_title'] = sprintf($this->language->get('heading_title'), $this->config->get('config_store'));
$this->data['welcome'] = html_entity_decode($this->config->get('config_welcome_' . $this->language->getId()));
$this->data['text_latest'] = $this->language->get('text_latest');
$this->load->model('catalog/product');
$this->load->model('catalog/review');
$this->load->model('tool/seo_url');
$this->load->helper('image');
$this->data['products'] = array();
foreach ($this->model_catalog_product->getLatestProducts(8) as $result) {
if ($result['image']) {
$image = $result['image'];
} else {
$image = 'no_image.jpg';
}
$rating = $this->model_catalog_review->getAverageRating($result['product_id']);
$special = FALSE;
$discount = $this->model_catalog_product->getProductDiscount($result['product_id']);
if ($discount) {
$price = $this->currency->format($this->tax->calculate($discount, $result['tax_class_id'], $this->config->get('config_tax')));
} else {
$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
$special = $this->model_catalog_product->getProductSpecial($result['product_id']);
if ($special) {
$special = $this->currency->format($this->tax->calculate($special, $result['tax_class_id'], $this->config->get('config_tax')));
}
}
$this->data['products'][] = array(
'name' => $result['name'],
'model' => $result['model'],
'rating' => $rating,
'stars' => sprintf($this->language->get('text_stars'), $rating),
'thumb' => image_resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
'price' => $price,
'special' => $special,
'href' => $this->model_tool_seo_url->rewrite($this->url->http('product/product&product_id=' . $result['product_id']))
);
}
if (!$this->config->get('config_customer_price')) {
$this->data['display_price'] = TRUE;
} elseif ($this->customer->isLogged()) {
$this->data['display_price'] = TRUE;
} else {
$this->data['display_price'] = FALSE;
}
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/home.tpl')) {
$this->template = $this->config->get('config_template') . '/template/common/home.tpl';
} else {
$this->template = 'default/template/common/home.tpl';
}
$this->children = array(
'common/header',
'common/footer',
'common/column_left',
'common/column_right'
);
$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
}
}
?>
www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel
Find
Add after
Maybe its the better place???
Code: Select all
$this->children = array(
'common/header',
'common/footer',
'common/column_left',
'common/column_right'
);
Code: Select all
$this->children[] = "module/blog";
Yes, as stated in the documentation, it must appear after
As this code overwrites any changes to $this->children. Alternatively, you could simply add 'module/blog' to that call as follows:
Code: Select all
$this->children = array(
'common/header',
'common/footer',
'common/column_left',
'common/column_right'
);
Code: Select all
$this->children = array(
'common/header',
'common/footer',
'common/column_left',
'common/column_right',
'module/blog'
);
Hello,
i have just installed this on my 1.3.4 shop and i have this error code on main site:
Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/disifin/public_html/shop/catalog/controller/common/home.php on line 89
could someone point out what im doing wrong please?
thank you
i have just installed this on my 1.3.4 shop and i have this error code on main site:
Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/disifin/public_html/shop/catalog/controller/common/home.php on line 89
could someone point out what im doing wrong please?
thank you
odd, when i go to access it via the admin panel, i am gettin a "permission denied"... any reason why?
rocksteady,
danno~
rocksteady,
danno~
whelp, solved that issue i just posted, by actually giving my user the ability to use that extension, but now i'm getting this new error:
"Error: Could not load model extension/blog!"
hmmm... help?
rocksteady,
danno~
"Error: Could not load model extension/blog!"
hmmm... help?
rocksteady,
danno~
aaaaaaand i fixed the other error. i'm working in mac os x's Coda application. for some reason it didn't upload the extension directory along with the blog.php file . after i opened up my server via FTP i could see that it wasn't there. after correctly uploading the file it said was missing, all is well.
sometimes it takes just posting that you have a problem to figure it out yourself
thanks again
rocksteady,
danno~
sometimes it takes just posting that you have a problem to figure it out yourself
thanks again
rocksteady,
danno~
seths,
Nice job with this extension, it's really useful. Also you had great documentation.
What do you think this would take to add an RSS feed to the blog? And does anyone else think this would be useful?
Nice job with this extension, it's really useful. Also you had great documentation.
What do you think this would take to add an RSS feed to the blog? And does anyone else think this would be useful?
Jordan Austin
I don't think it would take much. I just don't have a ton of time to work on it just now. But since I haven't gotten any other requests I will do my best to include it in the next release. I was hoping for some bug fixes to include, but I've yet to get any bug reports...
I'm testing it out right now. It's really cut and dry. So hopefully you won't get any bug reportsseths wrote:I don't think it would take much. I just don't have a ton of time to work on it just now. But since I haven't gotten any other requests I will do my best to include it in the next release. I was hoping for some bug fixes to include, but I've yet to get any bug reports...
Jordan Austin
Great Module, I got it working fine.
Now where to put it. I plan on writing on it alot. Therefore, I would like to give it's own page under the Information area. Is there a way to create a new page under Category> Information> Insert, and use the source code setting in the WYSIWYG to show the blog.php file?
Now where to put it. I plan on writing on it alot. Therefore, I would like to give it's own page under the Information area. Is there a way to create a new page under Category> Information> Insert, and use the source code setting in the WYSIWYG to show the blog.php file?
Who is online
Users browsing this forum: No registered users and 86 guests