How to hide one custom field in checkout view?

  • Posts: 174
  • Thank you received: 2
  • Hikashop Business
6 years 3 months ago #295925

i have some different custom fields in table Order. And one of them i don't need to display in checkout window. I only need to display it in frontend order details page. So how to hide one field in checkout window? I think i need to edit some view file, but what code do i need to type for hiding X custom field?

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
6 years 3 months ago #295926

Hi,

Go in the settings of the custom field. There, turn off the "frontend" setting and make sure that the "frontend order details page" setting is activated.
That way, you'll get it in the order details page but not on the checkout.

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

  • Posts: 174
  • Thank you received: 2
  • Hikashop Business
6 years 3 months ago #295952

If frontend is off, then no-matter if "frontend order details page" is on, it still don't display this.

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
6 years 3 months ago #295960

Hello,

The solution will be to directly edit the "Show" file of your "Order" view of your front-end template via "Hikashop->Display->Views" and change that line :

if(!@$oneExtraField->field_frontcomp || empty($this->order->$fieldName))

By :
if(empty($this->order->$fieldName))

Thank you for your feedback !

PS: We just added that fix through the last HikaShop version.

The following user(s) said Thank You: arnask

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

  • Posts: 174
  • Thank you received: 2
  • Hikashop Business
6 years 3 months ago #296031

That works. Thanks.

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

Time to create page: 0.084 seconds
Powered by Kunena Forum