{"id":75766,"date":"2016-09-14T11:06:51","date_gmt":"2016-09-14T15:06:51","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=75766"},"modified":"2017-02-06T06:14:50","modified_gmt":"2017-02-06T11:14:50","slug":"opencart-2-troubleshooter-get-rid-warning-sprintf-function-sprintf-arguments-messages","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/opencart-2-troubleshooter-get-rid-warning-sprintf-function-sprintf-arguments-messages.html","title":{"rendered":"OpenCart 2 Troubleshooter. How to get rid of the &#8220;Warning: sprintf() [function.sprintf]: Too few arguments&#8221; message(s)"},"content":{"rendered":"<p>This tutorial shows how to get rid of the following warning: <strong>Warning: sprintf() [function.sprintf]: Too few arguments<\/strong>&#8230; in <a href=\"https:\/\/www.templatemonster.com\/opencart-templates.php\" title=\"OpenCart template\" target=\"_blank\">OpenCart template<\/a>.<\/p>\r\n\r\n <div class=\"video-container\">\r\n\t<iframe src=\"https:\/\/www.youtube.com\/embed\/khUuENIbnPU\"><\/iframe>\r\n<\/div>\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-1-300x168.jpg\" alt=\"OpenCart 2 Troubleshooter. How to get rid of the Warning sprintf() [function.sprintf] Too few arguments message(s)-1\" width=\"300\" height=\"168\" class=\"alignnone size-medium wp-image-75768\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-1-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-1-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-1-768x431.jpg 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-1-1024x574.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-1.jpg 1273w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<ol>\r\n\t<li>\r\n\t\t<p>First of all we should open a file, specified in the warning message. Please, check the screenshot above. You will see path to file there. Download the file and open it with text editor. In our case issue is related to the code, specified on line 64 (please, refer to the screenshot above). Open the appropriate line of code. In our case the issue is related to <strong>text_wishlist <\/strong>constant.<\/p>\r\n\t\t\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-2-300x165.jpg\" alt=\"OpenCart 2 Troubleshooter. How to get rid of the Warning sprintf() [function.sprintf] Too few arguments message(s)-2\" width=\"300\" height=\"165\" class=\"alignnone size-medium wp-image-75769\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-2-300x165.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-2-150x83.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-2-768x423.jpg 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-2-1024x564.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-2.jpg 1249w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t\t\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Check a code above this line. We can see the reference to language files inside common folder. <\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-3-300x165.jpg\" alt=\"OpenCart 2 Troubleshooter. How to get rid of the Warning sprintf() [function.sprintf] Too few arguments message(s)-3\" width=\"300\" height=\"165\" class=\"alignnone size-medium wp-image-75770\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-3-300x165.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-3-150x83.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-3-768x423.jpg 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-3-1024x564.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-3.jpg 1249w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t<\/li>\r\n\t<li>\r\n\t\t<p>Go to a <strong>catalog\/language<\/strong> folder and open the folder with the appropriate language pack. In our case the issue appears when we select Dutch. Path to file is <strong>catalog\/language\/dutch\/common\/header.php<\/strong> in our case (as <strong>common\/header<\/strong> path was specified in the header.php file we have checked initially).\r\n\t\tOpen file with the editor. We can see<strong> text_wishlist<\/strong> variable. In our case this variable was specified in <strong>system\\modification\\catalog\\controller\\common\\header.php<\/strong> on line 64 (the file we have checked initially).<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-4.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-4-300x176.jpg\" alt=\"OpenCart 2 Troubleshooter. How to get rid of the Warning sprintf() [function.sprintf] Too few arguments message(s)-4\" width=\"300\" height=\"176\" class=\"alignnone size-medium wp-image-75771\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-4-300x176.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-4-150x88.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-4.jpg 690w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t\t\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>The following code causes the issue: <code>(%s) <\/code><\/p>\t\t\r\n\t\t<p>You can go ahead and remove it. Updated code will look like on the following screenshot. Save changes and upload modified file.<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-5.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-5-300x174.jpg\" alt=\"OpenCart 2 Troubleshooter. How to get rid of the Warning sprintf() [function.sprintf] Too few arguments message(s)-5\" width=\"300\" height=\"174\" class=\"alignnone size-medium wp-image-75772\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-5-300x174.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-5-150x87.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-5.jpg 716w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t\t\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p><em>You can always check how the language constant should be defined in the language packs that come with the template. For example, you can open <strong>catalog\/language\/english\/common\/header.php<\/strong> file, compare code and perform adjustments in your language file.<\/em><\/p>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Refresh a page. We have solved the issue.<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-6.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-6-300x171.jpg\" alt=\"OpenCart 2 Troubleshooter. How to get rid of the Warning sprintf() [function.sprintf] Too few arguments message(s)-6\" width=\"300\" height=\"171\" class=\"alignnone size-medium wp-image-75767\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-6-300x171.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-6-150x85.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-6-768x437.jpg 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-6-1024x583.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/09\/OpenCart-2-Troubleshooter.-How-to-get-rid-of-the-Warning-sprintf-function.sprintf-Too-few-arguments-messages-6.jpg 1257w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t<\/li>\r\n\t\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=khUuENIbnPU?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart 2 Troubleshooter. How to get rid of the &#8220;Warning: sprintf() [function.sprintf]: Too few arguments&#8221; message(s)<\/a>\r\n<p>If you&#8217;re searching for more professional solutions to build a website, have a look at <a href=\"https:\/\/www.templatemonster.com\/blog\/best-opencart-themes-2017\/\" title=\"Best OpenCart Themes 2017\" target=\"_blank\">Best OpenCart Themes 2017<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to get rid of the following warning: <strong>Warning: sprintf() [function.sprintf]: Too few arguments<\/strong>&#8230;<\/p>\n","protected":false},"author":39,"featured_media":75774,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1156],"tags":[2245,1087,2285,2460,690],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/75766"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=75766"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/75766\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/75774"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=75766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=75766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=75766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}