Before asking question here I want to tell that I have already asked the question in stackoverflow and wordpress forum but have not got any answer. So finally I came here.
I have installed the woocommerce plugin in my wordpress 3.5.2. Everything is fine with woocommerce. I have made a folder called woocommerce and have pasted all the files inside the woocommerce template files inside my template folder. But there is something that I am totally stuck on. In the woocommerce checkout page I want to show cart totals in sidebar. But it is not showing there. In other pages it is working fine. So can someone kindly tell me what wrong here? Any help and suggestions will be really appreciated. Thanks
Update
Here is the screenshot for the woocommerce cart widget in sidebar which can be shown in all pages except the checkout page.
Edit:
Additional, how to make this change secure from updates?
The cart widget isn’t showing because it’s configured to not show on the
cart and checkout page
. If you want to change that take a look atclass-wc-widget-cart.php
, there you find the following line:Change it to:
To show the widget on the checkout page.
Note: This will be, if done in the plugins/woocommerce/classes/widgets folder, overwritten on updates.
Edit: Additional information how to override widget and make changes update secure
Source: http://www.skyverge.com/blog/overriddin-woocommerce-widgets/ (Option 5)
class-wc-widget-cart.php
;cust_woo_widgets
Additionally make the following change to the widget duplicate:
Put following code into your
functions.php
:Note: See source for more information; untested.
I added the following code to my functions.php and now the cart is showing on all my pages.
It is not recommended to change the core file of the plugin as on the update your changes will be lost. Better use the following code to show cart widget in the sidebar on checkout page