{"id":349641,"date":"2023-04-14T07:56:17","date_gmt":"2023-04-14T07:56:17","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=349641"},"modified":"2023-04-19T04:56:05","modified_gmt":"2023-04-19T04:56:05","slug":"how-to-use-cs-cart-hooks-part-2-tpl-hooks","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/","title":{"rendered":"How to Use Cs-Cart Hooks (Part -2)"},"content":{"rendered":"\n<p>This blog is the second part of the How to Use Cs-Cart Hooks. In the first part, we learned how to use <a href=\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-1\/\" target=\"_blank\" rel=\"noreferrer noopener\">PHP hooks<\/a> in the<strong> Cs-Cart<\/strong>. In this blog, We will learn about how to use TPL Hooks.<\/p>\n\n\n\n<p>For view processing, <strong>Cs-Cart<\/strong> uses the<strong> Smart Template engine<\/strong>. You can learn about Smarty in the given <a href=\"https:\/\/www.smarty.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">link<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TPL Hooks<\/h2>\n\n\n\n<p>In Cs-Cart, Smarty template engine is used for view. The extension of smarty template files is &#8216;<strong>.tpl<\/strong>&#8216;. The Hooks used in TPL files are called TPL hook.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">TPL Hooks Format<\/h3>\n\n\n\n<p>Format for TPL hook in Cscart <strong>{hook name=<em>template name<\/em>:<em>hook name<\/em>}<\/strong><\/p>\n\n\n\n<p>We create folder with the name of <em>template name<\/em> and then create tpl file with file with suffix of type of hook name want to use.<\/p>\n\n\n\n<p><strong>Admin panel<\/strong>:&nbsp;<em>design\/backend\/templates\/addons\/[addon id]\/hooks\/[template name]\/[hook name].[pre|post|override].tpl<\/em><\/p>\n\n\n\n<p><strong>Storefront area<\/strong>:&nbsp;<em>design\/themes\/[theme name]\/templates\/addons\/[addon id]\/hooks\/[template name]\/[hook name].[pre|post|override].tpl<\/em><\/p>\n\n\n\n<p><strong>Folder structure of hook<\/strong> use in addon is as follows<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-- design \n     -- backend\/ themes -- selected_theme\n          -- addons\n               -- addon_id\n                    -- hooks\n                         -- template name folder\n                              -- [hook name].[pre|post|override].tpl file<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\">{hook name=&quot;orders:order_total&quot;}\n     --inner code--\n{\/hook}<\/pre>\n\n\n\n<p>If you wish to use the pre hook <strong>{hook orders:order_total}<\/strong>, create the folder &#8220;orders&#8221; and the tpl file &#8220;order_total.pre.tpl&#8221; (<em>template name<\/em>.type_of_hook.tpl).<\/p>\n\n\n\n<p>Using the Admin panel or Storefront&#8217;s TPL hook, we can add a new element or change the current view. The view or data displayed in that existing templatecomponent of the TPL hook can be changed or extra information can be added. TPL hook are used to show additional data in an existing template.<br>There are three types of TPL hook:-<br>    1. <strong>Pre hook<\/strong><br>    2. <strong>Post hook<\/strong><br>    3. <strong>Override Hook<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pre TPL Hook<\/h3>\n\n\n\n<p>With the help of the pre hook, we can insert extra data into an existing template <strong>before<\/strong> a certain section. Take this as an example.<\/p>\n\n\n\n<p>Lets use item_list_row hook of orders template <strong>{hook name=&#8221;orders:items_list_row&#8221;}<\/strong> on order detail. This section of template contain, listing of the ordered product.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"287\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-1200x287.png\" alt=\"withouthook\" class=\"wp-image-376857\" title=\"WithoutHook\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-1200x287.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-300x72.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-250x60.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-768x184.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook.png 1283w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\">{hook name=&quot;orders:items_list_row&quot;}\n    {if !$product.extra.parent}\n        &lt;tr class=&quot;ty-valign-top&quot;&gt;\n            &lt;td&gt;\n                &lt;div class=&quot;clearfix&quot;&gt;\n                    &lt;div class=&quot;ty-float-left ty-orders-detail__table-image&quot;&gt;\n                        {hook name=&quot;orders:product_icon&quot;}\n                            {if $product.is_accessible}&lt;a href=&quot;{&quot;products.view?product_id=`$product.product_id`&quot;|fn_url}&quot;&gt;{\/if}\n                                {include file=&quot;common\/image.tpl&quot; obj_id=$key images=$product.main_pair image_width=$settings.Thumbnails.product_cart_thumbnail_width image_height=$settings.Thumbnails.product_cart_thumbnail_height}\n                            {if $product.is_accessible}&lt;\/a&gt;{\/if}\n                        {\/hook}\n                    &lt;\/div&gt;\n\n                    &lt;div class=&quot;ty-overflow-hidden ty-orders-detail__table-description-wrapper&quot;&gt;\n                        &lt;div class=&quot;ty-ml-s ty-orders-detail__table-description&quot;&gt;\n                            {if $product.is_accessible}&lt;a href=&quot;{&quot;products.view?product_id=`$product.product_id`&quot;|fn_url}&quot;&gt;{\/if}\n                                {$product.product nofilter}\n                            {if $product.is_accessible}&lt;\/a&gt;{\/if}\n                            {if $product.extra.is_edp == &quot;Y&quot;}\n                                &lt;div class=&quot;ty-right&quot;&gt;\n                                    &lt;a href=&quot;{&quot;orders.order_downloads?order_id=`$order_info.order_id`&quot;|fn_url}&quot;&gt;&#091;{__(&quot;download&quot;)}]&lt;\/a&gt;\n                                &lt;\/div&gt;\n                            {\/if}\n                            {if $product.product_code}\n                                &lt;div class=&quot;ty-orders-detail__table-code&quot;&gt;{__(&quot;sku&quot;)}:&amp;nbsp;{$product.product_code}&lt;\/div&gt;\n                            {\/if}\n                            {hook name=&quot;orders:product_info&quot;}\n                                {if $product.product_options}{include file=&quot;common\/options_info.tpl&quot; product_options=$product.product_options inline_option=true}{\/if}\n                            {\/hook}\n                        &lt;\/div&gt;\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n            &lt;\/td&gt;\n            &lt;td class=&quot;ty-right&quot;&gt;\n                {if $product.extra.exclude_from_calculate}{__(&quot;free&quot;)}{else}{include file=&quot;common\/price.tpl&quot; value=$product.original_price}{\/if}\n            &lt;\/td&gt;\n            &lt;td class=&quot;ty-center&quot;&gt;&amp;nbsp;{$product.amount}&lt;\/td&gt;\n            {if $order_info.use_discount}\n                &lt;td class=&quot;ty-right&quot;&gt;\n                    {if $product.extra.discount|floatval}{include file=&quot;common\/price.tpl&quot; value=$product.extra.discount}{else}-{\/if}\n                &lt;\/td&gt;\n            {\/if}\n            {if $order_info.taxes &amp;&amp; $settings.Checkout.tax_calculation != &quot;subtotal&quot;}\n                &lt;td class=&quot;ty-center&quot;&gt;\n                    {if $product.tax_value|floatval}{include file=&quot;common\/price.tpl&quot; value=$product.tax_value}{else}-{\/if}\n                &lt;\/td&gt;\n            {\/if}\n            &lt;td class=&quot;ty-right&quot;&gt;\n                    &amp;nbsp;{if $product.extra.exclude_from_calculate}{__(&quot;free&quot;)}{else}{include file=&quot;common\/price.tpl&quot; value=$product.display_subtotal}{\/if}\n                &lt;\/td&gt;\n        &lt;\/tr&gt;\n    {\/if}\n{\/hook}<\/pre>\n\n\n\n<p>Because this template comes from Storefront, we must build the pre hook tpl file in the directory &#8220;<strong>design\/themes\/[theme name]\/templates\/addons\/[addon id]\/hooks\/orders\/<\/strong>&#8221; in order to utilise the pre hook. The tpl file name will be &#8220;<strong>items_list_row.pre.tpl<\/strong>&#8220;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"516\" height=\"166\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookdirectory.png\" alt=\"prehookdirectory\" class=\"wp-image-376862\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookdirectory.png 516w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookdirectory-300x97.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookdirectory-250x80.png 250w\" sizes=\"(max-width: 516px) 100vw, 516px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Write the below code in the hook file:-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">{if !$product.extra.parent}\n    &lt;tr class=&quot;ty-valign-top&gt;\n         &lt;td&gt;\n              &lt;p&gt;PREHOOK&lt;\/p&gt;\n         &lt;\/td&gt;\n    &lt;\/tr&gt;\n{\/if}<\/pre>\n\n\n\n<p>Result of PreHook code:-<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"312\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookproof-1200x312.png\" alt=\"prehookproof\" class=\"wp-image-376869\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookproof-1200x312.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookproof-300x78.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookproof-250x65.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookproof-768x200.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/prehookproof.png 1256w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Post TPL Hook<\/h3>\n\n\n\n<p>With the help of the post hook, we can insert extra data into an existing template <strong>after<\/strong> a certain section. Take this as an example.<\/p>\n\n\n\n<p>Lets again use item_list_row hook of orders template <strong>{hook name=&#8221;orders:items_list_row&#8221;}<\/strong> on order detail for understand post TPL.<\/p>\n\n\n\n<p>Same as pre hook, we must build the post hook tpl file in the directory &#8220;<strong>design\/themes\/[theme name]\/templates\/addons\/[addon id]\/hooks\/orders\/<\/strong>&#8221; in order to utilise the post hook. The tpl file name will be &#8220;<strong>items_list_row.post.tpl<\/strong>&#8220;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"516\" height=\"168\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookdirectory.png\" alt=\"posthookdirectory\" class=\"wp-image-376878\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookdirectory.png 516w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookdirectory-300x98.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookdirectory-250x81.png 250w\" sizes=\"(max-width: 516px) 100vw, 516px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Write the below code in the hook file:-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">{if !$product.extra.parent}\n    &lt;tr class=&quot;ty-valign-top&gt;\n         &lt;td&gt;\n              &lt;p&gt;POSTHOOK&lt;\/p&gt;\n         &lt;\/td&gt;\n    &lt;\/tr&gt;\n{\/if}<\/pre>\n\n\n\n<p>Result of PostHook code:-<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"308\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookproof-1200x308.png\" alt=\"posthookproof\" class=\"wp-image-376882\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookproof-1200x308.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookproof-300x77.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookproof-250x64.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookproof-768x197.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/posthookproof.png 1278w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Override TPL Hook<\/strong><\/h3>\n\n\n\n<p>We may totally alter the template&#8217;s hook section with the aid of the override tpl hook.<\/p>\n\n\n\n<p>Lets again use item_list_row hook of orders template <strong>{hook name=&#8221;orders:items_list_row&#8221;}<\/strong> on order detail for understand post TPL.<\/p>\n\n\n\n<p>Same as pre hook and post hook, we must build the override hook tpl file in the directory &#8220;<strong>design\/themes\/[theme name]\/templates\/addons\/[addon id]\/hooks\/orders\/<\/strong>&#8221; in order to utilise the override hook. The tpl file name will be &#8220;<strong>items_list_row.override.tpl<\/strong>&#8220;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"504\" height=\"169\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/overridehookdirectory.png\" alt=\"overridehookdirectory\" class=\"wp-image-376906\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/overridehookdirectory.png 504w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/overridehookdirectory-300x101.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/overridehookdirectory-250x84.png 250w\" sizes=\"(max-width: 504px) 100vw, 504px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Write the below code in the hook file:-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">{if !$product.extra.parent}\n    &lt;tr class=&quot;ty-valign-top&gt;\n         &lt;td&gt;\n              &lt;p&gt;OVERRIDE&lt;\/p&gt;\n         &lt;\/td&gt;\n    &lt;\/tr&gt;\n{\/if}<\/pre>\n\n\n\n<p>Result of Override Hook code:-<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"187\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/Overridehookproof-1200x187.png\" alt=\"Overridehookproof\" class=\"wp-image-376910\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/Overridehookproof-1200x187.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/Overridehookproof-300x47.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/Overridehookproof-250x39.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/Overridehookproof-768x120.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/Overridehookproof.png 1256w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now that you are familiar with all of the Cs-Cart hooks, have fun coding with it.<\/p>\n\n\n\n<p>For <strong>Custom theme in cs-cart documentation<\/strong>:- Refer to this <a href=\"https:\/\/webkul.com\/blog\/create-custom-theme\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">link<\/a><\/p>\n\n\n\n<p>If you need custom&nbsp;<a href=\"https:\/\/webkul.com\/cs-cart-development\/\" target=\"_blank\" rel=\"noreferrer noopener\">CS-Cart Development services<\/a>&nbsp;then feel free to&nbsp;<a href=\"https:\/\/webkul.com\/contacts\" target=\"_blank\" rel=\"noreferrer noopener\">reach us<\/a>&nbsp;and also explore our exclusive range of&nbsp;<a href=\"https:\/\/store.webkul.com\/CS-Cart.html\">CS-Cart Addons<\/a>.<\/p>\n\n\n\n<p>!!Have a Great Day Ahead!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog is the second part of the How to Use Cs-Cart Hooks. In the first part, we learned how to use PHP hooks in the Cs-Cart. In this blog, We will learn about how to use TPL Hooks. For view processing, Cs-Cart uses the Smart Template engine. You can learn about Smarty in the <a href=\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":457,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1496],"tags":[13999,14001,4448,14000],"class_list":["post-349641","post","type-post","status-publish","format-standard","hentry","category-cs-cart","tag-cscart-hook","tag-hook","tag-smarty","tag-tpl-hook"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Use Cs-Cart Hooks (Part -2) - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Difficulty in using Cscart TPL hooks. Learn here how to use TPL hooks in the template as you want in the Cscart and enjoy the coding.\" \/>\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\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Cs-Cart Hooks (Part -2) - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Difficulty in using Cscart TPL hooks. Learn here how to use TPL hooks in the template as you want in the Cscart and enjoy the coding.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/\" \/>\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=\"2023-04-14T07:56:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-19T04:56:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-1200x287.png\" \/>\n<meta name=\"author\" content=\"Abhishek 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=\"Abhishek Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/\"},\"author\":{\"name\":\"Abhishek Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/6119c902a336cdd05474ed2585b821b7\"},\"headline\":\"How to Use Cs-Cart Hooks (Part -2)\",\"datePublished\":\"2023-04-14T07:56:17+00:00\",\"dateModified\":\"2023-04-19T04:56:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/\"},\"wordCount\":665,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-1200x287.png\",\"keywords\":[\"cscart hook\",\"hook\",\"smarty\",\"tpl hook\"],\"articleSection\":[\"Cs Cart\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/\",\"name\":\"How to Use Cs-Cart Hooks (Part -2) - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-1200x287.png\",\"datePublished\":\"2023-04-14T07:56:17+00:00\",\"dateModified\":\"2023-04-19T04:56:05+00:00\",\"description\":\"Difficulty in using Cscart TPL hooks. Learn here how to use TPL hooks in the template as you want in the Cscart and enjoy the coding.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook.png\",\"width\":1283,\"height\":307,\"caption\":\"withouthook\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use Cs-Cart Hooks (Part -2)\"}]},{\"@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\/6119c902a336cdd05474ed2585b821b7\",\"name\":\"Abhishek Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0ac65d7de58cd54f4aff681f269b93f405d8f20566de29cf023ec28b8d513891?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\/0ac65d7de58cd54f4aff681f269b93f405d8f20566de29cf023ec28b8d513891?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Abhishek Kumar\"},\"description\":\"Skilled CS-Cart developer with expertise in Generative AI Integration, POS, and AMP. He excels in CS-Cart Marketplace Development, POS System Development, and Headless Development, crafting innovative and efficient solutions that drive business success and enhance user experiences.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/abhishek-kumar025\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use Cs-Cart Hooks (Part -2) - Webkul Blog","description":"Difficulty in using Cscart TPL hooks. Learn here how to use TPL hooks in the template as you want in the Cscart and enjoy the coding.","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\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/","og_locale":"en_US","og_type":"article","og_title":"How to Use Cs-Cart Hooks (Part -2) - Webkul Blog","og_description":"Difficulty in using Cscart TPL hooks. Learn here how to use TPL hooks in the template as you want in the Cscart and enjoy the coding.","og_url":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-04-14T07:56:17+00:00","article_modified_time":"2023-04-19T04:56:05+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-1200x287.png","type":"","width":"","height":""}],"author":"Abhishek Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Abhishek Kumar","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/"},"author":{"name":"Abhishek Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/6119c902a336cdd05474ed2585b821b7"},"headline":"How to Use Cs-Cart Hooks (Part -2)","datePublished":"2023-04-14T07:56:17+00:00","dateModified":"2023-04-19T04:56:05+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/"},"wordCount":665,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-1200x287.png","keywords":["cscart hook","hook","smarty","tpl hook"],"articleSection":["Cs Cart"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/","url":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/","name":"How to Use Cs-Cart Hooks (Part -2) - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook-1200x287.png","datePublished":"2023-04-14T07:56:17+00:00","dateModified":"2023-04-19T04:56:05+00:00","description":"Difficulty in using Cscart TPL hooks. Learn here how to use TPL hooks in the template as you want in the Cscart and enjoy the coding.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/withouthook.png","width":1283,"height":307,"caption":"withouthook"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-use-cs-cart-hooks-part-2-tpl-hooks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use Cs-Cart Hooks (Part -2)"}]},{"@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\/6119c902a336cdd05474ed2585b821b7","name":"Abhishek Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0ac65d7de58cd54f4aff681f269b93f405d8f20566de29cf023ec28b8d513891?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\/0ac65d7de58cd54f4aff681f269b93f405d8f20566de29cf023ec28b8d513891?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Abhishek Kumar"},"description":"Skilled CS-Cart developer with expertise in Generative AI Integration, POS, and AMP. He excels in CS-Cart Marketplace Development, POS System Development, and Headless Development, crafting innovative and efficient solutions that drive business success and enhance user experiences.","url":"https:\/\/webkul.com\/blog\/author\/abhishek-kumar025\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/349641","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\/457"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=349641"}],"version-history":[{"count":26,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/349641\/revisions"}],"predecessor-version":[{"id":377464,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/349641\/revisions\/377464"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=349641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=349641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=349641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}