Wordpress woocommerce weird problems - php

First of all, thank you for bothering to read this topic, I feel like this is going to be a long and painful one, as I'm trying for about 7-8 hours now to get what the hell is happening with this plugin.
I am a developer, so I know what I'm doing, and this isn't my first page I did using WordPress.
The problem started when I started reading up on woocommerce's documentations which are widely known as quite poorly documented.
Since I made a custom theme, which I have had before already, I've decided to use the overwrite method as well as the woocommerce.php method for customizing the plugin to fit the site as I'd like it to.
The woocommerce_content(); is customized now, and nicely working as well as the product pages (single product page) which are customized as well, and working.
As soon as I try to access the account features, nothing happens. I've tried adding echoes for debugging purposes to the my-account.php, but it does not echo what I write, so I assume the shortcode cannot load for some reason, because it does not reach the my-account.php page as it should, and it points somewhere else perhaps?
Then I've noticed that when I click the "Add to cart" button, it appends the element with a "View cart" button as well, so me thinking this is working, I left it as it is. For like 5 seconds, because right after a page refresh, or navigating to another page, the content of the cart gets empties, I cannot even see the cart page, nor the login page, nor the create account page, or anything in fact.
Everything is working that is inside my "wp-content\themes\mytheme\woocommerce" folder, but nothing else that is inside my
"wp-content\themes\mytheme\woocommerce\any-subfolder"
The woocommerce system status does not show any error, nor the PHP error log, nor anything else.
I have a VERY long list of "Overrides (WooCommerce):" which I don't want to paste here because of reasons.
The only success when I was able to at least get something out from the plugin, is when I used the wordpress function "do_shortcode();" and added the myaccount or cart shortcode myself to a page, THAT worked, and printed it out, however I'd like to use the original method, so the code won't get too complex for later on.
Every other site is working fine, I'm currently running this on localhost, cookies working, sessions working, I log everything yet there is no error, mod_rewrite working correctly, yet I am stuck.
Looking for a patient gentleman to help me on this painful day...
EDIT:
Added "[woocommerce_my_account]" to the "shop" page which page's file is the "woocommerce.php" has actually loaded up the correct my-account.php from "themeroot/woocommerce/myaccount/my-account.php" It echoes out my debug messages as well, so the shortcodes should be working, perhaps this isn't just a woocommerce related issue?
EDIT2:
After fiddling around a LOT, I've come to understand that the wrapper hook it is supposed to do (div id=content and div id=main) does NOT get hooked in it, perhaps it is just a small problem, since I've removed them with remove_action, and the "Shop" page still displayed properly... I have NO idea what is going on with this plugin, but I don't have the luxury of time to fiddle around with it... This is such a pain...
EDIT3:
The plugin works perfectly on any other basic theme, so there is something up with my custom theme. Even after hours of searching the differences between the default theme (twenty-fifteen) and mine, I have not found the solution.

I have solved the problem... It is of course entirely my fault, the problem is just that woocommerce has so poor documentation, I did not really thought about this.
For anyone out there creating custom themes for WordPress, please note that in order for your page.php to actually use the shortcode of the page you have navigated on, you must print out the content of the page (the_content();).
This was my solution for my mistake that took many many hours...

Related

Wordpress Woocommerce Variation Not Resolving

my wordpress website has woocommerce installed with multiple tshirts and variations. When I click on the variations button within a specific product, I get the pinwheel and the backend just keeps loading. It never resolves.
Also worth nothing is that I have tried deleting all plugins except Woocommerce and this still happens. At the moment, I am also unable to delete any plugins on the site. The site just loads and loads and never resolves.
I'm assuming something funky is messing with the coding on the site. Anyone ever experienced this before or know what I can try?

Opencart language picker wierdly not working on few pages

I have this wierd problem, on opencart 2.xx i have 2 languages and the language switcher is working fine on some and doing nothing on others, added to this language is randomly switching as i go through page.
I have no idea whan can cause this so i cant provide specific section of code.
I discovered that it works fine on pages that have some kind of imput, like login, register, cart, checkout etc.. And not working at all on others, dunno if its related tho.
Also theres this problem, also in header so maybe its corelated, when i add item to cart, go to different page, cart shows 0 until i hover it, after i hover it immediately shows correct number.
Example of page with NOT working switcher: http://corddecker.com/index.php?route=product/category&path=25_29
Example of page with working switcher: http://corddecker.com/index.php?route=account/login
If you can just check that behaviour and give me some idea what can be causing this, would be awesome because i have no idea.
Thank you
I've notice your theme is calling magnificPopup function in this address:
http://corddecker.com/index.php?route=product/category&path=25_29
And jquery.magnific-popup.min.js is not included in your theme.
This caused and error that can affect some of your other codes.
As by default Opencart 2.x comes with a copy of jquery.magnific-popup.min.js try to add this to your header.tpl:
<script type="text/javascript" src="catalog/view/javascript/jquery/magnific/jquery.magnific-popup.min.js"></script>
and make sure the file exists on that directory.

