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

Additional Custom Fields for Category views

Started by derek webster, June 19, 2019, 11:58:50 AM

Previous topic - Next topic

derek webster

Hi I can't seem to find any information on this elsewhere on the forum - I'm on Joomla 3.9 and VM 3.4.2.
I'd like the ability to add extra information into the Category View - for example, Additional Meta Information, secondary description, associated downloads and various on/off checkboxes sop that I can control front end display logic within a category.

I've done this extensively with old sites using VM1.5 but I hardcoded into the browse code and category queries.

I now want to do a similar thing with VM3 but in a way that is future proof and updatable.

What would be the best way to do this? Is it feasible to have a custom plugin written that may give me this functionality?

Ive achieved a workaround by using a component builder that references the Categories by ID (then I just run a query to pull in the cat info to my category) but this requires me to use a separate component for any "additional fields" I want to use for a category.

Even if There was a way of bringing this components functionality "into" the category editing page that would be a massive step forward.

Any advice would be welcomed





Studio 42

Hi,
a solution is to do an override in the back-end template to add additional fields.
You have to create a plugin to fill a DB table on save.
Note that because you need an ID, the field display can only be rendered after saving 1 time the category
In the front, you can then do an override to get this informations to, using another override.
For front you can create a static function call for eg. $catInfo = mycategoryplugin::information($id); to get the informations from the plugin
Quick and not too dirty

derek webster

#2
Sorry For the late reply - This is extremely helpful. I'm familiar with doing template overrides for admin pages but not creating the plugin to fill in a DB on save.
I'll look for someone to help me on this - unless its something you'd consider working on? paid of course!

Actually I'll post this in the Commercial Jobs section - if you don't mind

Many thanks

derek webster

Actually a similar plugin for the Product Pages would also be required. Im finding the Custom fields VERY cumbersome to manage - especially groups - if we add a new field to a group it does not update in the product.

Jörgen

I gave up using groups, since this is only valid when You import the group for the first time. Using a template product (hidden parent) You can get what You want. All the custom fields from the parent are inherited and changing the parent will update ALL the children. This is when You get used to it quite useful. Overriding and hiding on a product basis is possible if You want that too.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

PRO

You should download some free product plugins, and see how they work.

I have plugins for my site with 6 fields. You can make more or less unlimited fields (parameters) within a single instance of a customfield.