0

so I'm using prestashop 1.6.1.10 and I asked the guy who made a module for some modification of the code and he told me to add these lines of code and some others in another file but the error comes from these lines. This Is a php file.

line number / code

2327 $minute = '00';

2328 if ($hour == 15) {

2329 $minute = '30';

2330 }

2331 $weekly_open_hours[$day_of_week]['hours'][$hour] = array(

2332 'id' => 'd'.$day_of_week.'h'.$hour,

2333 'text' => $hour.':'.$minute,

2334 'full_time' => str_pad($hour, 2, '0', STR_PAD_LEFT).':'.$minute':00',

2335 'disabled' => $disabled,

2336 'current' => $current,

2337 'hour' => $hour

2338 );

when I try to visualize my website again after the modifications either the Front Office page and the Back Office page of my website don't work anymore and chrome gives me this error:

"Parse error: syntax error, unexpected '':00'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in \modules\fspickupatstorecarrier\fspickupatstorecarrier.php on line 2334."

So I can't use the front office or the back office.

What can I do?

p.s.:sorry if there is any problem with the way I've written the lines of code

thanks, Lorenzo

lorepeter
  • 5
  • 4
  • I didn't know the existence of that part of the site and I didn't know what word to look for anyway but thanks for that tip. Next time if I have a sintax error I'll look there before asking. – lorepeter Mar 16 '17 at 20:09

1 Answers1

0

The change he had you make on line 2334 is missing a period.

'full_time' => str_pad($hour, 2, '0', STR_PAD_LEFT).':'.$minute':00',

should be

'full_time' => str_pad($hour, 2, '0', STR_PAD_LEFT).':'.$minute.':00',

with the period after $minute so that it will continue to concatenate the rest of the string.

Symeon Quimby
  • 820
  • 11
  • 17
  • thank you so so much! I am a beginner and these things drive me crazy, I did put a lot of attention on it but the guy who said me to make the changes sent me the error!!!! And he calls himself a programmer... – lorepeter Mar 14 '17 at 22:02
  • and he probably is, we work long hours and miss periods all the time :) – ATechGuy Mar 14 '17 at 22:17
  • The guy sent me the modification 2 times, both didn't work...and he said that they worked on his machine. I didn't want to disrespect any other programmer, i am a beginner and I know just a little bit how hard is your job – lorepeter Mar 16 '17 at 21:47