Create new tab

  • Posts: 36
  • Thank you received: 0
9 years 6 months ago #217402

-- url of the page with the problem -- : solishop.fr/produits/boissons/vins/sainte-croix-du-mont-2013
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.3

Hello,

Here is a product page :
solishop.fr/produits/boissons/vins/sainte-croix-du-mont-2013

Under the picture there are 4 tabs (I don't know if it is the right word) and I want to add one.
It will contains the composition of the product. So it need to be fill by the vendor.

Is it possible to do it with Hikashop ? How can I do it ?

Thanks

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

  • Posts: 26232
  • Thank you received: 4035
  • MODERATOR
9 years 6 months ago #217404

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 36
  • Thank you received: 0
9 years 6 months ago #217494

Thanks

But with that will it create a slot for the vendor when he fill his product page ?

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

  • Posts: 26232
  • Thank you received: 4035
  • MODERATOR
9 years 6 months ago #217496

Hi,

If the product have "specifications" (thanks to product custom field) ; yes, the tab "specification" will be added.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 36
  • Thank you received: 0
9 years 6 months ago #217508

Where can I see if the product have "specification" ?
Here is the website where I test everything : avice.net
login : demo
password : demo

I put a tab call "Composition" and created a custom field.
And I want that the content of the field in the tabs Composition and not "Caractéristiques" (Which is the "specification" one )

And I wonder if it is possible that it appears in the product page like the description part. With a text editor ??

Thanks for your quick answer !

Last edit: 9 years 6 months ago by newt.

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

  • Posts: 83766
  • Thank you received: 13555
  • MODERATOR
9 years 6 months ago #217513

Sure. You'll get a text editor on the product edition page of the vendor if you set the type of the custom field to WYSIWYG.

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

  • Posts: 36
  • Thank you received: 0
9 years 6 months ago #217691

Thank you very much !

But can I put the content in the tab "Composition" that I created and not in the default tab "Specification" that I rename "Caractéristiques" ?

[EDIT]

I managed to publish the content in the tab that I wanted to :)
But it is still on the other tab...
And my knowledge in php are too low to understand the code...

<div class="hikashop_tabs_content" id="hikashop_show_tabular_specification">
<?php
$this->setLayout('show_block_dimensions');
echo $this->loadTemplate();
if(!empty($this->fields)){
$this->setLayout('show_block_custom_main');
echo $this->loadTemplate();
}
?>

</div>
<div class="hikashop_tabs_content" id="hikashop_show_tabular_composition">
<?php
if (!empty ($this->element->product_composition))
{
echo $this->element->product_composition;
}
?>
</div>

What can I do to not include the element product_composition ??

Last edit: 9 years 6 months ago by newt.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 6 months ago #217733

Hi,

You have to remove that code:

if(!empty($this->fields)){
$this->setLayout('show_block_custom_main');
echo $this->loadTemplate();
}

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

  • Posts: 36
  • Thank you received: 0
9 years 6 months ago #217802

But if I do this It will remove all the content ...

zupimages.net/viewer.php?id=15/43/2dwz.png

All I want is to erase the "Composition" Line and keep the others, is it possible ?

Last edit: 9 years 6 months ago by newt.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 6 months ago #217803

Hi,

So you have to let this code in place and edit the view "product / show_block_custom_main" and add the code:

if($fieldName == 'YOUR_FIELDNAME')continue;
Right after the php foreach, and of course replace ""YOUR_FIELDNAME" by the fieldname of the desired custom field.

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

  • Posts: 36
  • Thank you received: 0
9 years 6 months ago #217914

It's working !
Thank you very much !

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

Time to create page: 0.097 seconds
Powered by Kunena Forum