{"id":362322,"date":"2022-12-29T07:29:56","date_gmt":"2022-12-29T07:29:56","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=362322"},"modified":"2022-12-29T07:50:27","modified_gmt":"2022-12-29T07:50:27","slug":"add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/","title":{"rendered":"Add global variables to javascript objects and smarty templates using PrestaShop 1.7"},"content":{"rendered":"\n<p>In this blog, We are going to learn how we can assign global variables from the module. These assigned variables will work for javascript &amp; smarty templates.<\/p>\n\n\n\n<p><strong><em>So let&#8217;s start the practical..!<\/em><\/strong><\/p>\n\n\n\n<p>Firstly, we need to register a PrestaShop hook in an existing module or any custom module. For this practical, we have created a demo module.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$this-&gt;registerHook(&quot;actionFrontControllerSetVariables&quot;);<\/pre>\n\n\n\n<p><strong>Note: <\/strong>This hook is available from PrestaShop 1.7.5.0.<\/p>\n\n\n\n<p>Now we need to create a function related to this hook &amp; assign the required variable.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">public function hookActionFrontControllerSetVariables($params)\n{\n    $variables = array(\n        &#039;module_display_name&#039; =&gt; &#039;This text is coming from &#039;.$this-&gt;displayName,\n    ); \n\n    return $variables;    \n}<\/pre>\n\n\n\n<p>After assigning the variables you can call these assigned variables anywhere in the whole PrestaShop templates OR javascript. Let&#8217;s see the examples.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Smarty process to use assigned variables:<\/h3>\n\n\n\n<p>We have added some custom code in product.tpl to show the assigned variable data.<\/p>\n\n\n\n<p><strong>Path:<\/strong> _ROOT_DIR_\/themes\/classic\/templates\/catalog\/product.tpl<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">{* Code added for testing *}\n&lt;div class=&quot;alert alert-success&quot;&gt;\n    {$modules.wkdemo.module_display_name}\n&lt;\/div&gt;\n{* Code end *}<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"752\" height=\"565\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png\" alt=\"Selection_101\" class=\"wp-image-362323\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png 752w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101-300x225.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101-250x188.png 250w\" sizes=\"(max-width: 752px) 100vw, 752px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"531\" height=\"98\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_102.png\" alt=\"Selection_102\" class=\"wp-image-362324\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_102.png 531w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_102-300x55.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_102-250x46.png 250w\" sizes=\"(max-width: 531px) 100vw, 531px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now you can see the reflection on the product page in the front office. Check the below image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1199\" height=\"613\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Front_End.png\" alt=\"Front_End\" class=\"wp-image-362326\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Front_End.png 1199w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Front_End-300x153.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Front_End-250x128.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Front_End-768x393.png 768w\" sizes=\"(max-width: 1199px) 100vw, 1199px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Javascript process to use assigned variables:<\/h3>\n\n\n\n<p>We have added some custom code in theme.js to alert the value of the assigned variable.<\/p>\n\n\n\n<p><strong>Path:<\/strong> _ROOT_DIR_\/themes\/classic\/assets\/js\/theme.js<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$(document).ready(function() {\n    var moduleDisplayName = prestashop.modules.wkdemo.module_display_name;\n\n    alert(moduleDisplayName);\n});<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1186\" height=\"602\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_103.png\" alt=\"Selection_103\" class=\"wp-image-362328\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_103.png 1186w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_103-300x152.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_103-250x127.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_103-768x390.png 768w\" sizes=\"(max-width: 1186px) 100vw, 1186px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>Note:<\/strong> You can call the assigned variable from any Javascript file OR Smarty templates.<\/p>\n\n\n\n<p>That\u2019s all about this blog. Hope it will help you.<\/p>\n\n\n\n<p>If you are facing any issues or have any doubts about the above process, please feel free to contact us through the comment section.<\/p>\n\n\n\n<p>Also, you can explore our <a href=\"https:\/\/webkul.com\/prestashop-development\/\">PrestaShop Development Services<\/a> and a large range of quality <a href=\"https:\/\/store.webkul.com\/PrestaShop-Extensions.html\">PrestaShop Modules<\/a>.<\/p>\n\n\n\n<p>For any doubt contact us at support@webkul.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, We are going to learn how we can assign global variables from the module. These assigned variables will work for javascript &amp; smarty templates. So let&#8217;s start the practical..! Firstly, we need to register a PrestaShop hook in an existing module or any custom module. For this practical, we have created a <a href=\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":387,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2383,209],"tags":[4167,7083,12623,7733,4448,6960],"class_list":["post-362322","post","type-post","status-publish","format-standard","hentry","category-blog","category-prestashop","tag-url-in-prestashop-1-7","tag-additonal-variables","tag-analyze-prestashop-data","tag-assign-multiple-values","tag-smarty","tag-variable"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Add global variables to javascript objects and smarty templates using PrestaShop 1.7 - Webkul Blog<\/title>\n<meta name=\"description\" content=\"In this blog, We are going to learn that how we can assign global variable from the module. These assigned variable will work for javascript &amp; smarty templates.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add global variables to javascript objects and smarty templates using PrestaShop 1.7 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"In this blog, We are going to learn that how we can assign global variable from the module. These assigned variable will work for javascript &amp; smarty templates.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-29T07:29:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-29T07:50:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png\" \/>\n<meta name=\"author\" content=\"Sunny Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sunny Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/\"},\"author\":{\"name\":\"Sunny Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/82afaa5265683f080b52d639e7cdaf67\"},\"headline\":\"Add global variables to javascript objects and smarty templates using PrestaShop 1.7\",\"datePublished\":\"2022-12-29T07:29:56+00:00\",\"dateModified\":\"2022-12-29T07:50:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/\"},\"wordCount\":267,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png\",\"keywords\":[\"{url} in prestashop 1.7\",\"additonal variables\",\"analyze prestashop data\",\"assign multiple values\",\"smarty\",\"variable\"],\"articleSection\":[\"blog\",\"prestashop\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/\",\"url\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/\",\"name\":\"Add global variables to javascript objects and smarty templates using PrestaShop 1.7 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png\",\"datePublished\":\"2022-12-29T07:29:56+00:00\",\"dateModified\":\"2022-12-29T07:50:27+00:00\",\"description\":\"In this blog, We are going to learn that how we can assign global variable from the module. These assigned variable will work for javascript & smarty templates.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png\",\"width\":752,\"height\":565,\"caption\":\"Selection_101\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add global variables to javascript objects and smarty templates using PrestaShop 1.7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/82afaa5265683f080b52d639e7cdaf67\",\"name\":\"Sunny Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/71f74f424b1b289dfe7a885325f69bf2ecd11c159d2c3ee19fc5df341650df4c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/71f74f424b1b289dfe7a885325f69bf2ecd11c159d2c3ee19fc5df341650df4c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sunny Kumar\"},\"description\":\"Sunny, a Prestashop virtuoso, crafts innovative eCommerce solutions. His expertise in marketplace development is unparalleled, seamlessly integrating modules. With precision coding, Sunny creates robust online stores, ensuring a seamless user experience. His engineering prowess enhances digital retail, leaving a lasting impact on the Prestashop community.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/sunny-kumar912\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add global variables to javascript objects and smarty templates using PrestaShop 1.7 - Webkul Blog","description":"In this blog, We are going to learn that how we can assign global variable from the module. These assigned variable will work for javascript & smarty templates.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/","og_locale":"en_US","og_type":"article","og_title":"Add global variables to javascript objects and smarty templates using PrestaShop 1.7 - Webkul Blog","og_description":"In this blog, We are going to learn that how we can assign global variable from the module. These assigned variable will work for javascript & smarty templates.","og_url":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2022-12-29T07:29:56+00:00","article_modified_time":"2022-12-29T07:50:27+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png","type":"","width":"","height":""}],"author":"Sunny Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sunny Kumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/"},"author":{"name":"Sunny Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/82afaa5265683f080b52d639e7cdaf67"},"headline":"Add global variables to javascript objects and smarty templates using PrestaShop 1.7","datePublished":"2022-12-29T07:29:56+00:00","dateModified":"2022-12-29T07:50:27+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/"},"wordCount":267,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png","keywords":["{url} in prestashop 1.7","additonal variables","analyze prestashop data","assign multiple values","smarty","variable"],"articleSection":["blog","prestashop"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/","url":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/","name":"Add global variables to javascript objects and smarty templates using PrestaShop 1.7 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png","datePublished":"2022-12-29T07:29:56+00:00","dateModified":"2022-12-29T07:50:27+00:00","description":"In this blog, We are going to learn that how we can assign global variable from the module. These assigned variable will work for javascript & smarty templates.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/12\/Selection_101.png","width":752,"height":565,"caption":"Selection_101"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/add-global-variables-to-javascript-objects-and-smarty-templates-using-prestashop-1-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Add global variables to javascript objects and smarty templates using PrestaShop 1.7"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/82afaa5265683f080b52d639e7cdaf67","name":"Sunny Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/71f74f424b1b289dfe7a885325f69bf2ecd11c159d2c3ee19fc5df341650df4c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/71f74f424b1b289dfe7a885325f69bf2ecd11c159d2c3ee19fc5df341650df4c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sunny Kumar"},"description":"Sunny, a Prestashop virtuoso, crafts innovative eCommerce solutions. His expertise in marketplace development is unparalleled, seamlessly integrating modules. With precision coding, Sunny creates robust online stores, ensuring a seamless user experience. His engineering prowess enhances digital retail, leaving a lasting impact on the Prestashop community.","url":"https:\/\/webkul.com\/blog\/author\/sunny-kumar912\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/362322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/387"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=362322"}],"version-history":[{"count":2,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/362322\/revisions"}],"predecessor-version":[{"id":362332,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/362322\/revisions\/362332"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=362322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=362322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=362322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}