Setting up custom fields for products

Phoca Cart - complex e-commerce extension
Picannick
Phoca Member
Phoca Member
Posts: 15
Joined: 10 May 2013, 15:50
Contact:

Setting up custom fields for products

Post by Picannick »

Hi there,

I am sorry, if this question has already been answered, but I cannot find a solution. So maybe one of you can help us.

We want to create some custom fields (e.g. chechbox group or dropdownlist) with defined values, for example "Power: under 600 Watt, 600-1000 Watt, over 1000 Watt".
In the products you should be able to choose a value in the dropdown or checkboxgroup. The functionality shall be exactly as Joomla works with the article fields. We want to add a filter with this chosen values as well.

These values should not work as an option but like technical data. So like the specifications of each product, but I do not want to type it for every single product, but be able to choose from a predefined list of value. Can I reach this somehow? Maybe with Parameters and Parametervalues?

And if it is possible, then I also would like to be able to define a group of fields for a specific product category or subcategory, because different categorys need different extra fields.

I would be really pleased if somebody can help me,
Thankk you very much, kind regards
Picannick
jpeters
Phoca Professional
Phoca Professional
Posts: 225
Joined: 31 Dec 2020, 09:46

Re: Setting up custom fields for products

Post by jpeters »

the only way i currently know.. create dummie product with the atributes.
Based on the dummie product create the product and use batch to copy the product details from the dummie.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Setting up custom fields for products

Post by Jan »

Hi, yes, attributes are defined for each product, but parameters can be defined globally so you can select them in each product and not type for each product.

Jan
If you find Phoca extensions useful, please support the project
Picannick
Phoca Member
Phoca Member
Posts: 15
Joined: 10 May 2013, 15:50
Contact:

Re: Setting up custom fields for products

Post by Picannick »

Hi Jan,
thank you for your answer. I created the parameters I need and it works by now. Is it also possible to create a parameter as a textfield? So that you have this field in every product but can type in the value and not choose it from a dropdown?

Another question about the parameters:

I cannot find out how to tell the filter module only to filter the products in the active category and not to load all items (This would be really nice, because if you are in the category "Childrens clothes" and you filter by manufacturer, you dont want to see Women's or Men's clothes). And the option "Filter Category" doesn't help, because the filter nontheless loads a completely different page.

Because of this I want to integrate a javascript-based filter myself. Therefore I have to get the parameter values into the items_grid layout. Is there any way to get these values? I already tried d['parameters'] like it is for the tags but there is no result.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Setting up custom fields for products

Post by Jan »

Hi,

- textfield - for now there is no such option :-(

Parameters are displayed only on item view (product detail page), so they are not loaded in category or items view.

They are loaded this way:

Code: Select all

PhocacartParameter::getParametersRendered((int)$id, 1);
where $id is the ID of product.

Jan
If you find Phoca extensions useful, please support the project
Post Reply