prestarocket-agence / classic-rocket

Classic Rocket is a rework of "classic theme". It has been built keeping in mind : performance, accessibility and SEO.
https://demoprestashop.prestarocket.com/
Other
230 stars 127 forks source link

A non well formed numeric value encountered Error in microdata-jsonld.tpl #150

Closed alexmixaylov closed 4 years ago

alexmixaylov commented 4 years ago

After installing the theme I get an error when trying to redirect on the product page Notice: A non well formed numeric value encountered row 133 "priceValidUntil": "{($smarty.now + (60*60*24*15))|date_format:"%Y-%m-%d"}", in the templates/_partials/microdata-jsonld.tpl It may fixed if convert string to integer value, for example "priceValidUntil": "{$smarty.now + (int) (60*60*24*15)|date_format:"%Y-%m-%d"}",

prestarocket commented 4 years ago

with demo prestashop product ?

alexmixaylov commented 4 years ago

with demo prestashop product ? No, with the custom product. I use PHP7.1 and turn on Debug mode. (606024*15))|date_format:"%Y-%m-%d" - this expression return string $smarty.now return integer value in PHP 7 this causes an error

prestarocket commented 4 years ago

could you create a PR on branch dev with your fix ?

alexmixaylov commented 4 years ago

OK, I have done it

prestarocket commented 4 years ago

done