Author Topic: Override checkbox default custom field  (Read 261 times)

Huubs

  • Jr. Member
  • **
  • Posts: 262
Override checkbox default custom field
« on: October 07, 2020, 10:03:58 am »
Hello,

I have found that when you add a 1 to the database for the custom fields per product you get a disabled checkbox available in your product to disable the custom field, but not delete it. Because when you delete a custom field that value is also deleted in hte order list, so for example if you have a custom field color and Red is unavailable or sold out, you remove the color red. But that also means that the previously made orders that chose the color red do not have the color red anymore in the order itself.

So my solution was to disable the field rather than removing it altogether. But I can only have that disable checkbox if I have the override set to 1 in the database. Now I do that manually, but I want to add it so the default of the database is 1 rather than zero. Does anyone know how I can achieve this?

I tried changing the default to 1 in the database but it still gets 0 so I think somewhere in the code the making of the custom fields gets put in a 0 instaed of a 1 that I want.

Huubs

  • Jr. Member
  • **
  • Posts: 262
Re: Override checkbox default custom field
« Reply #1 on: October 12, 2020, 10:54:59 am »
Anyoen has an idea? Maybe overriding the core somewhere?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4374
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Override checkbox default custom field
« Reply #2 on: October 12, 2020, 17:10:52 pm »
In this create a customfield plugin so you can manage all this problems yourself.
You can have so many specific cases

Huubs

  • Jr. Member
  • **
  • Posts: 262
Re: Override checkbox default custom field
« Reply #3 on: October 13, 2020, 09:24:21 am »
In this create a customfield plugin so you can manage all this problems yourself.
You can have so many specific cases

No I literally only have to set the override field in the database to 1. For all custom fields. Where can I do this?

Huubs

  • Jr. Member
  • **
  • Posts: 262
Re: Override checkbox default custom field
« Reply #4 on: October 15, 2020, 15:48:41 pm »
Someone know how to do this? I absolutely need to implement this because it is a vital function right now in my webshops.