{"id":4135,"date":"2016-09-03T16:30:31","date_gmt":"2016-09-03T06:30:31","guid":{"rendered":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/?p=4135"},"modified":"2016-09-03T16:33:31","modified_gmt":"2016-09-03T06:33:31","slug":"customize-the-shopping-cart-image-in-the-cart","status":"publish","type":"post","link":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/customize-the-shopping-cart-image-in-the-cart-4135","title":{"rendered":"Customize the Shopping Cart Image\/Icon in the Cart"},"content":{"rendered":"<p>The <a href=\"https:\/\/www.tipsandtricks-hq.com\/wordpress-simple-paypal-shopping-cart-plugin-768\">simple shopping cart plugin<\/a> has a filter that you can use to\u00c2\u00a0customize the Shopping Cart image icon that is displayed at the top of the cart.<\/p>\n<h2>Code Example<\/h2>\n<p>The following code example shows how you can use your own custom cart image.<\/p>\n<p>Upload your custom cart image via the media library so you have the URL of the cart image ready.<\/p>\n<p>Add the following code block to your theme&#8217;s functions.php file and specify the actual custom cart image URL:<\/p>\n<pre>add_filter('wspsc_cart_icon_image_src', 'override_cart_image_icon');\r\nfunction override_cart_image_icon($cart_img_src)\r\n{\r\n    \/\/Specify the URL of your custom cart image\r\n    $cart_img_src = 'http:\/\/www.example.com\/uploads\/my-custom-cart-image-icon.jpg';\r\n    return $cart_img_src;\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The simple shopping cart plugin has a filter that you can use to\u00c2\u00a0customize the Shopping Cart image icon that is displayed at the top of the cart. Code Example The following code example shows how you can use your own custom cart image. Upload your custom cart image via the media library so you have [&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":[34,30],"tags":[178,196,24,32],"class_list":{"0":"post-4135","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-additional-guidance","7":"category-wordpress-shopping-cart","8":"tag-cart-shortcode","9":"tag-code-example","10":"tag-tweaks","11":"tag-wp-shopping-cart","12":"entry"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/4135"}],"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=4135"}],"version-history":[{"count":0,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/4135\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/media?parent=4135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/categories?post=4135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/tags?post=4135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}