yankee Candle france Posted August 15, 2012 Share Posted August 15, 2012 Hello I've searche the forumm for hours an then worked on a few .tpl files and can not get my store hours of operation to list in simpified version of store module. I would like to add the store hours in the simplified version of the store module in prestashop 1.4.8.3 how can i do this . i tried playing with the templates in my theme files and can not get the hours to be placed after the store address and phone number . i ve tried using {include file="$tpl_dir./store_infos.tpl"} statement in the stores.tpl after <b>{if $store.phone}{l s='Phone:' js=0}</b> {$store.phone}{/if}<br> but only get the 1 line that says hours and not the full listing of days and hours as it does in the popup when module not used in simplified version. can anyone help. ? what am i missing , are there other files to change ???? Thank You in advance for any help Link to comment Share on other sites More sharing options...
ferhub Posted August 23, 2012 Share Posted August 23, 2012 Same Problem here! does anyone have an Idea? Link to comment Share on other sites More sharing options...
ferhub Posted August 23, 2012 Share Posted August 23, 2012 okay, i figured out how to show the times with this code {assign var="unserialized_data" value=$store.hours|unserialize} {foreach $unserialized_data as $raw} {$raw} <br /> {/foreach} (just add to stores.tpl) now i don't know how to add the days names..any ideas? Link to comment Share on other sites More sharing options...
ferhub Posted August 23, 2012 Share Posted August 23, 2012 {assign var=daynames value=[Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag]} {assign var="count" value=0} {assign var="unserialized_data" value=$store.hours|unserialize} {foreach $unserialized_data as $raw} {$daynames[$count]}: {$raw} <br /> {$count = $count +1} {/foreach} Hope this Helps, didnt know how to integrate the translation, but for me it works. Just add css classes or html to adapt it to your layout. if anyone knows a better solution, i'd love to see it :-) Link to comment Share on other sites More sharing options...
tdr170 Posted August 27, 2012 Share Posted August 27, 2012 (edited) For those that might be interested, here is what I ended up with after reading this so I thought I would share. Add this to the bottom of stores.tpl located in ..themes/yourtheme/ after the final closing </if> statement :. I have mine on the right to the right side of the store address so you will need to change the float and margin to your needs. <div id="StoreHours">{l s='Working Hours'}</div> <div id="StoreHours1"> {assign var=daynames value=[Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday]} {assign var="count" value=0} {assign var="unserialized_data" value=$store.hours|unserialize} {foreach $unserialized_data as $raw} {$daynames[$count]}: {$raw} <br /> {$count = $count +1} {/foreach}</div> Now add this to the stores.css file located in themes/yourtheme/css: #StoreHours { font-weight: bold; text-decoration: underline; width: 120px; height: 15px; display: block; float:right; margin: -100px 120px 0 0 } #StoreHours1 { font-weight: normal; text-decoration: none; width: 200px; height: 200px; display: block; float:right; margin: -80px 40px 0 0 } Here is a pic of how it looks: Edited August 27, 2012 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
tdr170 Posted August 28, 2012 Share Posted August 28, 2012 Wanted to report this issue has been resolved in both 1.4 & 1.5 you will need to update 2 files, stores.tpl and StoresController.php, and depending on your version maybe the stores.css file. (remove the line under heading #store_hours width:80px;) http://forge.prestashop.com/browse/PSCFV-3758 Link to comment Share on other sites More sharing options...
Recommended Posts