how do i get from custom field table order

  • Posts: 57
  • Thank you received: 1
10 years 2 months ago #172593

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.5.14-1

hi

how do i get from custom field table order
I need users to choose yes or no in order / listing.php pages
(are you satisfied with the product) choose yes or no
I did custom field in table: order. Field type: checkbox and i need user to apply yes or no in order / listing.php page see pic

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #172624

Hi,

You will have to edit the view "order / listing" and use code for the custom fields display, something like:

<?php
$fieldClass = hikashop_get('class.field');
$this->extraFields['order'] = $fieldClass->getField(29,'order');
if(!empty($this->extraFields['order'])){
	JRequest::setVar('hikashop_check_order',1);
	$this->type = 'order';
	$js = '';
	echo hikashop_getLayout('checkout', 'fields', $this->params, $js);
}
?>
Where you have to replace "29" by the id of your custom order field.

And then add code to save the order with the new params, so get the order data, when pressing "submit" get the value of the custom field and save the order thanks to the function in the order class.

It require good PHP knowledges.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum