This is an example to show how the tab works.
Code: Select all
<div class="tabs">
<a tab="#tab_one"><?php echo "One"; ?></a>
<a tab="#tab_two"><?php echo "Two"; ?></a>
<a tab="#tab_three"><?php echo "Three"; ?></a>
</div>
<div id="tab_one" class="page">
<table class="form">
<tr>
<td width="25%"><?php echo "This is the First Tab"; ?></td>
</tr>
</table>
</div>
<div id="tab_two" class="page">
<table class="form">
<tr>
<td width="25%"><?php echo "This is the Second Tab"; ?></td>
</tr>
</table>
</div>
<div id="tab_three" class="page">
<table class="form">
<tr>
<td width="25%"><?php echo "This is the Third Tab"; ?></td>
</tr>
</table>
</div>
<script type="text/javascript"><!--
$.tabs('.tabs a');
//--></script>
Nice =) Thank you =)
Some problems with adding data in this tab, but not in creating few tabs. I create ne tab, with custom name, create new field in admin panel and create new field in DB, but "Undefined index:
customname in /home5/savenavi/public_html/admin/model/catalog/product.php on line 93 " and i can't find way to define this. So help please =)
Some problems with adding data in this tab, but not in creating few tabs. I create ne tab, with custom name, create new field in admin panel and create new field in DB, but "Undefined index:
customname in /home5/savenavi/public_html/admin/model/catalog/product.php on line 93 " and i can't find way to define this. So help please =)
Code: Select all
92) foreach ($data['product_description'] as $language_id => $value) {
93) $this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "', customname = '" . $this->db->escape($value['customname']) . "'");
94) }
Remember to add your additional info where and if required to
admin/controller/catalog/product.php
and where and if required
admin/language/english/catalog/product.php
and where ever you want to use it in
catalog/view/theme/default/template/product/product.tpl
admin/controller/catalog/product.php
Code: Select all
$this->data['text_customname'] = $this->language->get('text_customname');
$this->data['entry_customname'] = $this->language->get('entry_name');
$this->data['column_customname'] = $this->language->get('column_customname');
admin/language/english/catalog/product.php
Code: Select all
// Entry
$_['text_customname'] = 'Custom Name';
// Column
$_['column_customname'] = 'Custom Name';
// Entry
$_['entry_customname'] = 'Custom Name:';
catalog/view/theme/default/template/product/product.tpl
Thanks for help =) when i try to submit apear this things
all what i need it's to send data from admin panel to my DB. =(
In DB table product_description I create field customname, and i try to insert in this field data, the same mathod like description field.
Code: Select all
Notice: Undefined index: customname in /home5/savenavi/public_html/admin/model/catalog/product.php on line 93
Notice: Undefined index: customname in /home5/savenavi/public_html/admin/model/catalog/product.php on line 93
Notice: Undefined index: customname in /home5/savenavi/public_html/admin/model/catalog/product.php on line 93
Warning: Cannot modify header information - headers already sent by (output started at /home5/savenavi/public_html/admin/index.php:59) in /home5/savenavi/public_html/system/engine/controller.php on line 22
In DB table product_description I create field customname, and i try to insert in this field data, the same mathod like description field.
You also have to add the new information in
admin/model/catalog/product.php
Find the affected MySQL queries in the addProduct public function addProduct - will most likely be the INSERT INTO queries but also could include the UPDATE queries.
From the error message, make sure that "customname" is defined and retrace your changes to you controller file, this is giving you the headers already sent error.
Use one of the existing fields and make sure you duplicate an change it in all you files to "customname"
admin/model/catalog/product.php
Find the affected MySQL queries in the addProduct public function addProduct - will most likely be the INSERT INTO queries but also could include the UPDATE queries.
From the error message, make sure that "customname" is defined and retrace your changes to you controller file, this is giving you the headers already sent error.
Use one of the existing fields and make sure you duplicate an change it in all you files to "customname"
You also have to add the new information in
This is line 93admin/model/catalog/product.php
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "', customname = '" . $this->db->escape($value['customname']) . "'");
Find the affected MySQL queries in the addProduct public function addProduct - will most likely be the INSERT INTO queries but also could include the UPDATE queries.
Explane please how to define this customnameFrom the error message, make sure that "customname" is defined and retrace your changes to you controller file, this is giving you the headers already sent error.
Use one of the existing fields and make sure you duplicate an change it in all you files to "customname"
I do not know how to explain this to you unless you understand the basics - it seems that you want to do something that is way above your level of expertise.
A good place for your to start will be http://php.net/manual/en/function.define.php
I unfortunately do not have the time to go trough your code to sort it out for you.
A good place for your to start will be http://php.net/manual/en/function.define.php
I unfortunately do not have the time to go trough your code to sort it out for you.
Thank You for help, this new tab "customname" it's duplicate of "description" tab.
I create "customname" field in the same DB table "product_description" where is "description" field.
I already createa a tab in catalog dirrectory, and already create fields in admin category.
I can modify this filds by modifing data in DB admin panel. But i cant modify this field from admin panel in OC.
When i write some data in OC admin panel "customname" field i recieve note about undifine index.
So i understand that i need to define.
foreach ($data['product_description'] as $language_id => $value) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "', customname = '" . $this->db->escape($value['customname']) . "'");
Please say me how to make this thngs work right. Or say me please in which file are defined description field, by my opinion all what i need to do it's to duplicate this define function.
Thanks alot for help.
I create "customname" field in the same DB table "product_description" where is "description" field.
I already createa a tab in catalog dirrectory, and already create fields in admin category.
I can modify this filds by modifing data in DB admin panel. But i cant modify this field from admin panel in OC.
When i write some data in OC admin panel "customname" field i recieve note about undifine index.
So i understand that i need to define.
foreach ($data['product_description'] as $language_id => $value) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "', customname = '" . $this->db->escape($value['customname']) . "'");
Please say me how to make this thngs work right. Or say me please in which file are defined description field, by my opinion all what i need to do it's to duplicate this define function.
Thanks alot for help.
Hi,
Want to ask, how do I add a tab on every page? Currently I have "Home", "Log in", "Account", "Basket", "Checkout" and now I want to add a "Forum" tab. Once click on the "Forum" tab, it will link to the forum I installed in my hosting.
Hope someone can help here.
Thanks,
Brandon.
Want to ask, how do I add a tab on every page? Currently I have "Home", "Log in", "Account", "Basket", "Checkout" and now I want to add a "Forum" tab. Once click on the "Forum" tab, it will link to the forum I installed in my hosting.
Hope someone can help here.
Thanks,
Brandon.
http://www.bigcurve.my
http://www.facebook.com/bigcurve
http://www.lelong.com.my/brandonyim
http://www.mudah.my/bigcurve
http://brandslife.blogspot.com
Check in
catalog/view/theme/YOURTHEME/template/common/header.tpl
in v1.4.8b lines 63-68 or so.
catalog/view/theme/YOURTHEME/template/common/header.tpl
in v1.4.8b lines 63-68 or so.
Genuine, Honest Opencart Support @ http://webvetservices.com
Who is online
Users browsing this forum: Amazon [Bot] and 75 guests