- Posts: 68
- Thank you received: 0
Custom fields - not visible when the value "0"
12 years 6 months ago #150955
by kopretina
Custom fields - not visible when the value "0" was created by kopretina
Hi,
I would like to have possibility to setup in custom fields value="0" and display this field on front-end and also at back-end side of eshop.
For price comparator I need to set up value "0" for availability.
Availability zero means that the goods is on stock.
Could you please, help me to solve this problem?
Best regards
I would like to have possibility to setup in custom fields value="0" and display this field on front-end and also at back-end side of eshop.
For price comparator I need to set up value "0" for availability.
Availability zero means that the goods is on stock.
Could you please, help me to solve this problem?
Best regards
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 6 months ago #150962
by Mohamed Thelji
Replied by Mohamed Thelji on topic Custom fields - not visible when the value "0"
Hello,
I didn't totally understood what you wanted to do with your custom field, can give me more information about it ?
Thanks.
I didn't totally understood what you wanted to do with your custom field, can give me more information about it ?
Thanks.
Please Log in or Create an account to join the conversation.
12 years 5 months ago #151019
by kopretina
Replied by kopretina on topic Custom fields - not visible when the value "0"
I need to have possibility to full fill the value of the custom field which is equal to zero and display this field on back-end and front-end side of eshop.
Now, when the value = 0, the custom field is not display.
See attachement
Now, when the value = 0, the custom field is not display.
See attachement
Please Log in or Create an account to join the conversation.
12 years 5 months ago #151288
by Xavier
Replied by Xavier on topic Custom fields - not visible when the value "0"
Hi,
Can you try to set a different value where the title is equal to "0" ?
It's a temporary fix, the customer will see "0" but the value is something else.
Can you try to set a different value where the title is equal to "0" ?
It's a temporary fix, the customer will see "0" but the value is something else.
Please Log in or Create an account to join the conversation.
12 years 5 months ago #151295
by kopretina
Replied by kopretina on topic Custom fields - not visible when the value "0"
I realy talk about value. When the value is setup to "0", the title can be anything, than this exact item with value=0 is not visible on the FE even on BE.
The title is not case. I don´t find solutin for title.
The title is not case. I don´t find solutin for title.
Please Log in or Create an account to join the conversation.
12 years 5 months ago #151332
by Xavier
Replied by Xavier on topic Custom fields - not visible when the value "0"
Hi,
Thanks to edit the view "product / show_block_custom_main" and replace:
By:
Thanks to edit the view "product / show_block_custom_main" and replace:
Code:
if (!empty ($value)) {
Code:
if (!empty ($value) || $value == 0) {
The following user(s) said Thank You: kopretina
Please Log in or Create an account to join the conversation.
12 years 5 months ago #151411
by kopretina
Replied by kopretina on topic Custom fields - not visible when the value "0"
Thank you very much. Works perfectly.
Please Log in or Create an account to join the conversation.
12 years 3 weeks ago #170532
by kopretina
Replied by kopretina on topic Custom fields - not visible when the value "0"
I am back with question concerning the value of custom fields, which is equal to "0".
It is work perfectly for main produkt. The problem is with variants.
When the value of custom field is equal to zero, the field is not display. When the value is not equal to zero, it si work for variatns well.
Could you help me with this? How I can correct the code to display the custom fields also for variants correctly.
Thank you.
It is work perfectly for main produkt. The problem is with variants.
When the value of custom field is equal to zero, the field is not display. When the value is not equal to zero, it si work for variatns well.
Could you help me with this? How I can correct the code to display the custom fields also for variants correctly.
Thank you.
Please Log in or Create an account to join the conversation.
12 years 3 weeks ago #170589
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom fields - not visible when the value "0"
Hi,
Can you please provide us your :
- HikaShop version number
- Configuration of your (product) custom field (screenshot is good)
- Some link to some product page, if possible.
We will have to reproduce your configuration in our side in order to fix it.
Regards,
Can you please provide us your :
- HikaShop version number
- Configuration of your (product) custom field (screenshot is good)
- Some link to some product page, if possible.
We will have to reproduce your configuration in our side in order to fix it.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
12 years 3 weeks ago #170613
by kopretina
Replied by kopretina on topic Custom fields - not visible when the value "0"
Hi,
Hikashop version: Bussines 2.3.2
Configuration of product: in attachement
Link to the page, where si not used custom field with value zero and the item "dostupnost" is display well.
sperky.webhotovo.eu/subdom/sperky/index....ranta-livia-corsetti
Link to page, where is used custom field with value zero and the item "dostupnost" is not display well for variants.
In main produkt you see dostupnost "skladem" and value of this is zero. Then you clik on variants. "černá/L" is display well. Then clik on the first one (bílá/M) and the custom field "dostupnos" is not display.
sperky.webhotovo.eu/subdom/sperky/index....6301-julia-obsessive
The web is for the moment on working domain.
Hikashop version: Bussines 2.3.2
Configuration of product: in attachement
Link to the page, where si not used custom field with value zero and the item "dostupnost" is display well.
sperky.webhotovo.eu/subdom/sperky/index....ranta-livia-corsetti
Link to page, where is used custom field with value zero and the item "dostupnost" is not display well for variants.
In main produkt you see dostupnost "skladem" and value of this is zero. Then you clik on variants. "černá/L" is display well. Then clik on the first one (bílá/M) and the custom field "dostupnos" is not display.
sperky.webhotovo.eu/subdom/sperky/index....6301-julia-obsessive
The web is for the moment on working domain.
Please Log in or Create an account to join the conversation.
12 years 3 weeks ago #170717
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom fields - not visible when the value "0"
Hi,
Please override the view "product | show" (or the file "components/com_hikashop/views/products/tmpl/show.php" and replace
By:
It would fix the issue you got.
Regards,
Please override the view "product | show" (or the file "components/com_hikashop/views/products/tmpl/show.php" and replace
Code:
if(!empty($variant->$fieldName))
$variant->$fieldName = trim($variant->$fieldName);
if(!empty($variant->$fieldName)) {
Code:
if(!empty($variant->$fieldName))
$variant->$fieldName = trim($variant->$fieldName);
if(!empty($variant->$fieldName) || $variant->$fieldName === '0') {
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
12 years 3 weeks ago #170733
by kopretina
Replied by kopretina on topic Custom fields - not visible when the value "0"
Thank you very much for help. This fixed the problem.
Please Log in or Create an account to join the conversation.
Time to create page: 0.254 seconds