- Posts: 36
- Thank you received: 2
[Solved] Add text field in product options ?
11 years 2 months ago - 11 years 1 month ago #210031
by jplongo
[Solved] Add text field in product options ? was created by jplongo
-- 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
-- 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
Last edit: 11 years 1 month ago by jplongo.
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210035
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Add text field in product options ?
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210100
by jplongo
Replied by jplongo on topic Add text field in product options ?
This is what I do yesterday.
And I done it. But I would like to add text field between characteristic field.
Is it possible ?
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.
11 years 2 months ago #210104
by Xavier
Replied by Xavier on topic Add text field in product options ?
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:
By:
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:
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
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:
Code:
echo $this->characteristic->displayFE($this->element, $this->params) . '</div>';
return;
Code:
$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:
Code:
//LAYOUT show_block_custom_item
$this->setLayout('show_block_custom_item');
echo $this->loadTemplate();
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.
11 years 2 months ago #210673
by jplongo
Replied by jplongo on topic Add text field in product options ?
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
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.
11 years 2 months ago #210676
by nicolas
Replied by nicolas on topic Add text field in product options ?
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
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.
11 years 2 months ago #210810
by jplongo
Replied by jplongo on topic Add text field in product options ?
Ok everything is ok. I did it thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.174 seconds