Add custom field before product name

  • Posts: 46
  • Thank you received: 0
10 years 11 months ago #135363

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

<?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>

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 11 months ago #135400

Hi,

Why can't you insert it there ?
Simply add such code and it will work:

<?php echo $this->element->COLUMN; ?>
where COLUMN is the column name of your field.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum