{"id":215,"date":"2009-06-26T00:51:32","date_gmt":"2009-06-26T00:51:32","guid":{"rendered":"http:\/\/tipsandtricks-hq.com\/ecommerce\/?p=215"},"modified":"2016-08-08T14:22:03","modified_gmt":"2016-08-08T04:22:03","slug":"wordpress-estore-miscellaneous-tweaks","status":"publish","type":"post","link":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wordpress-estore-miscellaneous-tweaks-215","title":{"rendered":"WordPress eStore Miscellaneous Tweaks"},"content":{"rendered":"<h3>1. How to Show the Shopping Cart Widget Only When There are Items in the Cart<\/h3>\n<p>Add a standard WordPress text widget to the sidebar widget. Then use the following shortcode in that text widget:<\/p>\n<pre>[wp_eStore_cart_when_not_empty]\r\n<\/pre>\n<h3>2. How to Change the Look and Feel of the Shopping Cart?<\/h3>\n<p>If you want to customize\/change the way your shopping cart looks (for example you want to change the size of the \u00e2\u20ac\u02dcYour Shopping Cart\u00e2\u20ac\u2122 title) then just introduce the following \u00e2\u20ac\u02dcdiv\u00e2\u20ac\u2122 in your wordpress theme\u00e2\u20ac\u2122s Stylesheet (style.css) file. Alternatively, you can just modify the \u00e2\u20ac\u02dcwp_eStore_style.css\u00e2\u20ac\u2122 file that came with the plugin.<\/p>\n<pre>.shopping_cart{\r\nfont-size:12px;\r\ncolor:#228CD2;\r\n}\r\n.shopping_cart h2{\r\nfont-size:14px;\r\n}<\/pre>\n<p>Of course you will have to change the font size and color etc to your needs and maybe add more style to it. This is just a guideline.<\/p>\n<h3>3. How to Use a Custom Image as the button<\/h3>\n<p>Simply put the URL of the image that you want to use as the button (for customized button image) in the &#8220;Button Image URL&#8221; field of that product under the &#8220;Additional Product Details&#8221; section. There are some button images included in the &#8220;images&#8221; directory of the plugin that you can use freely.<\/p>\n<h3>4. How to Use the &#8216;Buy Now&#8217; or &#8216;Subscribe&#8217; button on a Standalone HTML page<\/h3>\n<p>If you want to use the &#8216;Buy Now&#8217; or &#8216;Subscribe&#8217; button on a standalone HTML page (eg. landing page) on a domain where you have the WP eStore plugin installed then you can use the following option to achieve this:<\/p>\n<ul>\n<li><a href=\"https:\/\/support.tipsandtricks-hq.com\/forums\/topic\/estore-how-to-use-a-text-link-to-accommodate-the-purchase-of-a-product\" target=\"_blank\">How to Use a Text Link to Accommodate the Purchase of a Product<\/a><\/li>\n<\/ul>\n<p>Alternatively, you can use the following method:<\/p>\n<ul>\n<li>Configure a product with &#8216;Subscription&#8217; or &#8216;Buy Now&#8217; button using the WP eStore.<\/li>\n<li>Put this product on a WordPress post or page then preview the page or publish it so you can view the page from the front end.<\/li>\n<li>Now, select view source in the browser so you can view the HTML code of this page. Find the HTML code generated for the button.<\/li>\n<li>Then copy and paste the HTML code for this button in the standalone HTML page.<\/li>\n<\/ul>\n<p>The plugin will handle the post payment processing when someone makes a purchase using this button.<\/p>\n<h3>5. How to make the &#8220;instruction&#8221; input box bigger<\/h3>\n<p>Search for the following line in the &#8220;eStore_button_display_helper.php&#8221; file:<\/p>\n<pre>&lt;input type=\"text\" name=\"custom_input\" value=\"\" class=\"eStore_text_input\" \/&gt;\r\n<\/pre>\n<p>Once you find it replace it with the following (there will be 2 occurrences so change them both):<\/p>\n<pre>&lt;textarea name=\"custom_input\" cols=\"20\" rows=\"3\" \/&gt;&lt;\/textarea&gt;\r\n<\/pre>\n<p>Please note that you shouldn&#8217;t use the Instruction input box to collect long instructions as that field has a limit of 256 characters. If you need to collect long instructions from the customer during checkout then you should use PayPal&#8217;s special instruction input section explained <a href=\"http:\/\/www.tipsandtricks-hq.com\/ecommerce\/?p=523#collect_instruction\">here<\/a>.<\/p>\n<h3>6. How to Customize the Checkout Page on PayPal<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=p\/mer\/cowp_summary-outside#add\">Customize the Checkout Page on PayPal with Customer Header image and border<\/a><\/li>\n<\/ul>\n<h3>7. How to Hide a Page (eg. Thank You page) from the WordPress Menu<\/h3>\n<p>The pages in the menu are displayed using the following code in your template file (it may have some additional parameters):<\/p>\n<pre>&lt;?php wp_list_pages(); ?&gt;<\/pre>\n<p>You just have to change that to use the following:<\/p>\n<pre>&lt;? php wp_list_pages('exclude=5,8'); ?&gt;<\/pre>\n<p>This way WordPress will exlcude pages with the id 5 and 8 from displaying on the navigation. You will have to replace these number with the page id of the pages that you want to hide from displaying.<\/p>\n<p>If you don\u00e2\u20ac\u2122t want to do it manually then you can use a plugin eg. the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/exclude-pages\/\">Page Exclude Plugin<\/a> that helps you exclude pages from displaying.<\/p>\n<p><a name=\"display_button\"><\/a><\/p>\n<h3>8. How to Display Button(s) on the Sidebar<\/h3>\n<p>In order to add button(s) to the sidebar you will need to use one of the PHP function calls. Please refer to the <a href=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-estore-shortcodes-and-functions-reference-460\">WP eStore Shortcodes<\/a> for a list of available functions.<\/p>\n<p>Now if you are calling the function from the theme&#8217;s template file (sidebar.php, header.php, footer.php etc) then you are fine but there is another way to do this using the widgets which could be more practical in some cases.<\/p>\n<p>1. Download and activate the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/php-code-widget\/\" rel=\"nofollow\">Executable PHP code<\/a> plugin if you don&#8217;t have it already. This plugin lets you call php functions from the widgets (it&#8217;s similar to the Text widget but it lets you execute PHP code too).<\/p>\n<p>2. Go to the widgets menu and add a &#8216;PHP Code&#8217; widget to the sidebar (where you want to display the &#8216;Add to Cart&#8217; buttons). Now you can enter PHP code here to display the buttons.<\/p>\n<pre>&lt;?php echo print_eStore_buy_now_button(1); ?&gt;<\/pre>\n<p>This will display a &#8216;Buy Now&#8217; type button for the product with product id 1.<br \/>\n<a name=\"display_cart\"><\/a><\/p>\n<h3>9. How to Display the Shopping Cart Using a PHP Function Call<\/h3>\n<p>If you ever want to show the shopping cart by calling a php function for whatever reason then the following bit of code should do the trick:<\/p>\n<pre>&lt;?php echo eStore_cart_when_not_empty(); ?&gt;<\/pre>\n<h3>10. How to Display a Simple List of all the Products with &#8216;Add to Cart&#8217; Buttons<\/h3>\n<p>WP eStore allows the listing of all the products configured in the database with a simple trigger text or by calling a function. To show the listing of all the products in a post or page use the following trigger text in HTML view.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1190\" title=\"show_products_table_tag\" src=\"https:\/\/www.tipsandtricks-hq.com\/wp-content\/uploads\/2009\/03\/show_products_table_tag.jpg\" alt=\"show_products_table_tag\" width=\"276\" height=\"14\" \/><\/p>\n<p>You can also call the following function from any template file of your theme to display the products list.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1191\" title=\"show_products_table_function\" src=\"https:\/\/www.tipsandtricks-hq.com\/wp-content\/uploads\/2009\/03\/show_products_table_function.jpg\" alt=\"show_products_table_function\" width=\"322\" height=\"14\" \/><\/p>\n<p>Credit: This feature was suggested and implement by <a href=\"http:\/\/urbanverve.com\">Cornel Ivanescu<\/a><\/p>\n<h3>11. How to Display the MP3 Tracks as Preview<\/h3>\n<p><strong>Step1:<\/strong> Download the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/audio-player\/\">WordPress audio player plugin<\/a><\/p>\n<p><strong>Step2:<\/strong> Create your preview\/demo mp3 file (eg. first 10 seconds of your real mp3 music).<\/p>\n<p><strong>Step3:<\/strong> Embed this demo mp3 using the Audio player<\/p>\n<p><strong>Step4:<\/strong> Configure a product using the eStore&#8217;s Add\/Edit Products menu (specify the URL of the real mp3 file as the downloadable file)<\/p>\n<p><strong>Step5:<\/strong> Put the &#8220;Add to Cart&#8221; or &#8220;Buy Now&#8221; button next to the embedded demo that you created in step 3 so customers can purchase it.<\/p>\n<p>When anyone makes a purchase using that &#8220;Add to Cart&#8221; button they will get the full version mp3 as the download.<br \/>\n<a name=\"multiple_currency\"><\/a><\/p>\n<h3>12. How to Create Buttons to Accept Payment in Multiple Currencies<\/h3>\n<p>You can create &#8220;Buy Now&#8221; type buttons in any currency you like. For example, you can have two buttons for the same product (one in USD and the other in EUR).<\/p>\n<p>To create &#8220;Buy Now&#8221; type buttons in different currencies simply specify it in the &#8220;Buy Now Type Button Specific Settings&#8221; section of the product (enter it in the &#8220;Currency Code&#8221; field).<\/p>\n<p>This does not work for &#8220;Add to Cart&#8221; type buttons though. Here is the reason if you are asking why:<\/p>\n<div id=\"code_block\">What happens when the customer adds multiple products to the shopping cart that are in different currencies? How do you calculate the total? Not to mention that PayPal won&#8217;t process a payment if a checkout has items in different currencies.<\/div>\n<h3>13. Making Credit Card the Default PayPal Checkout Option<\/h3>\n<div>Use <a href=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/make-credit-card-the-default-checkout-option-for-paypal-standard-3512\">this addon plugin<\/a> to force PayPal to show the credit card as the default option on the checkout page.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. How to Show the Shopping Cart Widget Only When There are Items in the Cart Add a standard WordPress text widget to the sidebar widget. Then use the following shortcode in that text widget: 2. How to Change the Look and Feel of the Shopping Cart? If you want to customize\/change the way your [&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":[13],"tags":[24,9,201],"class_list":{"0":"post-215","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-additional-resources","7":"tag-tweaks","8":"tag-usage","9":"tag-wordpress-estore","10":"entry"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/215"}],"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=215"}],"version-history":[{"count":0,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/215\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/media?parent=215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/categories?post=215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/tags?post=215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}