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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

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