Hi,
these are the steps to change to get the double table right below the main, I think I did not duplicate anything that was not necessary.
1) - I created a custom field named "variante";
2) - I tried to follow these tips on the topic:
www.hikashop.com/forum/product-category-...m-field-product.html
For example, suppose that the field that you want to display separately is called "test", you could add the line:
if($fieldName == 'test') continue;
after the line:
foreach ($this->itemFields as $fieldName => $oneExtraField) {
in show_block_custom_item in order to skip the display of that field in show_block_custom_item.
And then you could copy past the code of that file in show_default and change the line:
if($fieldName == 'test') continue;
to:
if($fieldName != 'test') continue;
in the file "
show_block_custom_item" I get no change but in the file "
show_block_custom_main" I get what I need.
3) - I duplicated the file "show_block_custom_main" and I called it "show_block_custom_main2", I added in the file "show_block_custom_main"
foreach ($this->fields as $fieldName => $oneExtraField) {
if($fieldName == 'versione') continue;
and in the file "show_block_custom_main2"
foreach ($this->fields as $fieldName => $oneExtraField) {
if($fieldName != 'versione') continue;
4) - In the file product / show_default after the first right table I added
<!-- inizio seconda tabella di destra -->
<div id="hikashop_product_right_part2" class="hikashop_product_right_part2 <?php echo HK_GRID_COL_6; ?>">
<!-- inizio campi personalizzati -->
<?php
if(!empty($this->fields)){
$this->setLayout('show_block_custom_main2');
echo $this->loadTemplate();
}
?>
<!-- fine campi personalizzati -->
</div>
<!-- fine seconda tabella di destra -->
so everything works great. (see image "variante1.jpg")
5) - if in the files 'show_block_custom_main' and 'show_block_custom_main2' disable code
<?php //echo $this->fieldsClass->getFieldName($oneExtraField);?>
and
<?php //echo $this->fieldsClass->show($oneExtraField,$value); ?>
rightly I get disabling 2 custom blocks (see image variante2.jpg)
6) - if custom blocks are disabled, if I choose a variant, why I visualize all blocks? (see image variante3.jpg).
I hope for your help
thank you