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 Fields: Allow using the same Title multiple times

Started by EvanGR, August 11, 2022, 14:08:43 PM

Previous topic - Next topic

EvanGR

Hello,

I've run into this limitation multiple times. I want to use the same "Title" for two (or more) Custom Fields, but it's not permitted.

We create groups of products, where the same name custom field may mean a different thing, be implemented differently, and reside in a different Layout position.
It would be a huge relief if I could use the same names for multiple fields.

I understand each field must have a unique identifier. One way to overcome this, is to add a new optional property e.g. "Name" where we could use to name the field instead of "Title", with no restrictions.
If "Name" is filled in, it is used for display only, while keeping the "Title" field as a unique identifier behind the scenes.

Thanks for any consideration.

pinochico

#1
custom html output in template override, where you can put custom anything == you don't need new property for customfield

https://www.archivbox.cz/prenosny-box-m28-8000z00-0012

tab params and link to BS modal with icons

or you can create a language constant by custmfield ID
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

EvanGR

@pinochico Very nice website!

But I don't understand your message... I am talking about the VM Custom Fields. Especially those you select in the Add to Cart section.

pinochico

The correct solution is to make the unique identifier not the CF name, but the ID - this is the old VM disease

At this point if you want to use a custom/different/same title for multiple fields, the only option is to modify the customfield renderer with override in the template focusing on the ID and add the title as a language constant that can be the same for multiple fields.

This is how we customized the output and did not use the customfield sublayout to insert a different headline.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

EvanGR

I got it now... thanks!

Very smart. A bit technical, but smart!

balai

You can also use language constants instead of real titles

Studio 42

EvanGR : use Joomla keys
CUSTOM_TITLE_1, CUSTOM_TITLE_2, CUSTOM_TITLE_3,...
...
Then add your translation as any other Joomla language keys
CUSTOM_TITLE_1 = "my same title"
CUSTOM_TITLE_2 = "my same title"
CUSTOM_TITLE_3 = "my same title"

EvanGR

I can use joomla keys in the Title of each custom field? In the VM backend interface, where I set up the Custom Field? Really?

Quote from: Studio 42 on August 12, 2022, 17:10:11 PM
EvanGR : use Joomla keys
CUSTOM_TITLE_1, CUSTOM_TITLE_2, CUSTOM_TITLE_3,...
...
Then add your translation as any other Joomla language keys
CUSTOM_TITLE_1 = "my same title"
CUSTOM_TITLE_2 = "my same title"
CUSTOM_TITLE_3 = "my same title"