[Solved] Add text field in product options ?

  • Posts: 36
  • Thank you received: 2
9 years 3 months ago #210031

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3

Hi,

I would like to know how can I get text field in option like this:

demo.hikashop.com/index.php/fr/hikashop/product-page/with-form

Attachments:
Last edit: 9 years 3 months ago by jplongo.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #210035

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: 36
  • Thank you received: 2
9 years 3 months ago #210100

This is what I do yesterday.

And I done it. But I would like to add text field between characteristic field.

Is it possible ?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #210104

Hi,

So you want to add custom item fields between the characteristic dropdown fields, right ?
If it is, I think that the easiest solution will be to edit the view "product / show_block_characteristics" and replace:

	echo $this->characteristic->displayFE($this->element, $this->params) . '</div>';
	return;
By:
	$html = $this->characteristic->displayFE($this->element, $this->params) . '</div>';
	// Your code to add the field values
	echo $html;
	return;

And add custom code before the "echo $html;" to replace the html by the custom item field code which can be found in the view "product / show_block_custom_item".

And in the view "product / show_default" remove the code:
			//LAYOUT show_block_custom_item
			$this->setLayout('show_block_custom_item');
			echo $this->loadTemplate();
which is displaying the custom item fields on the product detail page by default.

I think that you have all the required informations, now it require PHP knowledges to adapt that custom code :)

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

  • Posts: 36
  • Thank you received: 2
9 years 3 months ago #210673

I want to mix characteristic field with custom field.
I need it to create a complete a big form that need text entry from user and multiple price selection for item product.

Ex:

What is your size ? : xxx cm
Which hotel do you want: hotelx (xxx€)

Your price is xxx

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 3 months ago #210676

Hi,


The explanations of Xavier are for that. But as he said, it requires PHP knowledge as you need to adapt the code of the views.
If you're not a developer, you can contact our partners for a quote on such customization:
www.hikashop.com/home/our-partners.html

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

  • Posts: 36
  • Thank you received: 2
9 years 3 months ago #210810

Ok everything is ok. I did it thanks

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

Time to create page: 0.075 seconds
Powered by Kunena Forum