Add input field to a product option

  • Posts: 73
  • Thank you received: 12
  • Hikaserial Subscription Hikashop Business
3 months 3 weeks ago #285262

-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.83
-- PHP version -- : 7

Hi,

I am trying to use Hikashop to build a web hosting catalog and cart workflow. In doing so, I would like to add a custom input (text) field in the hosting plans options (which are theselved products (domains) I created) for which I would like the user to specify a domain name into.

Example:

PRODUCT:
Web hosting plan ABC @10$

OPTIONS (products):
.com domain [ ] @ 5$
.ca domain [ ] @ 8$
.net domain [ ] @ 8$

I've managed to use the Custom field "Item" as a solution. This only renders on the full product view though. Not when the product is used as an option in the main product ? I've attached a screenshot to explain.

So, the question becomes, how can we display/render custom fields in product options ?

Thanks for any help!
Danny


Danny Malouin
BeNu - Digital success agency
benu.ca
Attachments:
Last Edit: 3 months 3 weeks ago by iDanny. Reason: Further explanations

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

  • Posts: 61825
  • Thank you received: 8793
  • MODERATOR
3 months 2 weeks ago #285263

Hi,

You could create custom fields of the table "item" for the main product. By default they would display below the options block.
So if you want to add them next to their corresponding option, you would have edit the "option" file of the "product" view and get the code from the show_block_custom_item view file and integrate it in the display of the options.

Last Edit: 3 months 3 weeks ago by nicolas.

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

  • Posts: 73
  • Thank you received: 12
  • Hikaserial Subscription Hikashop Business
3 months 2 weeks ago #285288

I did that but like the screenshot shows, the field doesn't appear in the product options (frontend) ?
I still will want to figure this out but for the record, I just assigned a mandate to a developper for a custom product template as this got a whole lot more complex since this AM ;-)
Thanks
Danny


Danny Malouin
BeNu - Digital success agency
benu.ca

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

  • Posts: 61825
  • Thank you received: 8793
  • MODERATOR
3 months 2 weeks ago #285293

Hi,

No, what you did is not what I said.
I said that you need to add the custom field on the main product, not on the option product.
Your screenshot specifically shows that you added the custom field to the option product not the main product.

The following user(s) said Thank You: iDanny

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

  • Posts: 73
  • Thank you received: 12
  • Hikaserial Subscription Hikashop Business
3 months 2 weeks ago #285329

Ahhhhh !!!
Yes, i see your point
Thanks, that's a great lead to where I wan't to bring this :-)


Danny Malouin
BeNu - Digital success agency
benu.ca

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

Time to create page: 0.082 seconds
Powered by Kunena Forum