Woocommerce href's for Cart, Checkout, My Account are all empty.

I have gone through every conceivable update to try and get this to work.
I have a clients blog where we're trying to implement Woocommerce, but despite working when we first lauched, something has gone wrong recently and I cannot track it down.
I have gone through both options listed here:
http://docs.woothemes.com/document/third-party-custom-theme-compatibility/
I have updated Wordpress in the dashboard, this caused issues so I then updated it manually and ftp'd all the content to the site, after reading this.
https://wordpress.org/support/topic/fatal-error-after-41-upgrade#post-6349382
Then I had a notification that Woocommerce could be updated, so I took advantage of that.
I have also tried disabling and re-enabling woocommerce, and deleting and reinstalling it. The only weird discrepancy is that in the previous version if I checked the woocommerce pages in the dashboard, I could see these hooks:
[woocommerce_checkout]
[woocommerce_cart]
But now those are not present and the page is not editable, but I assume this is part of the latest woocommerce version.
I also tried to enable stable wordpress themes (twentytwelve and twentyfifteen) to see if there was a conflict with my child theme, but that didn't solve anything. This is as per the advice here:
https://support.woothemes.com/hc/en-us/articles/203112147-How-to-Get-Help
Here is a screenshot from one of my empty href's.
I realise this is a vague question with no code referenced, but I just don't know what is going on.
I can send a link to the site if that helps I am just hoping someone else has also come up against this issue.
In your dashboard go to WooCommerce > Settings and check in every tab that the right page is linked. This will allow the Woo links to work correctly.

Edit WP html code, but cannot find the page

I am new to Word Press and I have been assigned to change something at work in our homepage.
I am always worked with raw HTML/CSS/php files, so I am a bit out of place here.
The page in question is the following: GAN Integrity Solutions Products
Inspecting the html I found where the CSS is (in the theme folder).
If I go in word press under pages, and I choose Products (which is the page I want) there is not content in it even in the text or visual editor. (but the page does indeed have content)
I installed the plugin called "Always edit in HTML" but it only removes the Visual tab and does not really replace it with the HTML tab (like I have seen a friend of mine has).
Also I am currently using WP v. 3.7.1 and I have not update because I still had to learn what happens when one updates (does it screw up my site? I can't afford to screw it up).
Anyone have any idea of what I am doing wrong or how I can solve this?
Btw the different "products" are created individually under "Portfolio" but what I would like to edit is that first link page html. What I need to do is instead of having pictures in the "squares" and then text as ones mouse over them, the reverse.
I would appreciate it!
Can you try to login in Wordpress?
You should go to pages and search for the product page.
Then check the template part.
Go to your themes map again and search for that template.
Your code should be there.
This is my first comment. Hope it is helpfull.

Order details not displaying (WooCommerce)

I'm having a strange issue with a site I'm designing. I'm using the WooCommerce system up and running and am using the Wootique theme. I've edited a bit but nothing too major, mostly just colours.
What's happening is, when I go to buy something and checkout, I am able to enter my details but nothing appears under the YOUR ORDER header. The NEXT/CONTINUE button is missing also, so I can't go any further.
Has anyone else experienced this? I can't seem to figure out why it's happening or how to fix it?
The test site is at http://kelvinwinscom.fatcow.com/
I ran into the exact same error on my woocommerce set-up. In my situation, it was a conflict with jQuery.
Woocommerce loads the latest version of jQuery in your themes head section. I was manually loading an older version of jQuery in my themes footer. Having the two copies of jQuery was breaking the "order" section, causing nothing to load. By removing the jQuery copy I was manually adding, the problem was resolved.
It may be likely that you've done something similar, or that you're using a plugin that is adding jQuery in a non-wordpress manner (Not using wp_enqueue_script and other script registering and enqueue-ing functions)

Categories