Hmmm, I think I'm to stupid for that.
If you check out the following product page:
www.waffenmarti.ch/shop/our-products/pro...tole-mark-xix-2.html
I have some different types of this product. For example has the "Titanium Gold" Model other custom attributes than the "Titanium Gold with Tigerstribes". At the bottom of the page you can see a yellow box that says "Wichtige Produktehinweise". This "Wichtige Produktehinweise" should differ.
I added in the show_default.php the following code that should make the difference:
<?php
$productIsWesRequired = false;
$productIsContractRequired = false;
$productIsCriminalRecordRequired = false;
$productIsAdultRequired = false;
$productIsRestrictedForOnlineSale = false;
if(isset($this->element->main))
{
echo 'MAIN';
$productIsWesRequired = (strcasecmp($this->element->main->product_requires_wes, "yeswes") == 0) ? true : false;
$productIsContractRequired = (strcasecmp($this->element->main->product_requires_contract, "yescontract") == 0) ? true : false;
$productIsCriminalRecordRequired = (strcasecmp($this->element->main->product_requires_criminal_record_doc, "yescriminalrecord") == 0) ? true : false;
$productIsAdultRequired = (strcasecmp($this->element->main->product_requires_adult, "yesadult") == 0) ? true : false;
$productIsRestrictedForOnlineSale = (strcasecmp($this->element->main->product_restrict_online_sale, "yesrestrictedonlinesale") == 0) ? true : false;
}
else{
echo 'VARIANT';
$productIsWesRequired = (strcasecmp($this->element->product_requires_wes, "yeswes") == 0) ? true : false;
$productIsContractRequired = (strcasecmp($this->element->product_requires_contract, "yescontract") == 0) ? true : false;
$productIsCriminalRecordRequired = (strcasecmp($this->element->product_requires_criminal_record_doc, "yescriminalrecord") == 0) ? true : false;
$productIsAdultRequired = (strcasecmp($this->element->product_requires_adult, "yesadult") == 0) ? true : false;
$productIsRestrictedForOnlineSale = (strcasecmp($this->element->product_restrict_online_sale, "yesrestrictedonlinesale") == 0) ? true : false;
}
?>
<?php if ($productIsWesRequired || $productIsContractRequired || $productIsCriminalRecordRequired || $productIsAdultRequired || $productIsRestrictedForOnlineSale) { ?>
<div id="hikashop_product_custom_info_main" class="hikashop_product_custom_info_main">
<table style="border-color: #ff0000; border-width: 2px; border-style: solid;" border="2" cellpadding="10">
<tbody>
<tr>
<td style="border-style: solid; border-width: 1px; background-color: #ffff00;">
<h2><strong><span style="color: #000000;"><a name="anch_important_product_notice"></a><?php echo JText::_('PRODUCT_ADDITIONAL_INFORMATION_TITLE') ?></span></strong></h2>
<?php if( ($productIsContractRequired || $productIsCriminalRecordRequired || $productIsAdultRequired) && !$productIsRestrictedForOnlineSale) { ?>
<p><strong><span style="color: #000000;"><a href="anmelden-abmelden.html"><?php echo JText::_('PRODUCT_LOGIN_TO_SHOP') ?></a><?php echo JText::_('PRODUCT_SOLD_ONLY_TO_VERIFIED_CUSTOMERS') ?><br /></span></strong></p>
<?php } ?>
<ul>
<?php if($productIsRestrictedForOnlineSale) { ?>
<li><strong><span style="color: #000000;"><?php echo JText::_('PRODUCT_RESTRICTED_FOR_ONLINE_SALE') ?></span></strong></li>
<?php } ?>
<?php if($productIsAdultRequired) { ?>
<li><strong><span style="color: #000000;"><?php echo JText::_('PRODUCT_SOLD_ONLY_TO_ADULTS') ?><br /></span></strong></li>
<?php } ?>
<?php if($productIsContractRequired) { ?>
<li><strong><span style="color: #000000;"><?php echo JText::_('PRODUCT_REQUIRES_A_CONTRACT') ?><br /></span></strong></li>
<?php } ?>
<?php if($productIsWesRequired) { ?>
<li><strong><span style="color: #000000;"><?php echo JText::_('PRODUCT_REQUIRES_WES') ?><br /></span></strong></li>
<?php } ?>
<?php if($productIsCriminalRecordRequired) { ?>
<li><strong><span style="color: #000000;"><?php echo JText::_('PRODUCT_REQUIRES_CRIMINAL_RECORD') ?><br /></span></strong></li>
<?php } ?>
</ul>
<?php if($productIsCriminalRecordRequired || $productIsAdultRequired || $productIsWesRequired) { ?>
<p><strong><span style="color: #000000;"><a href="kontakt.html"><?php echo JText::_('PRODUCT_GET_IN_TOUCH_WITH_US') ?></a><?php echo JText::_('PRODUCT_WE_NEED_PAPERS_FROM_YOU') ?><br /></span></strong></p>
<?php } ?>
</td>
</tr>
</tbody>
</table>
</div>
<?php
}?>
What I want todo is in case the customer selects another "Desert Eagle Ausführungen" (Model) the yellow box with the hints shall display the custom attributes from the variant and not from the main-product. It's really difficult to explain. I hope you can understand what I want?
I found out, that somehow, the shop.php is involved since I had to add there some code I also added in the "show_block_custom_main.php". This code do not print specifications of my internal used product tags (like product_requires_wes, product_requires_contract, product_requires_criminal_record_doc, product_requires_adult, product_restrict_online_sale).
I hope you can help me out
Thanks for your help!