{"id":51295,"date":"2015-08-04T03:20:35","date_gmt":"2015-08-04T07:20:35","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=51295"},"modified":"2016-02-17T06:04:23","modified_gmt":"2016-02-17T11:04:23","slug":"opencart-2-x-how-to-change-slider-dimensions","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/opencart-2-x-how-to-change-slider-dimensions.html","title":{"rendered":"OpenCart 2.x. How to change slider dimensions"},"content":{"rendered":"<p>\r\n<p>This tutorial will show you how to change slider dimensions in Opencart 2.x.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=XVRo7Of3HEA?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart 2.x. How to change slider dimensions<\/a><\/p>\r\n<p>For instance, if you have a 850 X 540 px image and you would like to use it as a slider banner, you will have to replace default dimensions with your new dimensions.<\/p>\r\n<ol>\r\n<li>\r\n<p>Log into your OpenCart administration panel and go to the <strong>&#8216;Extensions&#8217; -> &#8216;Modules&#8217;<\/strong> menu:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions1.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions1.jpg-300x187.jpg\" alt=\"OpenCart2.x. How to change slider dimensions1.jpg\" width=\"300\" height=\"187\" class=\"aligncenter size-medium wp-image-51296\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions1.jpg-300x187.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions1.jpg-150x94.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions1.jpg.jpg 667w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Look for a module called <strong>&#8216;Tm Slideshow > Tm Slideshow&#8217;<\/strong> and click <strong>&#8216;Edit&#8217;<\/strong> button:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions2.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions2.jpg-300x74.jpg\" alt=\"OpenCart2.x. How to change slider dimensions2.jpg\" width=\"300\" height=\"74\" class=\"aligncenter size-medium wp-image-51297\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions2.jpg-300x74.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions2.jpg-150x37.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions2.jpg-1024x251.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions2.jpg.jpg 1185w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>On the next page change the default dimensions (W + H) to those of your new image (i.e. to 850 X 540 px). Click &#8216;Save&#8217;:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions3.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions3.jpg-300x111.jpg\" alt=\"OpenCart2.x. How to change slider dimensions3.jpg\" width=\"300\" height=\"111\" class=\"aligncenter size-medium wp-image-51298\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions3.jpg-300x111.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions3.jpg-150x55.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions3.jpg-1024x377.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions3.jpg.jpg 1205w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Go to the <strong>System -> Design -> Banners<\/strong> menu. Find <strong>&#8216;slideshow&#8217;<\/strong> and click <strong>&#8216;Edit&#8217;<\/strong>:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions4.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions4.jpg-300x215.jpg\" alt=\"OpenCart2.x. How to change slider dimensions4.jpg\" width=\"300\" height=\"215\" class=\"aligncenter size-medium wp-image-51299\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions4.jpg-300x215.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions4.jpg-150x107.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions4.jpg.jpg 640w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>On the next page click on the image you want to replace. In the window that will pop up, click <strong>&#8216;Edit&#8217;<\/strong> and navigate to the directory where the new image is located. Select the image and click <strong>&#8216;Open&#8217;<\/strong>:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions5.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions5.jpg-300x199.jpg\" alt=\"OpenCart2.x. How to change slider dimensions5.jpg\" width=\"300\" height=\"199\" class=\"aligncenter size-medium wp-image-51300\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions5.jpg-300x199.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions5.jpg-150x99.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions5.jpg.jpg 483w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Look for the image in the Image Manager and double click on it. The thumbnail of the original image will be changed to that of your image. Click &#8216;Save&#8217; at the top right:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions6.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions6.jpg-300x203.jpg\" alt=\"OpenCart2.x. How to change slider dimensions6.jpg\" width=\"300\" height=\"203\" class=\"aligncenter size-medium wp-image-51301\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions6.jpg-300x203.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions6.jpg-150x101.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions6.jpg.jpg 454w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Open the front page of your site in Mozilla Firefox with the <a target='_blank' href='\/help\/firebug-mozilla-firefox-plugin.html'>Firebug<\/a> plugin installed. With the help of Firebug look for <strong>&lt;div id=&quot;camera_wrap&quot;&gt;<\/strong> as shown below (the div id may differ depending on your template number):<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions7.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions7.jpg-300x91.jpg\" alt=\"OpenCart2.x. How to change slider dimensions7.jpg\" width=\"300\" height=\"91\" class=\"aligncenter size-medium wp-image-51302\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions7.jpg-300x91.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions7.jpg-150x45.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions7.jpg-1024x310.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions7.jpg.jpg 1097w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Add a new property to this class selector like <strong>width: 850px ! important<\/strong>  (where 850px is the width of your new banner image). This will prevent your image from looking stretched.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Remove <strong>float: left;<\/strong> and add one more property to the same class selector like <strong>margin: 0 auto;<\/strong> in order to center your image:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions8.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions8.jpg-300x171.jpg\" alt=\"OpenCart2.x. How to change slider dimensions8.jpg\" width=\"300\" height=\"171\" class=\"aligncenter size-medium wp-image-51304\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions8.jpg-300x171.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions8.jpg-150x86.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions8.jpg.jpg 583w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Now you need to copy the edited class selector from Firebug and replace the original one in <strong>catalog\/view\/javascript\/camera\/css\/camera.css<\/strong> with it:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions9.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions9.jpg-300x174.jpg\" alt=\"OpenCart2.x. How to change slider dimensions9.jpg\" width=\"300\" height=\"174\" class=\"aligncenter size-medium wp-image-51303\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions9.jpg-300x174.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions9.jpg-150x87.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions9.jpg.jpg 583w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Save the changes made to the <strong> camera.css<\/strong> file.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Open the tm_slideshow.tpl  file located in <strong> catalog\/view\/theme\/theme###\/template\/module\/<\/strong>  with any code editor available. Look for the initializing script between the two<br \/>\r\n\t<strong>&lt;script&gt;&lt;\/script&gt;<\/strong> tags:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions-10.jpg.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions-10.jpg-300x233.jpg\" alt=\"OpenCart2.x. How to change slider dimensions 10.jpg\" width=\"300\" height=\"233\" class=\"aligncenter size-medium wp-image-51305\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions-10.jpg-300x233.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions-10.jpg-150x116.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart2.x.-How-to-change-slider-dimensions-10.jpg.jpg 746w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Since your new image width is 850px and its height is 540px, the new percentage should be <strong>63.52% (540\/850*100=63.52)<\/strong>. Change height: &#8216;63,1%&#8217; to height: &#8216;63,52%&#8217;, and save the changes.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Now your banner image should be displayed with its new dimensions.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=XVRo7Of3HEA?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart 2.x. How to change slider dimensions<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will  show you how to change slider dimensions in Opencart 2.x.<\/p>\n","protected":false},"author":61,"featured_media":51311,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1156],"tags":[1267,1157,816],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/51295"}],"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\/61"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=51295"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/51295\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/51311"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=51295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=51295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=51295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}