Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Dropdown Store (Prestashop)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Jabba2727
Smarty n00b


Joined: 15 Dec 2015
Posts: 3

PostPosted: Tue Dec 15, 2015 10:37 am    Post subject: Dropdown Store (Prestashop) Reply with quote

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
View user's profile Send private message
elpmis
Smarty Elite


Joined: 07 Jun 2007
Posts: 321

PostPosted: Tue Dec 15, 2015 2:50 pm    Post subject: Reply with quote

I'm not familiar with Prestashop but what's about
Code:

{foreach from=$stores item='store'}
Back to top
View user's profile Send private message
Jabba2727
Smarty n00b


Joined: 15 Dec 2015
Posts: 3

PostPosted: Tue Dec 15, 2015 3:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Dec 15, 2015 10:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jabba2727
Smarty n00b


Joined: 15 Dec 2015
Posts: 3

PostPosted: Wed Dec 16, 2015 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Dec 16, 2015 11:17 pm    Post subject: Reply with quote

You must ask this the people from Prestashop
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP