Hello
As I found, there is a new hidden config in VirtueMart: BrowseProductCartattributeOnly and when it's true (as default), it loads only the cart attribute custom fields in category view. It's maybe for performance reasons but it broke my layout after update :)
Could you please move this setting to the GUI?
Or much more better: could you please consider adding a new switch to the custom field itself which could determine which fields should be loaded in browse layouts?
Or a dropdown:
where should it loaded: productdetails/browse/both
Hello guys.
Any thoughts on this?
+1 for this suggestion
+1 for this suggestion
Where should it be added, which tab. No Problem to add it, it is just a line and the translation, but where?
Quote from: Milbo on August 11, 2023, 22:53:39 PM
Where should it be added, which tab. No Problem to add it, it is just a line and the translation, but where?
If it's global, then to Configuration / Shopfront / Product Listing? There is a "Show product customfields in browse views" radio button, so it's a bit confusing.
This is the easy way, but I highly suggest to add it to the custom field itself, after cart attribute/cart input/searchable. It could be much more clean. In my case I run a site with ~90 custom fields, most of them are plugin based. In category view I need only 4 of them. It would be much more efficient to generate only the fields I really need than all of them.
+ 1 again for selectable in the custom field
Per customfield? Hmmm, that would change the whole loading, but interesting idea.
The logic is very simple i think.
Using a field and filter in the query for eg.
I do not have test if using != is faster in a query.
BUt having 3 values 0,1,2
0-allways
1-not in product view only
2- not in category view only
And using as filter
AND loadinview!=X depending the view should be faste to filter
BUt a problem can be in case of a module displayed in product or in category view, but this is the case currently too
lol, I know what you mean, but it your way is the gauche thinking.
I follow the simpe rule to use positive wording. So I think, the simpelst is to add an extra checkbox "show in product listing". The problem here is just to update the old ones. But we could use the current hidden config and update the old customfields, in the updater. So if you have set BrowseProductCartattributeOnly, it sets the "is_input" and "is_cart_attribute" automatically to "show in product listing".
There should be then also a logic, which disables the "add to cart" button, if you do not show the "is_input" on the browse list.
I use sometime "is_input" in my plugins to know if i display a form field or a string.
So i'm not sure, it's a good idea to use this
And some customer needed already a render of a string for eg. A tag 'Made in france', in the browser view
Yes that is the right way, currently. As intended by me.
But we could just add an extra boolean "showInBrowse" or so. And handle that clean over the new boolean. And for the migration we just use the current setting. I really like this idea. Per customfield, that makes it super transparent.