In my helperForm I want to use the inbuilt shop selector. The select tree shows up, but I can't manage to set up the tplvars correctly. Strangely it doesn't matter what I put under 'name' (blabla). The checkboxes always have the name "checkBoxShopAssoconfiguration".
How do I need to set up tpl_vars, so that only the shops with an entry are selected? Let's say I have 3 shops and only in the first two shops is an entry. I thought, I have to do like this:
Question
wakabayashi
In my helperForm I want to use the inbuilt shop selector. The select tree shows up, but I can't manage to set up the tplvars correctly. Strangely it doesn't matter what I put under 'name' (blabla). The checkboxes always have the name "checkBoxShopAssoconfiguration".
``` if (Shop::isFeatureActive()) { $inputs[] = array( 'type' => 'shop', 'label' => $this->l('Shop association:'), 'name' => 'blabla', ); }
```
How do I need to set up tpl_vars, so that only the shops with an entry are selected? Let's say I have 3 shops and only in the first two shops is an entry. I thought, I have to do like this:
$vars['blabla'][1] = 1; $vars['blabla'][2] = 1; $vars['blabla'][3] = 0;
That's the way I do for lang fields, but this is not working. It selects always all 3 shops.
Thanks for your help! If something is unclear, please tell me where you need better explanation.
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now