Skip to main content

hide custom item fields on cart/checkout process

More
13 years 2 weeks ago #128251 by fabio.collura
-- HikaShop version -- : 2.2.0

Hi,
I have some products that I add to cart by code (using code described here ).
I have an internal custom item text field that I don't want to be displayed in front-end product page but I need to be visible in back-end order details (Product List) so I have added a little code in administrator/com_hikashop/views/order/tmpl/show_products.php

My problem is that when I disable the "Front end" option in custom field configuration the field is not displayed in front-end as expected but it is not populated in the order (field column in hikashop_order_prodauct is empty).

When I enable the "Front end" option, all works fine.

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

More
13 years 1 week ago #128304 by Mohamed Thelji
Hi,
One solution would be to use some CSS code to "hide" your custom item field through your cart/checkout process, you can for example use this CSS property :
Code:
display: none!important;

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

More
13 years 1 week ago #128307 by fabio.collura
Thank you Mohamed,
it is a good idea but the custom field content would be output in html.
My Custom field is related to internal data that should be "internal"

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

More
13 years 1 week ago #128390 by Xavier
Hi,

In your case you should use the custom fields in the table "product" instead of "item", and disable the "front-end" option.
If the item custom fields are not displayed in frontend so there is no html, and it's not sent to the order.

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

Time to create page: 0.192 seconds
Powered by Kunena Forum