如何在 2.3.0.2 版本的打开购物车中创建新的路线/页面?
我需要创建一个具有固定内容的页面....
我创建了一个控制器和视图,但是,不工作......
有什么教程或示例让我重做一遍吗?
控制器
<?php
class ControllerProductSimulator extends Controller {
private $error = array();
public function index() {
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
$this->response->setOutput($this->load->view('product/simulator', $data));
}
}
?>
看法
<?php echo $header;
$theme_options = $registry->get('theme_options');
$config = $registry->get('config');
$page_direction = $theme_options->get( 'page_direction' );
$background_status = false;
$product_page = true;
$cart_info = $theme_options->getCart();
include('catalog/view/theme/'.$config->get($config->get('config_theme') . '_directory').'/template/new_elements/wrapper_top.tpl'); ?>
<style>
* { margin: 0; padding: 0; }
.slider {
display: block;
height: 300px;
width: 600px;
margin: auto;
margin-top: 20px;
position: relative;
}
.slider li {
list-style: none;
position: absolute;
}
.slider img {
margin: auto;
height: 100%;
width: 100%;
vertical-align: top;
}
.slider input {
display: none;
}
.slider label {
bottom: 10px;
cursor: pointer;
display: block;
height: 20%;
position: absolute;
width: 20%;
z-index: 100;
border: 3px solid white;
}
.slider li:nth-child(1) label {
background: url('catalog/view/theme/<?php echo $config->get($config->get('config_theme') . '_directory'); ?>/simulator/images/3.png');
background-size: 100%;
background-repeat: no-repeat;
}
.slider li:nth-child(2) label {
background: url('catalog/view/theme/<?php echo $config->get($config->get('config_theme') . '_directory'); ?>/simulator/images/2.png');
background-size: 100%;
background-repeat: no-repeat;
left: 125px;
}
.slider li:nth-child(3) label {
background: url('catalog/view/theme/<?php echo $config->get($config->get('config_theme') . '_directory'); ?>/simulator/images/268-1.png');
background-size: 100%;
background-repeat: no-repeat;
left: 250px;
}
.slider img {
opacity: 0;
visibility: hidden;
}
.slider li input:checked ~ img {
opacity: 1;
visibility: visible;
z-index: 10;
}
</style>
<ul class="slider" style="background-image: url('catalog/view/theme/<?php echo $config->get($config->get('config_theme') . '_directory'); ?>/simulator/default.jpg');">
<li>
<input type="radio" id="slide1" name="slide" checked>
<label for="slide1" ></label>
<img src="http://db65e810-95dd-0132-d8f0-705681baa5c1.s3-website-sa-east-1.amazonaws.com/duratex/admin/upload/ambiente_piso/270.png" />
</li>
<li>
<input type="radio" id="slide2" name="slide">
<label for="slide2"></label>
<img src="http://db65e810-95dd-0132-d8f0-705681baa5c1.s3-website-sa-east-1.amazonaws.com/duratex/admin/upload/ambiente_piso/266.png" />
</li>
<li>
<input type="radio" id="slide3" name="slide">
<label for="slide3"></label>
<img src="http://db65e810-95dd-0132-d8f0-705681baa5c1.s3-website-sa-east-1.amazonaws.com/duratex/admin/upload/ambiente_piso/268.png" />
</li>
</ul>
<?php echo $footer; ?>