{"id":3316,"date":"2014-10-06T11:58:37","date_gmt":"2014-10-06T00:58:37","guid":{"rendered":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/?p=3316"},"modified":"2014-10-07T09:50:54","modified_gmt":"2014-10-06T22:50:54","slug":"simple-shopping-cart-customize-the-thumbnail-section-of-the-product-box","status":"publish","type":"post","link":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/simple-shopping-cart-customize-the-thumbnail-section-of-the-product-box-3316","title":{"rendered":"Simple Shopping Cart &#8211; Customize the Thumbnail Section of the Product Box"},"content":{"rendered":"<p>You can customize the thumbnail image section of the product box\u00c2\u00a0display to suite the way\u00c2\u00a0you want to show it.<\/p>\n<p>Below is an example of how the thumbnail section of the product display box looks like:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.tipsandtricks-hq.com\/wp-content\/uploads\/2009\/02\/example-product-box-display-sc.jpg\" alt=\"product display box example\" width=\"306\" height=\"392\" \/><\/p>\n<p>Now, lets say you are using a lightbox plugin and you wanted to add lightbox to the thumbnail image. Below is an example snippet of code to show you how you can customize the thumbnail image section to accommodate that:<\/p>\n<pre>add_filter('wspsc_product_box_thumbnail_code', 'wspsc_my_custom_thumbnail_code', 10, 2);\r\nfunction wspsc_my_custom_thumbnail_code($img_code, $args)\r\n{\r\n    $thumbnail_src = $args['thumbnail'];\r\n    $img_code = '&lt;a href=\"'.$thumbnail_src.'\" rel=\"lightbox\"&gt;&lt;img src=\"'.$thumbnail_src.'\" alt=\"'.$args['name'].'\" &gt;&lt;\/a&gt;';\r\n    return $img_code;\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can customize the thumbnail image section of the product box\u00c2\u00a0display to suite the way\u00c2\u00a0you want to show it. Below is an example of how the thumbnail section of the product display box looks like: Now, lets say you are using a lightbox plugin and you wanted to add lightbox to the thumbnail image. Below [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[30],"tags":[24,32],"class_list":{"0":"post-3316","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-wordpress-shopping-cart","7":"tag-tweaks","8":"tag-wp-shopping-cart","9":"entry"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/3316"}],"collection":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/comments?post=3316"}],"version-history":[{"count":0,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/3316\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/media?parent=3316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/categories?post=3316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/tags?post=3316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}