Jump to content
neergaby95

Bagare ora in modul

Recommended Posts

Salutare, sunt nou in prestashop si am o intrebare. Cum as putea baga in fisier .tpl data si ora? Uitati sursa: http://pastebin.com/mU7idzeU

 

P.S. Vreau sa fac sa arate diferite mesaje in functie de ora, la utilizator. Spre exemplu : Daca e ora 22: "Buna seara, nume utilizator", "Buna dimineata, utilizator" , etc.. Multumesc

 

**** Imi cer scuze daca am postat in categoria gresita.

Edited by neergaby95 (see edit history)

Share this post


Link to post
Share on other sites

<?php

$config['date'] = '%I:%M %p';
$config['time'] = '%H:%M:%S';
$smarty->assign('config', $config);
$smarty->assign('yesterday', strtotime('-1 day'));

?>

 

Poti folosi "if" pentru afisare mesaje in functie de ora cu "ls"

  • Like 1

Share this post


Link to post
Share on other sites

Sunt de pe telefon si nu prea pot sa raspund.

 

incearca ceva de genu:

 

if '%H';< 22 ls={'buna ziua'}

else ls={'buna seara'}

Share this post


Link to post
Share on other sites

Ce este gresit in asta?

<?php
$config['date'] = '%I:%M %p';
$config['time'] = '%H:%M:%S';
$smarty->assign('config', $config);
$smarty->assign('yesterday', strtotime('-1 day'));
?>
int var=0;
if('%H';> 5 || '%H';< 10){
			var = l s='Buna dimineata, ';
		} else if('%H';> 10 || '%H';< 19){
			var = l s='Buna ziua, ';
		}else if('%H';> 19 || '%H';< 05){
			var = l s='Buna seara, ';
		}

{var} {$cookie->customer_firstname|escape:'htmlall':'UTF-8'}
Edited by neergaby95 (see edit history)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More