Adding an extra tab on the product display page

  • Posts: 22
  • Thank you received: 0
  • Hikashop Business
1 year 11 months ago #341575

-- HikaShop version -- : 4.5.1
-- Joomla version -- : 4.1.3.
-- PHP version -- : 8.0
-- Browser(s) name and version -- : Google Chrome
-- Error-message(debug-mod must be tuned on) -- : The field "gebruik" already exists in the table "product"

Hi,

I have two questions:
1. I've added an extra tab on the productpage 'Gebruik', the tab is displayed on the front-end. Now I want to add a custom field on my product edit page with the column name 'Gebruik'. I've done this twice ... The first time, I chose the wrong field type. So I removed the custom field. It said that the record was succesfully removed. I want to try this again but I get the error message: "The field "gebruik" already exists in the table "product" "
It seems that it is not completely removed ... How can I solve this?

2. The 'specifications' tab is visible, even though, it is empty, so there is no need to be shown ... I know this question is already been asked in other topics but I have the idea that what I do is right. I don't see what I am doing wrong.

I show you here a part of the show_tabular file ...

	<div id="hikashop_tabs_div">
		<ul class="hikashop_tabs_ul">
          <div class="hikashop_tabs_content" id="hikashop_show_tabular_custom">
<!-- GEBRUIK -->
</div>
<!-- DESCRIPTION TAB TITLE -->
<?php if(!empty($description) || !empty ($this->element->product_url)) {
		if(empty($selected)) $selected = 'hikashop_show_tabular_description'; ?>
			<li id="hikashop_show_tabular_description_li" class="hikashop_tabs_li ui-corner-top"><?php echo Text::_('PRODUCT_DESCRIPTION');?></li>
<?php } ?>
<!-- EO DESCRIPTION TAB TITLE -->
<!-- SPECIFICATION TAB TITLE -->
<?php if(!empty($specif_tab_content)) {
		if(empty($selected)) $selected = 'hikashop_show_tabular_specification'; ?>
			<li id="hikashop_show_tabular_specification_li" class="hikashop_tabs_li ui-corner-top"><?php echo Text::_('SPECIFICATIONS');?></li>
<?php } ?>
<!-- EO SPECIFICATION TAB TITLE -->
<!-- GEBRUIK TAB TITLE -->
<?php if(!empty($description) || !empty ($this->element->product_url)) {
		if(empty($selected)) $selected = 'hikashop_show_tabular_custom'; ?>
			<li id="hikashop_show_tabular_custom_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('Gebruik');?></li>
<?php } ?>
<!-- EO GEBRUIK TAB TITLE -->

Last edit: 1 year 11 months ago by nicolas.

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
1 year 11 months ago #341576

Hi,

1. If the type is wrong, you can just edit the field and change its type.
Now that you've deleted it, you can either:
- recreate it with another column name
- recreate it with another column name and then edit the field in the hikashop_field table and change the field_namekey to use your previous column name.
- edit the table hikashop_product's structure and delete the column with that gebruik name. Then, recreate it with the column name gebruik and it will work.

2. This means the variable $specif_tab_content is not empty.
So I would recommend adding a line:
<?php var_dump($specif_tab_content); ?>
to check what is in there.

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

Time to create page: 0.048 seconds
Powered by Kunena Forum