I require a 2nd category menu to get all the necessary data from the standard categories but I need to clone the module in order to change the controller code to return the list data in the right format for a header menu.
I'm going to delete what I did earlier and try again. I beleive the issue is the admin fields it is saving the settings in are the same, so when I have my cloned module which is modified to allow for a 'Header' position it overwrites the value in the original Category module settings too.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Onto the Store side, well I have called my cloned module headermenu:
in catalog/controller/module/headermenu.php i've made changes to the class name, the language file and template
Code: Select all
<?php
class ControllerModuleHeaderMenu extends Controller {
protected $category_id = 0;
protected $path = array();
protected function index() {
$this->language->load('module/headermenu');
$this->data['heading_title'] = $this->language->get('heading_title');
$this->load->model('catalog/category');
$this->load->model('tool/seo_url');
if (isset($this->request->get['path'])) {
$this->path = explode('_', $this->request->get['path']);
$this->category_id = end($this->path);
}
$this->data['category'] = $this->getCategories(0);
$this->id = 'category';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/headermenu.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/headermenu.tpl';
} else {
$this->template = 'default/template/module/headermenu.tpl';
}
$this->render();
}
I've created a copy of the category.tpl and renamed that to headermenu.tpl
Finally I copied the category.php and changed the top line of the new catalog/model/catalog/headermenu.php
Code: Select all
<?php
class ModelCatalogHeaderMenu extends Model {
Notice: Undefined variable: headermenu in D:\www\opencart\catalog\view\theme\default\template\common\column_left.tpl on line 3
Any suggestions? Like I say, I don't want to change the model, just the controller and view so I can display a different version of the category menu with the original on my site.
you are calling
Code: Select all
$this->language->load('module/headermenu');
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Update: I found the line I had missed. I had to change the id of the module in catalog/controller/module/headermenu.php
Code: Select all
$this->id = 'headermenu';
Edit: Got this working and the reason why I was doing it is not in the Contributions section:
http://forum.opencart.com/viewtopic.php?f=23&t=14674" onclick="window.open(this.href);return false;
I have also duplicate a Module (information)
I’m trying to make a Recipes Module
I did all as instructed, I also duplicate in mySQL, "information, information_description, information_to_store" to "recipes, recipes_description, recipes_to_store"
It installs and show's to my shop
but in admin panel at dropdown menu Catalog is not showing my new module "Recipes" like Information, so I can't change the infos, only thru SQL
So, What I’m missing?!?
I have also attached my module if someone can help!
Thanks
Attachments
This is a dublicated Information Module to recipes module
Have you made sure your admin/view/template/common/header.tpl contains an entry for recipes?NatureGlass wrote:....
So, What I’m missing?!?
....
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I try to duplicate YouTube module 2 times, I have 2 different vieo movie, but not awarded. In the Administrative Panel was released after I click Install to install the module, but when pressed nothing happens EDIT. Where wrong, below I show what I do if someone is being read, let me help, I'll be grateful 3 days now to try and accomplish nothing. ThanksQphoria wrote:Yes. The same concept applies from the first post.
1. admin/controller/module/category.php
2. admin/language/english/module/category.php
3. admin/view/template/module/category.tpl
4. catalog/controller/module/category.php
5. catalog/language/english/module/category.php
6. catalog/view/theme/default/template/module/category.tpl
Copy all files
1. admin/controller/module/s_youtube.php
2. admin/language/english/module/s_youtube.php
3. admin/view/template/module/s_youtube.tpl
4. catalog/controller/module/s_youtube.php
5. catalog/language/english/module/s_youtube.php
6. catalog/view/theme/default/template/module/s_youtube.tpl
Rename to
1. admin/controller/module/reklama1.php
2. admin/language/english/module/reklama1.php
3. admin/view/template/module/reklama1.tpl
4. catalog/controller/module/reklama1.php
5. catalog/language/english/module/reklama1.php
6. catalog/view/theme/default/template/module/reklama1.tpl
=========================================================
1.OPEN - admin/controller/module/s_youtube.php
Code: Select all
<?php
#############################################################################
# ภาษาไทยจาก www.siamopencart.com ,www.thaiopencart.com #
# โดย Somsak2004 วันที่ 29 มกราคม 2553 #
#############################################################################
# โดยการสนับสนุนจาก #
# Unitedsme.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์ จดโดเมน ระบบ Linux #
# Net-LifeStyle.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์์ จดโดเมน ระบบ Linux #
# SiamWebThai.com : SEO ขั้นเทพ โปรโมทเว็บขั้นเซียน ออกแบบ พัฒนาเว็บไซต์ / ตามความต้องการ และถูกใจ Google #
#############################################################################
class ControllerModuleSyoutube extends Controller {
private $error = array();
public function index() {
$this->load->language('module/s_youtube');
$this->document->title = $this->language->get('heading_title');
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validate())) {
$this->model_setting_setting->editSetting('s_youtube', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->redirect($this->url->https('extension/module'));
}
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['text_enabled'] = $this->language->get('text_enabled');
$this->data['text_disabled'] = $this->language->get('text_disabled');
$this->data['text_left'] = $this->language->get('text_left');
$this->data['text_right'] = $this->language->get('text_right');
$this->data['entry_code'] = $this->language->get('entry_code');
$this->data['entry_help'] = $this->language->get('entry_help');
$this->data['entry_version_status'] = $this->language->get('entry_version_status');
$this->data['entry_author'] = $this->language->get('entry_author');
$this->data['entry_position'] = $this->language->get('entry_position');
$this->data['entry_status'] = $this->language->get('entry_status');
$this->data['entry_sort_order'] = $this->language->get('entry_sort_order');
$this->data['button_save'] = $this->language->get('button_save');
$this->data['button_cancel'] = $this->language->get('button_cancel');
$this->data['tab_general'] = $this->language->get('tab_general');
if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} else {
$this->data['error_warning'] = '';
}
if (isset($this->error['sort_order'])) {
$this->data['error_sort_order'] = $this->error['sort_order'];
} else {
$this->data['error_sort_order'] = '';
}
if (isset($this->error['code'])) {
$this->data['error_code'] = $this->error['code'];
} else {
$this->data['error_code'] = '';
}
$this->document->breadcrumbs = array();
$this->document->breadcrumbs[] = array(
'href' => $this->url->https('common/home'),
'text' => $this->language->get('text_home'),
'separator' => FALSE
);
$this->document->breadcrumbs[] = array(
'href' => $this->url->https('extension/module'),
'text' => $this->language->get('text_module'),
'separator' => ' :: '
);
$this->document->breadcrumbs[] = array(
'href' => $this->url->https('module/s_youtube'),
'text' => $this->language->get('heading_title'),
'separator' => ' :: '
);
$this->data['action'] = $this->url->https('module/s_youtube');
$this->data['cancel'] = $this->url->https('extension/module');
if (isset($this->request->post['s_youtube_position'])) {
$this->data['s_youtube_position'] = $this->request->post['s_youtube_position'];
} else {
$this->data['s_youtube_position'] = $this->config->get('s_youtube_position');
}
if (isset($this->request->post['s_youtube_status'])) {
$this->data['s_youtube_status'] = $this->request->post['s_youtube_status'];
} else {
$this->data['s_youtube_status'] = $this->config->get('s_youtube_status');
}
if (isset($this->request->post['s_youtube_sort_order'])) {
$this->data['s_youtube_sort_order'] = $this->request->post['s_youtube_sort_order'];
} else {
$this->data['s_youtube_sort_order'] = $this->config->get('s_youtube_sort_order');
}
if (isset($this->request->post['s_youtube_code'])) {
$this->data['s_youtube_code'] = $this->request->post['s_youtube_code'];
} else {
$this->data['s_youtube_code'] = $this->config->get('s_youtube_code');
}
$this->template = 'module/s_youtube.tpl';
$this->children = array(
'common/header',
'common/footer'
);
$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
}
private function validate() {
if (!$this->user->hasPermission('modify', 'module/s_youtube')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if (!$this->request->post['s_youtube_sort_order']) {
$this->error['sort_order'] = $this->language->get('error_sort_order');
}
if (!$this->request->post['s_youtube_code']) {
$this->error['code'] = $this->language->get('error_code');
}
if (!$this->error) {
return TRUE;
} else {
return FALSE;
}
}
}
?>
1.SAVE TO - admin/controller/module/reklama.php
Code: Select all
<?php
#############################################################################
# ?????????? www.siamopencart.com ,www.thaiopencart.com #
# ??? Somsak2004 ?????? 29 ?????? 2553 #
#############################################################################
# ????????????????? #
# Unitedsme.com : ??????????????????????????????? ??????? ???? Linux #
# Net-LifeStyle.com : ???????????????????????????????? ??????? ???? Linux #
# SiamWebThai.com : SEO ??????? ??????????????????? ?????? ????????????? / ?????????????? ???????? Google #
#############################################################################
class ControllerModuleSyoutube extends Controller {
private $error = array();
public function index() {
$this->load->language('module/reklama');
$this->document->title = $this->language->get('heading_title');
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validate())) {
$this->model_setting_setting->editSetting('reklama', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->redirect($this->url->https('extension/module'));
}
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['text_enabled'] = $this->language->get('text_enabled');
$this->data['text_disabled'] = $this->language->get('text_disabled');
$this->data['text_left'] = $this->language->get('text_left');
$this->data['text_right'] = $this->language->get('text_right');
$this->data['entry_code'] = $this->language->get('entry_code');
$this->data['entry_help'] = $this->language->get('entry_help');
$this->data['entry_version_status'] = $this->language->get('entry_version_status');
$this->data['entry_author'] = $this->language->get('entry_author');
$this->data['entry_position'] = $this->language->get('entry_position');
$this->data['entry_status'] = $this->language->get('entry_status');
$this->data['entry_sort_order'] = $this->language->get('entry_sort_order');
$this->data['button_save'] = $this->language->get('button_save');
$this->data['button_cancel'] = $this->language->get('button_cancel');
$this->data['tab_general'] = $this->language->get('tab_general');
if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} else {
$this->data['error_warning'] = '';
}
if (isset($this->error['sort_order'])) {
$this->data['error_sort_order'] = $this->error['sort_order'];
} else {
$this->data['error_sort_order'] = '';
}
if (isset($this->error['code'])) {
$this->data['error_code'] = $this->error['code'];
} else {
$this->data['error_code'] = '';
}
$this->document->breadcrumbs = array();
$this->document->breadcrumbs[] = array(
'href' => $this->url->https('common/home'),
'text' => $this->language->get('text_home'),
'separator' => FALSE
);
$this->document->breadcrumbs[] = array(
'href' => $this->url->https('extension/module'),
'text' => $this->language->get('text_module'),
'separator' => ' :: '
);
$this->document->breadcrumbs[] = array(
'href' => $this->url->https('module/reklama'),
'text' => $this->language->get('heading_title'),
'separator' => ' :: '
);
$this->data['action'] = $this->url->https('module/reklama');
$this->data['cancel'] = $this->url->https('extension/module');
if (isset($this->request->post['reklama_position'])) {
$this->data['reklama_position'] = $this->request->post['reklama_position'];
} else {
$this->data['reklama_position'] = $this->config->get('reklama_position');
}
if (isset($this->request->post['reklama_status'])) {
$this->data['reklama_status'] = $this->request->post['reklama_status'];
} else {
$this->data['reklama_status'] = $this->config->get('reklama_status');
}
if (isset($this->request->post['reklama_sort_order'])) {
$this->data['reklama_sort_order'] = $this->request->post['reklama_sort_order'];
} else {
$this->data['reklama_sort_order'] = $this->config->get('reklama_sort_order');
}
if (isset($this->request->post['reklama_code'])) {
$this->data['reklama_code'] = $this->request->post['reklama_code'];
} else {
$this->data['reklama_code'] = $this->config->get('reklama_code');
}
$this->template = 'module/reklama.tpl';
$this->children = array(
'common/header',
'common/footer'
);
$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
}
private function validate() {
if (!$this->user->hasPermission('modify', 'module/reklama')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if (!$this->request->post['reklama_sort_order']) {
$this->error['sort_order'] = $this->language->get('error_sort_order');
}
if (!$this->request->post['reklama_code']) {
$this->error['code'] = $this->language->get('error_code');
}
if (!$this->error) {
return TRUE;
} else {
return FALSE;
}
}
}
?>
2. OPEN - admin/language/english/module/s_youtube.php
Code: Select all
<?php
#############################################################################
# ภาษาไทยจาก www.siamopencart.com ,www.thaiopencart.com #
# โดย Somsak2004 วันที่ 29 มกราคม 2553 #
#############################################################################
# โดยการสนับสนุนจาก #
# Unitedsme.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์ จดโดเมน ระบบ Linux #
# Net-LifeStyle.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์์ จดโดเมน ระบบ Linux #
# SiamWebThai.com : SEO ขั้นเทพ โปรโมทเว็บขั้นเซียน ออกแบบ พัฒนาเว็บไซต์ / ตามความต้องการ และถูกใจ Google #
#############################################################################
// Heading
$_['heading_title'] = 'Youtube';
// Text
$_['text_module'] = 'Modules';
$_['text_success'] = 'Success: You have modified module Youtube!';
$_['text_left'] = 'Left';
$_['text_right'] = 'Right';
// Entry
$_['entry_position'] = 'Position:';
$_['entry_status'] = 'Status:';
$_['entry_code'] = 'Code:';
$_['entry_sort_order'] = 'Sort Order:';
$_['entry_version_status'] = 'Credits:';
$_['entry_author'] = 'Author Details:';
$_['entry_help'] = '<br /> *** (sample) See URL in top-right then you see black code after v= <br /> http://www.youtube.com/watch?v=<b>BA7fdSkp8ds</b> enter code is BA7fdSkp8ds ';
// Error
$_['error_permission'] = 'Warning: You do not have permission to modify module Youtube!';
$_['error_sort_order'] = 'Please enter position!';
$_['error_code'] = 'Please enter code of youtube!';
?>
2.SAVE TO - admin/language/english/module/reklama.php
Code: Select all
<?php
#############################################################################
# ภาษาไทยจาก www.siamopencart.com ,www.thaiopencart.com #
# โดย Somsak2004 วันที่ 29 มกราคม 2553 #
#############################################################################
# โดยการสนับสนุนจาก #
# Unitedsme.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์ จดโดเมน ระบบ Linux #
# Net-LifeStyle.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์์ จดโดเมน ระบบ Linux #
# SiamWebThai.com : SEO ขั้นเทพ โปรโมทเว็บขั้นเซียน ออกแบบ พัฒนาเว็บไซต์ / ตามความต้องการ และถูกใจ Google #
#############################################################################
// Heading
$_['heading_title'] = 'Reklama';
// Text
$_['text_module'] = 'Modules';
$_['text_success'] = 'Success: You have modified module Youtube!';
$_['text_left'] = 'Left';
$_['text_right'] = 'Right';
// Entry
$_['entry_position'] = 'Position:';
$_['entry_status'] = 'Status:';
$_['entry_code'] = 'Code:';
$_['entry_sort_order'] = 'Sort Order:';
$_['entry_version_status'] = 'Credits:';
$_['entry_author'] = 'Author Details:';
$_['entry_help'] = '<br /> *** (sample) See URL in top-right then you see black code after v= <br /> http://www.youtube.com/watch?v=<b>BA7fdSkp8ds</b> enter code is BA7fdSkp8ds ';
// Error
$_['error_permission'] = 'Warning: You do not have permission to modify module Youtube!';
$_['error_sort_order'] = 'Please enter position!';
$_['error_code'] = 'Please enter code of youtube!';
?>
метални табели отпечатване на флаери отпечатване на винил отпечатване на плакати
3. OPEN - admin/view/template/module/s_youtube.tpl
Code: Select all
<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
<div class="left"></div>
<div class="right"></div>
<div class="heading">
<h1 style="background-image: url('view/image/module.png');"><?php echo $heading_title; ?></h1>
<div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location='<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
</div>
<div class="content">
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
<div id="tab_general" class="page">
<table class="form">
<tr>
<td><?php echo $entry_position; ?></td>
<td><select name="s_youtube_position">
<?php if ($s_youtube_position == 'left') { ?>
<option value="left" selected="selected"><?php echo $text_left; ?></option>
<?php } else { ?>
<option value="left"><?php echo $text_left; ?></option>
<?php } ?>
<?php if ($s_youtube_position == 'right') { ?>
<option value="right" selected="selected"><?php echo $text_right; ?></option>
<?php } else { ?>
<option value="right"><?php echo $text_right; ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td><?php echo $entry_status; ?></td>
<td><select name="s_youtube_status">
<?php if ($s_youtube_status) { ?>
<option value="1" selected="selected"><?php echo $text_enabled; ?></option>
<option value="0"><?php echo $text_disabled; ?></option>
<?php } else { ?>
<option value="1"><?php echo $text_enabled; ?></option>
<option value="0" selected="selected"><?php echo $text_disabled; ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td><?php echo $entry_sort_order; ?></td>
<td><input type="text" name="s_youtube_sort_order" value="<?php echo $s_youtube_sort_order; ?>" size="1" />
<?php if ($error_sort_order) { ?>
<div class="error"><?php echo $error_sort_order; ?></div>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo $entry_code; ?></td>
<td><input type="text" name="s_youtube_code" value="<?php echo $s_youtube_code; ?>" size="10" />
<?php echo $entry_help; ?>
<?php if ($error_code) { ?>
<div class="error"><?php echo $error_code; ?></div>
<?php } ?>
</td>
</tr>
<tr>
<td style="vertical-align: middle;"><?php echo $entry_version_status ?></td>
<td style="vertical-align: middle;"><a href="http://www.siamopencart.com/">SiamOpencart.com</a></td>
</tr>
<tr>
<td><?php echo $entry_author; ?></td>
<td>Somsak2004<br />
Email: <a href="mailto:sanma2001@hotmail.com">sanma2001@hotmail.com</a><br />
Web: <a href="http://www.somsak2004.com/">http://www.somsak2004.net/</a><br />
</td>
</table>
</div>
</form>
<script type="text/javascript"><!--
$.tabs('.tabs a');
//--></script>
<?php echo $footer; ?>
3.SAVE TO - admin/view/template/module/reklama.tpl
Code: Select all
<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
<div class="left"></div>
<div class="right"></div>
<div class="heading">
<h1 style="background-image: url('view/image/module.png');"><?php echo $heading_title; ?></h1>
<div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location='<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
</div>
<div class="content">
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
<div id="tab_general" class="page">
<table class="form">
<tr>
<td><?php echo $entry_position; ?></td>
<td><select name="reklama_position">
<?php if ($reklama_position == 'left') { ?>
<option value="left" selected="selected"><?php echo $text_left; ?></option>
<?php } else { ?>
<option value="left"><?php echo $text_left; ?></option>
<?php } ?>
<?php if ($reklama_position == 'right') { ?>
<option value="right" selected="selected"><?php echo $text_right; ?></option>
<?php } else { ?>
<option value="right"><?php echo $text_right; ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td><?php echo $entry_status; ?></td>
<td><select name="reklama_status">
<?php if ($reklama_status) { ?>
<option value="1" selected="selected"><?php echo $text_enabled; ?></option>
<option value="0"><?php echo $text_disabled; ?></option>
<?php } else { ?>
<option value="1"><?php echo $text_enabled; ?></option>
<option value="0" selected="selected"><?php echo $text_disabled; ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td><?php echo $entry_sort_order; ?></td>
<td><input type="text" name="reklama_sort_order" value="<?php echo $reklama_sort_order; ?>" size="1" />
<?php if ($error_sort_order) { ?>
<div class="error"><?php echo $error_sort_order; ?></div>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo $entry_code; ?></td>
<td><input type="text" name="reklama_code" value="<?php echo $reklama_code; ?>" size="10" />
<?php echo $entry_help; ?>
<?php if ($error_code) { ?>
<div class="error"><?php echo $error_code; ?></div>
<?php } ?>
</td>
</tr>
<tr>
<td style="vertical-align: middle;"><?php echo $entry_version_status ?></td>
<td style="vertical-align: middle;"><a href="http://www.siamopencart.com/">SiamOpencart.com</a></td>
</tr>
<tr>
<td><?php echo $entry_author; ?></td>
<td>Somsak2004<br />
Email: <a href="mailto:sanma2001@hotmail.com">sanma2001@hotmail.com</a><br />
Web: <a href="http://www.somsak2004.com/">http://www.somsak2004.net/</a><br />
</td>
</table>
</div>
</form>
<script type="text/javascript"><!--
$.tabs('.tabs a');
//--></script>
<?php echo $footer; ?>
Code: Select all
<?php
#############################################################################
# ภาษาไทยจาก www.siamopencart.com ,www.thaiopencart.com #
# โดย Somsak2004 วันที่ 29 มกราคม 2553 #
#############################################################################
# โดยการสนับสนุนจาก #
# Unitedsme.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์ จดโดเมน ระบบ Linux #
# Net-LifeStyle.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์์ จดโดเมน ระบบ Linux #
# SiamWebThai.com : SEO ขั้นเทพ โปรโมทเว็บขั้นเซียน ออกแบบ พัฒนาเว็บไซต์ / ตามความต้องการ และถูกใจ Google #
#############################################################################
class ControllerModuleSyoutube extends Controller {
protected function index() {
$this->language->load('module/s_youtube');
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['youtube_extension'] = $this->language->get('youtube_extension');
$this->data['code']= html_entity_decode($this->config->get('s_youtube_code'), ENT_QUOTES);
$this->id = 's_youtube';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/s_youtube.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/s_youtube.tpl';
} else {
$this->template = 'default/template/module/s_youtube.tpl';
}
$this->render();
}
}
?>
4.SAVE TO - catalog/controller/module/reklama.php
Code: Select all
<?php
#############################################################################
# ภาษาไทยจาก www.siamopencart.com ,www.thaiopencart.com #
# โดย Somsak2004 วันที่ 29 มกราคม 2553 #
#############################################################################
# โดยการสนับสนุนจาก #
# Unitedsme.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์ จดโดเมน ระบบ Linux #
# Net-LifeStyle.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์์ จดโดเมน ระบบ Linux #
# SiamWebThai.com : SEO ขั้นเทพ โปรโมทเว็บขั้นเซียน ออกแบบ พัฒนาเว็บไซต์ / ตามความต้องการ และถูกใจ Google #
#############################################################################
class ControllerModuleSyoutube extends Controller {
protected function index() {
$this->language->load('module/reklama');
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['youtube_extension'] = $this->language->get('youtube_extension');
$this->data['code']= html_entity_decode($this->config->get('reklama_code'), ENT_QUOTES);
$this->id = 'reklama';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/reklama.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/reklama.tpl';
} else {
$this->template = 'default/template/module/reklama.tpl';
}
$this->render();
}
}
?>
Code: Select all
<?php
#############################################################################
# ภาษาไทยจาก www.siamopencart.com ,www.thaiopencart.com #
# โดย Somsak2004 วันที่ 29 มกราคม 2553 #
#############################################################################
# โดยการสนับสนุนจาก #
# Unitedsme.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์ จดโดเมน ระบบ Linux #
# Net-LifeStyle.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์์ จดโดเมน ระบบ Linux #
# SiamWebThai.com : SEO ขั้นเทพ โปรโมทเว็บขั้นเซียน ออกแบบ พัฒนาเว็บไซต์ / ตามความต้องการ และถูกใจ Google #
#############################################################################
// Heading
$_['heading_title'] = 'Movie';
$_['youtube_extension'] = '&hl=en_US&fs=1&';
?>
Code: Select all
<?php
#############################################################################
# ภาษาไทยจาก www.siamopencart.com ,www.thaiopencart.com #
# โดย Somsak2004 วันที่ 29 มกราคม 2553 #
#############################################################################
# โดยการสนับสนุนจาก #
# Unitedsme.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์ จดโดเมน ระบบ Linux #
# Net-LifeStyle.com : ผู้ให้บริการเช่าพื้นที่เว็บไซต์์ จดโดเมน ระบบ Linux #
# SiamWebThai.com : SEO ขั้นเทพ โปรโมทเว็บขั้นเซียน ออกแบบ พัฒนาเว็บไซต์ / ตามความต้องการ และถูกใจ Google #
#############################################################################
// Heading
$_['heading_title'] = 'Movie';
$_['youtube_extension'] = '&hl=en_US&fs=1&';
?>
6. OPEN -catalog/view/theme/default/template/module/s_youtube.tpl
Code: Select all
<div class="box">
<div class="top"><img src="catalog/view/theme/default/image/icon-youtube.gif" alt="" /><?php echo $heading_title; ?></div>
<div class="middle" style="text-align: center;">
<object width="160" height="115"><param name="movie" value="http://www.youtube.com/v/<?php echo $code; ?><?php echo $youtube_extension; ?>"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/<?php echo $code; ?><?php echo $youtube_extension; ?>" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="160" height="115"></embed></object>
</div>
<div class="bottom"> </div>
</div>
6.SAVE TO - catalog/view/theme/default/template/module/reklama.tpl
Code: Select all
<div class="box">
<div class="top"><img src="catalog/view/theme/default/image/icon-youtube.gif" alt="" /><?php echo $heading_title; ?></div>
<div class="middle" style="text-align: center;">
<object width="160" height="115"><param name="movie" value="http://www.youtube.com/v/<?php echo $code; ?><?php echo $youtube_extension; ?>"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/<?php echo $code; ?><?php echo $youtube_extension; ?>" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="160" height="115"></embed></object>
</div>
<div class="bottom"> </div>
</div>
метални табели отпечатване на флаери отпечатване на винил отпечатване на плакати
I'm attempting to duplicate the default Free Shipping mod in 1.3.4 & notice there is no
catalog/view/theme/default/template file
or indeed a
catalog/controller/shipping file.
Is this correct & therefore only 5 files to change to clone this mod?
Thanks.
... To have done all this as I describe it but nothing happened, however, the problem otherwiseQphoria wrote:correct
метални табели отпечатване на флаери отпечатване на винил отпечатване на плакати
In the first line (of code) in admin/controller/module/reklama.phpgergovprint wrote:
I try to duplicate YouTube module 2 times, I have 2 different vieo movie, but not awarded. In the Administrative Panel was released after I click Install to install the module, but when pressed nothing happens EDIT. Where wrong, below I show what I do if someone is being read, let me help, I'll be grateful 3 days now to try and accomplish nothing. Thanks
change
Code: Select all
class ControllerModuleSyoutube extends Controller {
Code: Select all
class ControllerModuleReklama extends Controller {
I add the popupcatagory module, when I intall and enable it ,I see it in front page,but cannot find it in admin-Category,
and I add sub-category and products,they appeared at catagory and popupcatagory same time.
I want a new module like the catagory,and can add new sub-catagory and product at the admin-catagory page.
like:
Attachments
111.JPG (6.13 KiB) Viewed 18632 times
freejoe, is this the kind of thing you want: http://theqdomain.com/ocstore/opencart_ ... _box_clonefreejoe wrote:I want to add another catagory module ,but after many many times ,it still can not solve.
I add the popupcatagory module, when I intall and enable it ,I see it in front page,but cannot find it in admin-Category,
and I add sub-category and products,they appeared at catagory and popupcatagory same time.
I want a new module like the catagory,and can add new sub-catagory and product at the admin-catagory page.
like:
I was trying to duplicate a shipping module (flat rate) based on this topic. The example given by Q in first post is for a payment module but for a shipping module some files are missing, such as catalog/controller/shipping/... and catalog/view/theme/default/template/shipping/... So I ignored them and managed to get a flat rate2 module. I installed it alright but after editing it I get the following error page:
Error: Could not load language shipping/flat22!Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/system/library/language.php:30) in /home/xxxx/public_html/system/engine/controller.php on line 27
What did I do wrong?
EDIT: Got it! It was because of that 'flat22? instead of 'flat2'... misstaping
v. 1.4.9.6 & v. 2.0.2.0
Check out this San Diego house for sale service
Users browsing this forum: No registered users and 2 guests