- Posts: 19
- Thank you received: 0
Custom field value - characteristics
11 years 6 months ago #195450
by sorky
Custom field value - characteristics was created by sorky
-- 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:
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:
How can I set up width and height of POP UP window without overriding general CSS file?
Thank you in advance,
Sorky
-- 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:
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:
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.
11 years 6 months ago #195464
by nicolas
Replied by nicolas on topic Custom field value - characteristics
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:
And then you need to also add such code:
in the "show" file of the "product" view in the variant DIV:
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:
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:
Code:
<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">
Code:
<?php
if($this->element->deposit)
echo ''.number_format((float)$this->row->deposit, 0, '.', '').'%';
?>
Code:
<div id="hikashop_product_quantity_<?php echo $variant_name;?>" style="display:none;"><?php
2. You should instead use such code:
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.240 seconds