{"id":307126,"date":"2021-09-27T13:42:30","date_gmt":"2021-09-27T13:42:30","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=307126"},"modified":"2021-09-27T13:46:33","modified_gmt":"2021-09-27T13:46:33","slug":"custom-modify-and-create-custom-order-totals-variations-in-magento-2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/","title":{"rendered":"Custom Modify and Create custom order totals variations in Magento 2"},"content":{"rendered":"\n<p>Today, We are going to check how can we mange Order of <strong>Custom Fee<\/strong> in Magento 2. You can follow it for any Custom Order Total.<\/p>\n\n\n\n<p>Firstly, Please check the <a href=\"https:\/\/webkul.com\/blog\/display-custom-pricefee-sales-order-view-page\/\" target=\"_blank\" rel=\"noreferrer noopener\">blog<\/a> to know <strong><a href=\"https:\/\/webkul.com\/blog\/display-custom-pricefee-sales-order-view-page\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to display custom price fee in sales order view page<\/a><\/strong><\/p>\n\n\n\n<p>After following the above blog the result will be:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"965\" height=\"243\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png\" alt=\"Default Order\" class=\"wp-image-307226\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png 965w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2-300x76.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2-250x63.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2-768x193.png 768w\" sizes=\"(max-width: 965px) 100vw, 965px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>The above mentioned i the default order. If you have added any custom discount. It will be appear at the end and just before the <strong>Grand Total<\/strong>.<\/p>\n\n\n\n<p>Now, If we want the our <strong>Custom Fee<\/strong> at the very top (Before all Order Total):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function initTotals()\n    {\n        $parent = $this-&gt;getParentBlock();\n        $this-&gt;_order = $parent-&gt;getOrder();\n        $this-&gt;_source = $parent-&gt;getSource();\n        $title = __('Custom Fee');\n        $store = $this-&gt;getStore();\n        if($this-&gt;_order-&gt;getCustomfee()!=0){\n            $customAmount = new \\Magento\\Framework\\DataObject(\n                    [\n                        'code' =&gt; 'customfee',\n                        'strong' =&gt; false,\n                        'value' =&gt; $this-&gt;_order-&gt;getCustomfee(),\n                        'label' =&gt; __($title),\n                    ]\n                );\n            $parent-&gt;addTotal($customAmount, 'first');\n        }\n        return $this;\n    }<\/pre>\n\n\n\n<p>You can check in above snippet code we have mentioned the order <strong>first<\/strong> with passing second parameter in <strong>addTotal<\/strong> method. It will display our <strong>Custom Fee <\/strong>at the top. See the result below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"964\" height=\"257\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_28_38.png\" alt=\"first\" class=\"wp-image-307238\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_28_38.png 964w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_28_38-300x80.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_28_38-250x67.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_28_38-768x205.png 768w\" sizes=\"(max-width: 964px) 100vw, 964px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now, We check if we want to display our <strong>Custom Fee<\/strong> at the very bottom (after the Grant Total OR Base Grand Total).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function initTotals()\n    {\n        $parent = $this-&gt;getParentBlock();\n        $this-&gt;_order = $parent-&gt;getOrder();\n        $this-&gt;_source = $parent-&gt;getSource();\n        $title = __('Custom Fee');\n        $store = $this-&gt;getStore();\n        if($this-&gt;_order-&gt;getCustomfee()!=0){\n            $customAmount = new \\Magento\\Framework\\DataObject(\n                    [\n                        'code' =&gt; 'customfee',\n                        'strong' =&gt; false,\n                        'value' =&gt; $this-&gt;_order-&gt;getCustomfee(),\n                        'label' =&gt; __($title),\n                    ]\n                );\n            $parent-&gt;addTotal($customAmount, 'last');\n        }\n        return $this;\n    }<\/pre>\n\n\n\n<p>You can check in above snippet code we have mentioned the order <strong>last<\/strong> with passing second parameter in <strong>addTotal<\/strong> method. It will display our <strong>Custom Fee<\/strong> at the bottom. See the result below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"949\" height=\"252\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_32_08.png\" alt=\"Last\" class=\"wp-image-307241\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_32_08.png 949w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_32_08-300x80.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_32_08-250x66.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_32_08-768x204.png 768w\" sizes=\"(max-width: 949px) 100vw, 949px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>In the above result you can check with the help of &#8220;last&#8221;. Now, our custom discount is visible at the bottom and after the <strong>Grand Total<\/strong>.<\/p>\n\n\n\n<p>Now, We will check if we want to display after any particular <strong>Order Total<\/strong>. In this example we are going to display our Order Total just after the <strong>shipping amount<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function initTotals()\n    {\n        $parent = $this-&gt;getParentBlock();\n        $this-&gt;_order = $parent-&gt;getOrder();\n        $this-&gt;_source = $parent-&gt;getSource();\n        $title = __('Custom Fee');\n        $store = $this-&gt;getStore();\n        if($this-&gt;_order-&gt;getCustomfee()!=0){\n            $customAmount = new \\Magento\\Framework\\DataObject(\n                    [\n                        'code' =&gt; 'customfee',\n                        'strong' =&gt; false,\n                        'value' =&gt; $this-&gt;_order-&gt;getCustomfee(),\n                        'label' =&gt; __($title),\n                    ]\n                );\n            $parent-&gt;addTotal($customAmount, 'shipping');\n        }\n        return $this;\n    }<\/pre>\n\n\n\n<p>You can check in above snippet code we have mentioned the order by passing second parameter the <strong>particular total code<\/strong> <strong>&#8211; <em>shipping<\/em><\/strong> in <strong>addTotal<\/strong> method. It will display our <strong>Custom Fee<\/strong> just after the <strong>Shipping amount<\/strong>. See the result below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"943\" height=\"256\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_33_57.png\" alt=\"After any total\" class=\"wp-image-307243\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_33_57.png 943w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_33_57-300x81.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_33_57-250x68.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-16_33_57-768x208.png 768w\" sizes=\"(max-width: 943px) 100vw, 943px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now, at last we are going to check. How can we add display our <strong>Custom Fee<\/strong> just before any <strong>Order Total<\/strong>. In this example we are going to display our <strong>Custom Fee<\/strong> just before the <strong>Shipping<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function initTotals()\n    {\n        $parent = $this-&gt;getParentBlock();\n        $this-&gt;_order = $parent-&gt;getOrder();\n        $this-&gt;_source = $parent-&gt;getSource();\n        $title = __('Custom Fee');\n        $store = $this-&gt;getStore();\n        if($this-&gt;_order-&gt;getCustomfee()!=0){\n            $customAmount = new \\Magento\\Framework\\DataObject(\n                    [\n                        'code' =&gt; 'customfee',\n                        'strong' =&gt; false,\n                        'value' =&gt; $this-&gt;_order-&gt;getCustomfee(),\n                        'label' =&gt; __($title),\n                    ]\n                );\n            $parent-&gt;addTotalBefore($customAmount, 'shipping');\n        }\n        return $this;\n    }<\/pre>\n\n\n\n<p>You can check in above snippet code we have mentioned the order by passing second parameter the <strong>particular total code<\/strong> <strong>&#8211; <em>shipping<\/em><\/strong> in <strong>addTotalBefore<\/strong> method. It will display our <strong>Custom Fee<\/strong> just before the <strong>Shipping amount<\/strong>. See the result below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"956\" height=\"261\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-17_53_29.png\" alt=\"Before Order Total\" class=\"wp-image-307246\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-17_53_29.png 956w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-17_53_29-300x82.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-17_53_29-250x68.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/screenshot-192.168.15.81-2021.09.27-17_53_29-768x210.png 768w\" sizes=\"(max-width: 956px) 100vw, 956px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>You can check in above screenshot. Our <strong>Custom Fee<\/strong> just before the <strong>Shipping &amp; Handling<\/strong>. We have used <strong>addTotal<\/strong> by <strong>addTotalBefore<\/strong> to display our <strong>Custom Fee<\/strong> just before any <strong>Order Total<\/strong>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>That&#8217;s It. Hope it will helped you. Please let us know by commenting if any query.<\/p>\n\n\n\n<p>Happy Coding \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, We are going to check how can we mange Order of Custom Fee in Magento 2. You can follow it for any Custom Order Total. Firstly, Please check the blog to know How to display custom price fee in sales order view page After following the above blog the result will be: The above <a href=\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":362,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9121],"tags":[12110,12111,7263,2070,4481],"class_list":["post-307126","post","type-post","status-publish","format-standard","hentry","category-magento-2","tag-custom-discount","tag-custom-discount-in-magento-2","tag-custom-fee-order-total","tag-magento2","tag-order-totals"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Custom Modify and create custom order totals variations in Magento 2<\/title>\n<meta name=\"description\" content=\"Customise Order Totals with Custom Order Total in Magento 2. After and Before any Order Total. We can ordered Custom Order Total manually.\" \/>\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\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Custom Modify and create custom order totals variations in Magento 2\" \/>\n<meta property=\"og:description\" content=\"Customise Order Totals with Custom Order Total in Magento 2. After and Before any Order Total. We can ordered Custom Order Total manually.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/\" \/>\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=\"2021-09-27T13:42:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-27T13:46:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png\" \/>\n<meta name=\"author\" content=\"Vikas Tiwari\" \/>\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=\"Vikas Tiwari\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/\"},\"author\":{\"name\":\"Vikas Tiwari\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/5f1a3d1e180e3468f8b2a6926cecff9b\"},\"headline\":\"Custom Modify and Create custom order totals variations in Magento 2\",\"datePublished\":\"2021-09-27T13:42:30+00:00\",\"dateModified\":\"2021-09-27T13:46:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/\"},\"wordCount\":415,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png\",\"keywords\":[\"Custom Discount\",\"Custom Discount in Magento 2\",\"custom fee order total\",\"Magento2\",\"order totals\"],\"articleSection\":[\"Magento 2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/\",\"url\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/\",\"name\":\"Custom Modify and create custom order totals variations in Magento 2\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png\",\"datePublished\":\"2021-09-27T13:42:30+00:00\",\"dateModified\":\"2021-09-27T13:46:33+00:00\",\"description\":\"Customise Order Totals with Custom Order Total in Magento 2. After and Before any Order Total. We can ordered Custom Order Total manually.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png\",\"width\":965,\"height\":243,\"caption\":\"bf8dc22c26ce3539412243db128df15c-2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom Modify and Create custom order totals variations in Magento 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\/5f1a3d1e180e3468f8b2a6926cecff9b\",\"name\":\"Vikas Tiwari\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/49a0fe188f08a80af6fe7b6487da3a3e3adc1be472186b3f0eb833eff1323d10?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\/49a0fe188f08a80af6fe7b6487da3a3e3adc1be472186b3f0eb833eff1323d10?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Vikas Tiwari\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/vikastiwari-magento160\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Custom Modify and create custom order totals variations in Magento 2","description":"Customise Order Totals with Custom Order Total in Magento 2. After and Before any Order Total. We can ordered Custom Order Total manually.","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\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/","og_locale":"en_US","og_type":"article","og_title":"Custom Modify and create custom order totals variations in Magento 2","og_description":"Customise Order Totals with Custom Order Total in Magento 2. After and Before any Order Total. We can ordered Custom Order Total manually.","og_url":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2021-09-27T13:42:30+00:00","article_modified_time":"2021-09-27T13:46:33+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png","type":"","width":"","height":""}],"author":"Vikas Tiwari","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Vikas Tiwari","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/"},"author":{"name":"Vikas Tiwari","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/5f1a3d1e180e3468f8b2a6926cecff9b"},"headline":"Custom Modify and Create custom order totals variations in Magento 2","datePublished":"2021-09-27T13:42:30+00:00","dateModified":"2021-09-27T13:46:33+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/"},"wordCount":415,"commentCount":2,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png","keywords":["Custom Discount","Custom Discount in Magento 2","custom fee order total","Magento2","order totals"],"articleSection":["Magento 2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/","url":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/","name":"Custom Modify and create custom order totals variations in Magento 2","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png","datePublished":"2021-09-27T13:42:30+00:00","dateModified":"2021-09-27T13:46:33+00:00","description":"Customise Order Totals with Custom Order Total in Magento 2. After and Before any Order Total. We can ordered Custom Order Total manually.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/bf8dc22c26ce3539412243db128df15c-2.png","width":965,"height":243,"caption":"bf8dc22c26ce3539412243db128df15c-2"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/custom-modify-and-create-custom-order-totals-variations-in-magento-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Custom Modify and Create custom order totals variations in Magento 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\/5f1a3d1e180e3468f8b2a6926cecff9b","name":"Vikas Tiwari","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/49a0fe188f08a80af6fe7b6487da3a3e3adc1be472186b3f0eb833eff1323d10?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\/49a0fe188f08a80af6fe7b6487da3a3e3adc1be472186b3f0eb833eff1323d10?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Vikas Tiwari"},"url":"https:\/\/webkul.com\/blog\/author\/vikastiwari-magento160\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/307126","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\/362"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=307126"}],"version-history":[{"count":7,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/307126\/revisions"}],"predecessor-version":[{"id":307249,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/307126\/revisions\/307249"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=307126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=307126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=307126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}