Undefined index: field_default

  • Posts: 101
  • Thank you received: 12
11 years 7 months ago #97710

Hi,

I'm trying to make for the first time a Custom Text field for the table order.
This is the message I got when I tried to save it.

Notice: Undefined index: field_default in /home/marcoshp/public_html/site/administrator/components/com_hikashop/classes/field.php on line 904 Notice: Undefined index: field_default in /home/marcoshp/public_html/site/administrator/components/com_hikashop/classes/field.php on line 915


Here is the printscreen of the config window when saved:



Why do I get this message?
Is the field saved correctly or didn't the process get completed by this error/message?

Thanks

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #97755

Hi,

Thanks for the report. We have corrected it on our end.
Don't worry your custom field is saved correctly.

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

  • Posts: 101
  • Thank you received: 12
11 years 7 months ago #97768

Hi Xavier.

Thanks for letting me know.

A side question about custom text from the order table.
How can I exactly get the content from that field.

I tried the following and I CAN get the full_price and order_number but NOT the custom text field.

$order_id = $data->order_id;
$orderClass = hikashop_get('class.order');
$order = $orderClass->loadFullOrder($order_id,false, false);

echo "<br>Order_number: ".$order->order_number;
echo "<br>Order_fullprice: ".$order->order_full_price; 

echo "<br>order_custom: ".$order->customtext_93_13_25_34."<br>";

print_r($order);

When i use print_r I can see most order_ fields but not the custom text field.
Also in the database I can find it under _hikashop_field but NOT in _hikashop_order

The main reason I was trying to use this custom text field was to add custom intro text in the message.

Thanks.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 7 months ago #97774

"custom text" fields are the only ones which don't have any content. It's normal that you don't see it in the database.
That's because their value is the same for all the elements.
If you want to have a different content for different orders, you should use a "textarea" field instead.

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

  • Posts: 101
  • Thank you received: 12
11 years 7 months ago #97778

Hi,

You are right about that the content stays the same and that it shouldn't be in the order table.
It's logic when you think about it but sometimes my brain get fried when I'm sitting to many hours behind the computer :-)

Since I need to add text in the mail I will use something like echo JText::_('EMAIL_INTRO_MESSAGE');
That way I can also translate it :-)

If you have a better idea, please feel free to advise.

Thanks.

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

Time to create page: 0.078 seconds
Powered by Kunena Forum