display custom fields depending on variant

  • Posts: 85
  • Thank you received: 2
9 years 8 months ago #169183

-- url of the page with the problem -- : boutique.blaque.nl
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.3.28

is there a way to display 2 custom fields depending on the input of a variant

you can either buy or hire a product
choosing to hire requires input start and end date
but it would be easier for the customer if you don't see those field when you want to buy the item

please explain to me what code i have to put in what file, i'm not a experienced programmer yet

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

  • Posts: 12953
  • Thank you received: 1778
9 years 8 months ago #169191

Hello,
Note that you can also restrict the display of your custom field regarding the category of your product, you'll just have to :
- Add the product where you want your custom field to display to a category
- Add that category through the "Categories" tab of your custom field configuration page.

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

  • Posts: 85
  • Thank you received: 2
9 years 8 months ago #169340

thnx, but that would mean that we have to make an extra categorie for each categorie in which we duplicate an item
isn't that more complex filling the shop, than doing the trick by programming

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

  • Posts: 81566
  • Thank you received: 13075
  • MODERATOR
9 years 8 months ago #169341

How about not using characteristics and only using custom fields ?
With the custom fields, you have an option "Display limited to" in each one of them, which allows you do hide/display them based on the value of another one of them.
That would allow you to do that without programming.
If you want to do it with characteristics, it would require at least adding custom javascript to the characteristic display (why have some documentation in our developer documentation regarding the characteristic display override).

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

  • Posts: 85
  • Thank you received: 2
9 years 8 months ago #169417

but can i give the item a specific price for hiring this way?
now i can do it by the variant

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

  • Posts: 81566
  • Thank you received: 13075
  • MODERATOR
9 years 8 months ago #169447

There is no option to change the price of the product based on the custom fields selection.
But you can change the price of the product based on the custom fields via a quantity price override plugin. We have some documentation on that on our developer page:
www.hikashop.com/support/support/documen...r-documentation.html
And you can see an example on our demo website:
demo.hikashop.com/index.php?option=com_h...show&cid=214&lang=en

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

Time to create page: 0.065 seconds
Powered by Kunena Forum