|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Jabba2727 Smarty n00b
Joined: 15 Dec 2015 Posts: 3
|
Posted: Tue Dec 15, 2015 10:37 am Post subject: Dropdown Store (Prestashop) |
|
|
I want to display the dropdown list of stores that are in Preference> Stores in the file admin / themes / default / template / controllers / order / _Product-line.tpl (Zone "Products" commands sheets) so that you can select / register a value for of each product line.
To view the list I use this but the list remains empty:
<select name="choix_magasin">
{foreach $stores as $store}
<option value="{$store.id_store}">{$store.name}</option>
{/foreach}
</select}
Any idea?
Regards
[/img] |
|
Back to top |
|
elpmis Smarty Elite
Joined: 07 Jun 2007 Posts: 321
|
Posted: Tue Dec 15, 2015 2:50 pm Post subject: |
|
|
I'm not familiar with Prestashop but what's about
Code: |
{foreach from=$stores item='store'} |
|
|
Back to top |
|
Jabba2727 Smarty n00b
Joined: 15 Dec 2015 Posts: 3
|
Posted: Tue Dec 15, 2015 3:42 pm Post subject: |
|
|
Hi,
I tried
Code: |
<select>
{foreach from=$stores item='store'}
<option value="{$store.id_store}">{$store.name}</option>
{/foreach}
</select>
|
or
Code: |
<select>
{foreach from=$stores item=store}
<option value="{$store.id_store}">{$store.name}</option>
{/foreach}
</select>
|
but it doesn't work anymore |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Dec 15, 2015 10:21 pm Post subject: |
|
|
elpmis wrote: | I'm not familiar with Prestashop but what's about
Code: |
{foreach from=$stores item='store'} |
|
Please don't suggest obsolete code forms.
@Jabba2727, use template debug to see what variables are available to the template. |
|
Back to top |
|
Jabba2727 Smarty n00b
Joined: 15 Dec 2015 Posts: 3
|
Posted: Wed Dec 16, 2015 7:47 am Post subject: |
|
|
Hi AnrDaemon,
I used {debug}, $stores seems no to be available in the _product_line.tpl file.
Is it possible to make available this variable in this template file?
Thanks |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Dec 16, 2015 11:17 pm Post subject: |
|
|
You must ask this the people from Prestashop |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|