Custom field value - characteristics

  • Posts: 19
  • Thank you received: 0
10 years 5 months ago #195450

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.6

Hello,

I am using deposit plugin and I am displaying some text with deposit value on product layout.

Here is my code:

<?php
	if($this->element->deposit)
 	echo ''.number_format((float)$this->element->deposit, 0, '.', '').'%';
    ?>

But it is does not work when I change product characteristic. There is still value from previous product not from the chosen characteristic.

Second issue is that I am using Hika Shop POP UP window whith code:
<a onclick="return window.hikashop.openBox(this,null,false);" href="/component/content/article?id=8&tmpl=component">

How can I set up width and height of POP UP window without overriding general CSS file?

Thank you in advance,

Sorky

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 5 months ago #195464

Hi,

1. You should put that code in one of the "_main" divs of the show_default (or show_tabular) layouts. For example in the DIV:

<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">
And then you need to also add such code:
<?php
	if($this->element->deposit)
 	echo ''.number_format((float)$this->row->deposit, 0, '.', '').'%';
    ?>
in the "show" file of the "product" view in the variant DIV:
<div id="hikashop_product_quantity_<?php echo $variant_name;?>" style="display:none;"><?php
That way, when the system switch the data from the variant DIV to the main DIV, it will also include the deposit value.

2. You should instead use such code:
$popupHelper = hikashop_get('helper.popup');
echo $popupHelper->display(
								'JAK VYBRAT SPRÁVNĚ VELIKOST?',
								'JAK VYBRAT SPRÁVNĚ VELIKOST?',
								'/component/content/article?id=8&tmpl=component',
								'your_custom_popup_internal_name',
								750, 460, '', '', 'link'
							);

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

Time to create page: 0.044 seconds
Powered by Kunena Forum