- Posts: 46
- Thank you received: 0
Add custom field before product name
- giorgiofox
-
Topic Author
- Offline
Less
More
12 years 9 months ago #135363
by giorgiofox
Add custom field before product name was created by giorgiofox
Hello,
I want to insert a custom field (text) before the title in the product page..
I need to edit the file show_default.php, but I cannot insert a custom field before the "hikashop_product_name_main"
What I need to insert instead xxxxxxxxx ?
Thanks
Giorgio
I want to insert a custom field (text) before the title in the product page..
I need to edit the file show_default.php, but I cannot insert a custom field before the "hikashop_product_name_main"
What I need to insert instead xxxxxxxxx ?
Thanks
Giorgio
Code:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.1.3
* @author hikashop.com
* @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><div id="hikashop_product_top_part" class="hikashop_product_top_part">
<?php if(!empty($this->element->extraData->topBegin)) { echo implode("\r\n",$this->element->extraData->topBegin); } ?>
<h3>
xxxxxxxxx - <span id="hikashop_product_name_main" class="hikashop_product_name_main">
<?php
if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name))
echo $this->element->main->product_name;
else
echo $this->element->product_name;
?>
</span>
<?php if ($this->config->get('show_code')) { ?>
<span id="hikashop_product_code_main" class="hikashop_product_code_main">
<?php
echo $this->element->product_code;
?>
</span>
<?php } ?>
</h3>
Please Log in or Create an account to join the conversation.
12 years 9 months ago #135400
by nicolas
Replied by nicolas on topic Add custom field before product name
Hi,
Why can't you insert it there ?
Simply add such code and it will work:
where COLUMN is the column name of your field.
Why can't you insert it there ?
Simply add such code and it will work:
Code:
<?php echo $this->element->COLUMN; ?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.158 seconds