However, at the position (line 118), where it should actually begin, no regular table code is displayed. Instead, only the following PHP code: $main_html = '<table class="hikashop_product_characteristics_table">';
$config = hikashop_config();
$count = count($this->characteristics);
$i = 0;
foreach($this->characteristics as $characteristic) {
$i++;
$main_html.='<tr class="hikashop_characteristic_line_'.$characteristic->characteristic_id.'" data-characrow="'.$i.'">';
$values = array();
$switch_done = false;
if(!empty($characteristic->values)) {
foreach($characteristic->values as $k => $value){
if(!$config->get('show_out_of_stock',1)){
$hasQuantity = false;
foreach($this->element->variants as $variant){
foreach($variant->characteristics as $variantCharacteristic){
if($variantCharacteristic->characteristic_id==$value->characteristic_id){
if($variant->product_quantity != 0){
$hasQuantity = true;
}elseif( $this->element->product_id==$variant->product_id && !$switch_done){
if($characteristic->characteristic_display_method == 'dropdown'){
$id = 'hikashop_product_characteristic_'.$characteristic->characteristic_id;
$js = "hikashopUpdateVariant(document.getElementById('".$id."'));";
}else{
$id = 'hikashop_product_characteristic';
$js = "var el = document.querySelector('[name=\"".$id."\"]'); if(el) el.checked = true; hikashopUpdateVariant(el);";
}
$js = "
window.hikashop.ready( function() {".$js."});";
$switch_done = true;
}
}
}
}
if(!$hasQuantity)
continue;
}
$values[$k] = $value->characteristic_value;
}
}
if(empty($values) || !is_array($values)){
echo JText::_('NO_VALUES_FOUND');
echo '</div>';
return;
}
if(is_array($this->characteristics)){
$characteristic_id = @$characteristic->characteristic_id;
@$characteristic->characteristic_id = 'hikashop_product_characteristic';
$id = 'hikashop_product_characteristic_'.$characteristic_id;
}else{
$id = $characteristic_id = $map;
}
$selected = (int)@$characteristic->default->characteristic_id;
$this->values = array();
if(($characteristics_dynamic_display && $count > 1) || $characteristics_dynamic_display > 1) {
if($characteristic->characteristic_display_method!='radio')
$this->values[] = JHTML::_('select.option', '', JText::_('PLEASE_SELECT') );
$selected = '';
}
foreach($values as $key => $val){
if(strlen($val)!=0 && empty($val)){
$val = $val.' ';
}
if(strpos($val, '<img ') !== false)
$val = str_replace('<img ', '<img onclick="return hikashopVariantSelected(\'hikashop_product_characteristic_'.$characteristic_id.$key.'\');" ', $val);
$clean = hikashop_translate(strip_tags($val));
$optionValue = ($characteristic->characteristic_display_method != 'radio' && !empty($clean) ? $clean : hikashop_translate($val));
$obj = new stdClass;
$obj->value = $key;
$obj->text = $optionValue;
$obj->id = 'hikashop_product_characteristic_'.$characteristic_id.'_'.$key;
$this->values[] = $obj;
}
$type = 'onclick';
if($characteristic->characteristic_display_method!='radio'){
$characteristic->characteristic_display_method='generic';
$type = 'onchange';
}
$options = ' '.$type.'="return hikashopVariantSelected(this);"';
$options .=' data-characteristic="'.$i.'"';
if($count == $i)
$options .=' data-last="1"';
if($characteristic->characteristic_display_method == 'generic') {
$html = JHTML::_(
'select.'.$characteristic->characteristic_display_method.'list',
$this->values,
@$characteristic->characteristic_id,
array(
'list.attr' => 'class="'.HK_FORM_SELECT_CLASS.'" size="1"' . $options,
'list.select' => $selected,
'id' => $id,
'option.text.toHtml' => false
)
);
Unfortunately, I'm not very familiar with PHP. So, can you please help me figure out where to insert the thread?
Thank you.