News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Custom field doesn't get included in customfieldsSorted; VirtueMart 4.0.7 10731

Started by Kuubs, November 13, 2022, 18:59:54 PM

Previous topic - Next topic

Kuubs

In my customfieldsSorted array there is with the new update not every custom field that is configured in the backend available. Is this a known bug? Where can i find all the known bugs? This happens in the product overveiw page, is there a way to get all the custom fields from a product? Products sublayout

This new update brought so much bugs seems like a wrong version is merged or something

EDIT: I found the problem, only cart variants get shown. Only the fields that have that specific configuration (cart variant in the custom fields config) activated gets loaded in the customfieldsSorted. This is obviously a pretty significant bug. Where can I change this to make it work again. I cannot have this custom field as a cart variant because it's not.


Wedal


Kuubs

Quote from: Wedal on March 22, 2023, 09:41:54 AM
VirtueMart 4.0.12 10777

This bug still here.

Has anyone solved this?

Yeah I worked around it by just adding the cart parameter to the custom field, even though its a description not a cart input...

And btw, what custom field is giving you trouble? Text editor? Because that content is in the customfield_param instead of the display, I don't really know why de developers change these things, but w/e

Wedal

I'll answer myself. File /administrator/components/com_virtuemart/models/customfields.php, line ~196 has this code:


foreach($productCustoms as $field){
if($cartattribute==1 and (!$field->is_cart_attribute and !$field->is_input and !$field->searchable) ){
continue;
}


I did not understand what $cartattribute is and why it is "1", but I saw that in order to get around this condition, we need to activate one of the options in the second part of the condition in the custom field settings that we want to show in the category, for example, "searchable".