Show tabular with custom fields

  • Posts: 7
  • Thank you received: 0
9 years 1 month ago #235240

I have created some extra tabs in the show_tabular file.

<li id="hikashop_show_tabular_recept_li" onclick="displayTab('hikashop_show_tabular_recept');"><?php echo JText::_('RECEPT');?></li>

Now i have to link them to the custom fieds i have made.
I've put this code in the tabular file but it's not working:

<div class="hikashop_tabs_content" id="hikashop_show_tabular_recept">
<div id="hikashop_recept_main" class="hikashop_recept_main">
<?php
echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$this->element->recept));
?>
</div>

Can someone help me with this?

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

  • Posts: 12953
  • Thank you received: 1778
9 years 1 month ago #235244

Hello,
Can you give me more information through some screenshots for example of :
- What you have (do you have some error message? where did you add your code ?)
- What you want (what and where do you want to add your customization?)

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

  • Posts: 7
  • Thank you received: 0
9 years 1 month ago #235381

Hi Mohamed,

These are the screenshots. The custom field 'recept' i want to show when you click on the tab 'recept' on the product page.

Attachments:

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

  • Posts: 83858
  • Thank you received: 13577
  • MODERATOR
9 years 1 month ago #235404

Hi,

Could you also provide a screenshot of the settings of your custom field and a link to the product page so that we can analyse the issue ?

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

  • Posts: 7
  • Thank you received: 0
9 years 1 month ago #235434

Of course: www.zelexion.nl/ben-evers/granen/product/couscous-spelt-kamut
In the attachment the screenshot of the custom field settings.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #235456

Hi,

The code seems to be correct, even if it uses an old version of the view.
Could you try to backup your view override and remove it and add the code in the new view code ?

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

  • Posts: 7
  • Thank you received: 0
9 years 1 month ago #235844

Now i have a much bigger problem. I backed up the show_tabular file and removed it on the server. Then i have published a new show_tabular file and everything looks different. So I copied the backup show_tabular file back where it was but it doesn't work anymore. In the attachements you see the product page before and after. :(

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #235852

Hi,

Don't you have restrictions on javascript due to your text editor settings ?
If it is, in the view the "<script>" tag will be renamed to something like "<s-cript>".

So you have to change the settings or edit via FTP.

If your issue is not related on that, please give us a backend access to your website via our contact form.
Don't forget to give a link to that topic in the email.
www.hikashop.com/support/contact-us.html

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #236386

Hi,

I edited the view "product / show_block_custom_main" on your website in order to use the value of the custom field from the main product if the value of the variant is empty.

So, problem solved !

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

  • Posts: 7
  • Thank you received: 0
9 years 1 month ago #236415

Hmmm i think you didn't understand my issue. In the attachement you see how the product page looks like before i put the new code you provided in the show_tabular page. The looks of the page where great, but the tabs 'recept' and 'voedingswaarden' didn't work. I have backed up the file show_tabular and removed it from the server but the layout of the product page is a mess now. So i tried to put the backupped file back on the server again but the layout stays the same mess. It has to be as the attachement. So i have 2 problems now. The tabs are not showing (and the custom fields are now at the 'specifications page, this has to be 2 pages with the tabs 'recept' and 'voedingswaarden'). And the looks of the productpage are not what it meant to be (like the attachement).
I hope you can help me fix it again.. :(

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #236462

Hi,

Problem solved, there was missing css properties.
You potentially changed the value of the option "Front-end CSS File" in Configuration > Display > CSS.

And I added your desired tabs in the show_tabular view.

ps: We generally don't do this kind of things, it is customizations and not support ;)

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

Time to create page: 0.153 seconds
Powered by Kunena Forum