About custom fields in product page on checkout page

  • Posts: 20
  • Thank you received: 0
7 years 8 months ago #265778

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6
-- Browser(s) name and version -- : Safari
-- Error-message(debug-mod must be tuned on) -- : no error

Hello!
Please, help me :)
I can not understand how to display extra fields from the product page on the order page (checkout page).
I created additional fields for items. The goods fill in all the values for additional fields. In the product page, additional fields are displayed.
I want to make additional fields with data entered for each item displayed on the checkout page, where displays the name of the product.
How to do it?

On the checkout page there is a picture of the product, product name, quantity, price. Want to get the values from the additional fields of the product. For example, I have each product added fields: material, structure, condition.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 8 months ago #265780

Hello,

When you configure a custom item field, you can set where the field will be display.
You need to check your "Display" settings for your fields.
www.hikashop.com/support/documentation/1...form.html#additional

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 20
  • Thank you received: 0
7 years 8 months ago #265815

All buttons in Yes.
For some reason, no checkout options, although if you create additional field with the order table, then there is a checkout
s.mail.ru/MxTX/QznSLiX2y
english
s.mail.ru/H9Rp/J92D43ygt

Last edit: 7 years 8 months ago by starjs.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 8 months ago #265821

Hello,

1 - Regarding your screenshot, I'm afraid that you're not using HIkaShop 3.0.1
2 - In the settings you can see in the screenshot, there is no "display" which is related directly to the Checkout.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 20
  • Thank you received: 0
7 years 8 months ago #265836

My version is 2.6.4. :)

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 8 months ago #265865

Hi,

Yes. As Jerome indicated, there is no option to activate the display of a custom product field on the cart of the checkout.
If you really want to do that, you would have to edit the file "cart" (show_block_cart for HikaShop 3.x) of the view "checkout" via the menu Display>Views and add some custom code below the product name.
Something like that:
<?php echo $row->sostoyanie; ?>

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

  • Posts: 20
  • Thank you received: 0
7 years 7 months ago #265914

Yes, I get the values using

<?php echo $row->sostoyanie; ?>"sostoyanie-old"
How to get values in my language?
With this code i can get all fields and their values.
$fieldsClass = hikashop_get('class.field');
$fields = $fieldsClass->getFields('frontcomp',$this->row,'product','checkout&task=state');
echo $fields;
Is there a way to key "sostoyanie" to to get the values their language?

Last edit: 7 years 7 months ago by starjs.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 7 months ago #265957

Hi,

The you can do like that:

$fieldsClass = hikashop_get('class.field');
$fields = $fieldsClass->getFields('frontcomp',$row,'product','checkout&task=state');
echo $fieldsClass->show($fields['sostoyanie'], $row->sostoyanie);

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

  • Posts: 20
  • Thank you received: 0
7 years 7 months ago #265991

Thank you, it works. I little added.
Since the fields can be added, and to clean, I have created a loop. Walk through the array "fieldsClass" allocate value "field_realname" - bringing to the table. Then take the array values and pass them to the show($fields, $row->KEY); - bring to the table the data obtained
Sorry for my English, just learning

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

Time to create page: 0.076 seconds
Powered by Kunena Forum