No specification displayed for variants

  • Posts: 2
  • Thank you received: 0
8 years 7 months ago #250300

Good Day All

I have an issue with Hika Shop Template. I can load all my variants. But when selecting a variant where the price changes I loose all specification.

Before selection





After Selection





I know that All variants can be adjusted individually within Hika Shop. But I'm using Custom Fields with Text boxes and I can not type or enter anything in this area. As shown below.





This is not a Train Smash as the variant specifications do not change, I just don't want it to change to that variant field. Is there a way I can get it to stay on default Variants.

Attachments:

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

  • Posts: 83778
  • Thank you received: 13564
  • MODERATOR
8 years 7 months ago #250309

Hi,

Yes. You want to remove the code:

if(!empty($this->fields)) {
?>
	<div id="hikashop_product_custom_info_<?php echo $variant_name;?>" style="display:none;">
		<h4><?php echo JText::_('SPECIFICATIONS');?></h4>
		<table width="100%">
<?php

			$this->fieldsClass->prefix = '';
			foreach ($this->fields as $fieldName => $oneExtraField) {
				if(empty($variant->$fieldName) && !empty($this->element->main->$fieldName)){
					$variant->$fieldName = $this->element->main->$fieldName;
				}
				if(!empty($variant->$fieldName))
					$variant->$fieldName = trim($variant->$fieldName);
				if(!empty($variant->$fieldName) || (isset($variant->$fieldName) && $variant->$fieldName === '0')) {
?>
			<tr class="hikashop_product_custom_<?php echo $oneExtraField->field_namekey;?>_line">
				<td class="key">
					<span id="hikashop_product_custom_name_<?php echo $oneExtraField->field_id;?>_<?php echo $variant_name;?>" class="hikashop_product_custom_name">
						<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
					</span>
				</td>
				<td>
					<span id="hikashop_product_custom_value_<?php echo $oneExtraField->field_id;?>_<?php echo $variant_name;?>" class="hikashop_product_custom_value">
						<?php echo $this->fieldsClass->show($oneExtraField,$variant->$fieldName); ?>
					</span>
				</td>
			</tr>
<?php
				}
			}
?>
		</table>
	</div>
<?php
		}
from the file "show" of the view "product" via the menu Display>Views.
That will remove the specification data of variants from the product page and there won't be any replacing done when you change the selected variant.

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

  • Posts: 32
  • Thank you received: 2
7 years 2 months ago #289295

I got something similar, and this don't work.

Hikashop : v3.3.0

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

  • Posts: 83778
  • Thank you received: 13564
  • MODERATOR
7 years 2 months ago #289297

Hi,

This solution for the problem in this thread definitely works.
So you must have something slightly different.
Please provide the necessary information (link to the page, screenshots of the settings of the product and of the settings of the variants) so that we can look at the situation.

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

  • Posts: 32
  • Thank you received: 2
7 years 2 months ago #289523

My issue was different, i have edited "show_default" and moved the product custom field area in the price area, this was bad : www.hikashop.com/support/forum/product-c...-display.html#289470

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

Time to create page: 0.093 seconds
Powered by Kunena Forum