Select specification within a list

Phoca Cart - complex e-commerce extension
E.P-B
Phoca Member
Phoca Member
Posts: 12
Joined: 13 Apr 2021, 21:42

Select specification within a list

Post by E.P-B »

Hi,
Is there a way to have a list of predefined specifications instead of having to type it for each product ?
To me, I can only set specification categories, but each specification in each product shall be entered manually.
Thanks in advance !
E.P-B

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Select specification within a list

Post by Jan »

Hi, only the group can be predefined, there is no such option for specification items.

Jan
If you find Phoca extensions useful, please support the project
E.P-B
Phoca Member
Phoca Member
Posts: 12
Joined: 13 Apr 2021, 21:42

Re: Select specification within a list

Post by E.P-B »

Thank you for your reply.
I've hacked subform_specifications.xml and replaced the text field by a list... Apparently, it works...
Thank you for your help !
E.P-B
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Select specification within a list

Post by Jan »

Hi, interesting, can you paste more detailed information and screenshot (maybe this can be helpful for other users too)

Thank you, Jan
If you find Phoca extensions useful, please support the project
User avatar
ehndrju
Phoca Member
Phoca Member
Posts: 43
Joined: 21 Apr 2021, 05:35

Re: Select specification within a list

Post by ehndrju »

Yes! I am also interested in the solution because the specification is very poorly configured.
There must be a reference book of characteristics.
to take the desired values from there
E.P-B
Phoca Member
Phoca Member
Posts: 12
Joined: 13 Apr 2021, 21:42

Re: Select specification within a list

Post by E.P-B »

Hi,
Here is the modified code of my customized administrator/components/com_phocacart/models/forms/subform_specifications.xml file :

Code: Select all

<field name="title" type="list" label="COM_PHOCACART_FIELD_PARAMETER_LABEL" description="COM_PHOCACART_FIELD_PARAMETER_DESC">
	<option value="Diamètre">COM_PHOCACART_EPB_SPEC_DIAMETRE</option>
	<option value="Longueur">COM_PHOCACART_EPB_SPEC_LONGUEUR</option>
	<option value="Largeur">COM_PHOCACART_EPB_SPEC_LARGEUR</option>
	<option value="Longueur de chaîne">COM_PHOCACART_EPB_SPEC_LONGUEUR_CHAINE</option>
</field>
...which replaces the following initial line 7 :

Code: Select all

<field name="title" type="text" class="inputbox" size="40" label="COM_PHOCACART_FIELD_PARAMETER_LABEL" description="COM_PHOCACART_FIELD_PARAMETER_DESC" />
It's a little bit dirty as it can't be done by template override, but at least, it works...

Ideally, as a feature request, it could be great to be able to set a specification dictionnary in a backend menu, as it's done with specification groups... I think most of shops using specification only use a small amount of different ones... thus, a list would be great...

Regards,
E.P-B
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Select specification within a list

Post by Jan »

Ok. Added to feature request list.
https://github.com/PhocaCz/PhocaCart/issues/100

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