News:

Looking for documentation? Take a look on our wiki

Main Menu

Use multiple category selections one page

Started by bboom, December 06, 2014, 19:33:17 PM

Previous topic - Next topic

bboom

Hi,

I'm developping an extension to sync a POS system with VirtueMart. I created a config page with multiple category selections on one page (the POS system has 99 hardcoded category id's and cannot export categories).

When I change the first category everything is displayed as the first one. I can solve the problem with ading self::$categoryTree = null; to the function categoryListTree in shopfunctions.php. I don't like core hacks, is there another option to use the vmcategory field mutliple times on one page?

I'm using:
VM 3.02
Joomla 3.3.6

Milbo

If you call it with another category Id, you should get another instance. Is the cache hash missing something?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bboom

I use the default joomla config xml, all fields have different names, I think the joomla config is working well. It could be that the cache hash is missing something.

Can I check that? how?

Milbo

I need to have more info to understand what you wanna do.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bboom

I created a config file for my component like:

<fieldset
name="artikelgroepen"
label="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEPEN_LABEL"
description="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEPEN_DESC"
addfieldpath="/administrator/components/com_virtuemart/fields"
>
<field
name="groep-nul"
type="vmcategory"
label="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_00"
description="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_00_DESC"
default=""
></field>
<field
name="groep1"
type="vmcategory"
label="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_01"
description="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_01_DESC"
default=""
></field>
<field
name="groep2"
type="vmcategory"
label="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_02"
description="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_02_DESC"
default=""
></field>
<field
name="groep3"
type="vmcategory"
label="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_03"
description="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_03_DESC"
default=""
></field>
<field
name="groep4"
type="vmcategory"
label="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_04"
description="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_04_DESC"
default=""
></field>
<field
name="groep5"
type="vmcategory"
label="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_05"
description="COM_VIRTUEMARTBRONBOEK_ARTIKELGROEP_05_DESC"
default=""
>
...


When I change a category in the settings, it is correctly saved in the database, but when I reopen the config page I get all category dropdowns with the same value as the first one.

I this enough information?

Milbo

maybe it is easier if you send me your component per pn.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/


Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/