I have copied the standard module Featured.. Juts chaneged name and mode/view/language files.
I did this in admin section. Then I created layout with this module, set route and enabled that.
When I tried to open page by route path like: index.php?route=portfolio I get an error: The page you requested cannot be found!
Where and how to configurate path for this module?
in .../controller/whatever.php
change:
to:
in the catalog/controller/module/ and admin/controller/module/ Section.
---
If such Files would also exist in the i.E.: model/module/... Directory,
it would then look like:
Good Luck
Ernie
change:
Code: Select all
<?php
class ControllerModuleFeatured extends Controller {
Code: Select all
<?php
class ControllerModuleWhatever extends Controller {
---
If such Files would also exist in the i.E.: model/module/... Directory,
it would then look like:
Code: Select all
<?php
class ModelModuleWhatever extends Model {
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
This is my full code in front side:
<?php
It is shows conents but with error:
<?php
Code: Select all
class ControllerExtensionModuleFeatured2 extends Controller {
public function index($setting) {
$this->load->language('extension/module/featured2');
$this->load->model('catalog/product');
$this->load->model('tool/image');
$data['products'] = array();
if (!$setting['limit']) {
$setting['limit'] = 4;
}
if (!empty($setting['product'])) {
$products = array_slice($setting['product'], 0, (int)$setting['limit']);
foreach ($products as $product_id) {
$product_info = $this->model_catalog_product->getProduct($product_id);
if ($product_info) {
if ($product_info['image']) {
$image = $this->model_tool_image->resize($product_info['image'], $setting['width'], $setting['height']);
} else {
$image = $this->model_tool_image->resize('placeholder.png', $setting['width'], $setting['height']);
}
if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
} else {
$price = false;
}
if ((float)$product_info['special']) {
$special = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
} else {
$special = false;
}
if ($this->config->get('config_tax')) {
$tax = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price'], $this->session->data['currency']);
} else {
$tax = false;
}
if ($this->config->get('config_review_status')) {
$rating = $product_info['rating'];
} else {
$rating = false;
}
$data['products'][] = array(
'product_id' => $product_info['product_id'],
'thumb' => $image,
'name' => $product_info['name'],
'description' => utf8_substr(strip_tags(html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..',
'price' => $price,
'special' => $special,
'tax' => $tax,
'rating' => $rating,
'href' => $this->url->link('portfolio/portfolio', 'product_id=' . $product_info['product_id'])
);
}
}
}
if ($data['products']) {
//$this->response->setOutput($this->load->view('extension/module/featured2', $data));
return $this->load->view('extension/module/featured2', $data);
}
}
}
Attachments
Screenshot_6.png (87.66 KiB) Viewed 1773 times
Well, whatever just meant, what ever you named the file !
Ernie
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: No registered users and 23 guests