[Skip to main content](#vessel-content)

#   Restrictions for custom fields

##

- **[rndm](/forum/user/40094-rndm "View rndm's Profile")**
- [![rndm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/40094-rndm "View rndm's Profile") Topic Author
- [ Offline](/forum/user/40094-rndm)

Less More

- Posts: 40
- Thank you received: 1
-
-

5 years 4 months ago -  5 years 4 months ago [\#333410](#333410) by [rndm](/forum/user/40094-rndm "View rndm's Profile")  *[Restrictions for custom fields](/forum/27-checkout/902761-restrictions-for-custom-fields#333410 "-- HikaShop version -- : HikaShop Business 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 7  Hello! We sell hardware and optional software products to extend hardware capabilities. When customer buys both hardware and software in one order, we don't need any additional information. But sometimes customer buys software item only (so he already has the hardware). In this case we must prompt him for his hardware serial number in order to prepare the software. So I need to create a custom text field to be shown during checkout. I can restrict it to the software category - it's ok. But at the same time I want it to be hidden if there is also a hardware product in the order. Is there any way to do that?..  Thank you!")* was created by *[rndm](/forum/user/40094-rndm "View rndm's Profile")*

-- HikaShop version -- : HikaShop Business 4.4.3
-- Joomla version -- : 3.9.27
-- PHP version -- : 7

Hello!
We sell hardware and optional software products to extend hardware capabilities. When customer buys both hardware and software in one order, we don't need any additional information. But sometimes customer buys software item only (so he already has the hardware). In this case we must prompt him for his hardware serial number in order to prepare the software.
So I need to create a custom text field to be shown during checkout. I can restrict it to the software category - it's ok. But at the same time I want it to be hidden if there is also a hardware product in the order.
Is there any way to do that?..

Thank you!

Last edit: 5 years 4 months ago by [rndm](/forum/user/40094-rndm "View rndm's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMjc2MS1yZXN0cmljdGlvbnMtZm9yLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

5 years 4 months ago [\#333412](#333412) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Restrictions for custom fields](/forum/27-checkout/902761-restrictions-for-custom-fields#333412 "-- HikaShop version -- : HikaShop Business 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 7  Hello! We sell hardware and optional software products to extend hardware capabilities. When customer buys both hardware and software in one order, we don't need any additional information. But sometimes customer buys software item only (so he already has the hardware). In this case we must prompt him for his hardware serial number in order to prepare the software. So I need to create a custom text field to be shown during checkout. I can restrict it to the software category - it's ok. But at the same time I want it to be hidden if there is also a hardware product in the order. Is there any way to do that?..  Thank you!")*

Hi,

Maybe you could do something with the "payment methods" and "shipping methods" restrictions of the custom field.
For example, suppose that you set a weight in your hardware products and no weight in your software products, you could use the minimum weight / maximum weight settings of your shipping methods / payment methods, to display copies of the shipping methods / payment methods you already have. And thus, you could then add a restriction to the custom field so that it would only display for your shipping/payment methods you've configured with a max weight of 0.1. That way, once at least one hardware products is in the cart, the weight will be above that threshold and the other shipping/payment methods with a min weight of 0.1 will appear and thus the custom field won't appear.

The following user(s) said Thank You: [rndm](/forum/user/40094-rndm "View rndm's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMjc2MS1yZXN0cmljdGlvbnMtZm9yLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[rndm](/forum/user/40094-rndm "View rndm's Profile")**
- [![rndm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/40094-rndm "View rndm's Profile") Topic Author
- [ Offline](/forum/user/40094-rndm)

Less More

- Posts: 40
- Thank you received: 1
-
-

5 years 4 months ago [\#333802](#333802) by [rndm](/forum/user/40094-rndm "View rndm's Profile")  Replied by *[rndm](/forum/user/40094-rndm "View rndm's Profile")* on topic *[Restrictions for custom fields](/forum/27-checkout/902761-restrictions-for-custom-fields#333802 "-- HikaShop version -- : HikaShop Business 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 7  Hello! We sell hardware and optional software products to extend hardware capabilities. When customer buys both hardware and software in one order, we don't need any additional information. But sometimes customer buys software item only (so he already has the hardware). In this case we must prompt him for his hardware serial number in order to prepare the software. So I need to create a custom text field to be shown during checkout. I can restrict it to the software category - it's ok. But at the same time I want it to be hidden if there is also a hardware product in the order. Is there any way to do that?..  Thank you!")*

That's a clever way to solve this, thank you so much!

BTW, it's not 100% working. There are some hardware products like spare power adapters that should not affect custom field visibility, but they do since they have weight. But that's a rare situation, I'm fine with 99.9% ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMjc2MS1yZXN0cmljdGlvbnMtZm9yLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

5 years 4 months ago [\#333803](#333803) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Restrictions for custom fields](/forum/27-checkout/902761-restrictions-for-custom-fields#333803 "-- HikaShop version -- : HikaShop Business 4.4.3 -- Joomla version -- : 3.9.27 -- PHP version -- : 7  Hello! We sell hardware and optional software products to extend hardware capabilities. When customer buys both hardware and software in one order, we don't need any additional information. But sometimes customer buys software item only (so he already has the hardware). In this case we must prompt him for his hardware serial number in order to prepare the software. So I need to create a custom text field to be shown during checkout. I can restrict it to the software category - it's ok. But at the same time I want it to be hidden if there is also a hardware product in the order. Is there any way to do that?..  Thank you!")*

Hi,

Maybe you could not have a weight for them ? If the "force shipping regardless of weight" setting is activated in the HikaShop configuration is activated, the customers will still have the shipping method selection on the checkout even if the product in the cart doesn't have a weight.
Now if you need the weight as your shipping methods need it to calculate the shipping fee, then I'm out of options without coding a custom plugin. So if you can live with it, that's unnecessary.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMjc2MS1yZXN0cmljdGlvbnMtZm9yLWN1c3RvbS1maWVsZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.049 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
