Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
niccol
sorry, I have another slight problem.
when i try to switch wordpress themes I get a blank screen rather than the preview with the error message:
Code:
Fatal error: Call to a member function get_template_dir()
on a non-object in /home/16602/adseddon/www.starlessriver.com
/public_html/shop/includes/languages/english/starlessriver
/credit_cards.php on line 46
actually the functionality of switching themes works fine so I just get an annoying error message. A quick search indicated that this error isn't unknown but Dr Byte says that this is probably a WOZ issue so here I am back in this forum !:smile:
thanks again
Nick
I would suggest search through this thread for the error message.. Aside from that, it is my understanding that this module as written was meant to be used with the default WP theme. Another theme may introduce code which causes WOZ ro behave badly/oddly. (I have seen WP themes which even embed encrypted code which displays ads and odd links on your site.:no:)
Barring you finding an answer within this thread, you might also try posing your question on the WP forum as well. Otherwise my strong suggestion is to use the WP default template and modify it to match the theme you are trying to use.. WP themes are pretty simple to mod..:yes:
Also one last thing.. If I had to guess, it sounds like your WP files are in the same directory as your Zen files.. This might cause an issue if you are using a theme this mod was not intended to work with.. If I am right, try moving WP to it's own directory and update WOZ to reflect this change, and see if you still have the same issue..
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
DivaVocals
I would suggest search through this thread for the error message.. Aside from that, it is my understanding that this module as written was meant to be used with the default WP theme. Another theme may introduce code which causes WOZ ro behave badly/oddly. (I have seen WP themes which even embed encrypted code which displays ads and odd links on your site.:no:)
Barring you finding an answer within this thread, you might also try posing your question on the WP forum as well. Otherwise my strong suggestion is to use the WP default template and modify it to match the theme you are trying to use.. WP themes are pretty simple to mod..:yes:
Also one last thing.. If I had to guess, it sounds like your WP files are in the same directory as your Zen files.. This might cause an issue if you are using a theme this mod was not intended to work with.. If I am right, try moving WP to it's own directory and update WOZ to reflect this change, and see if you still have the same issue..
Thanks for your answer and your time,
I find it unlikely that it is a issue with the theme. I have a bit of experience with WP themes and had just copied the default theme to a new folder to use as the base of a new theme. So the two folders actually contain exactly the same files. It is not as if I am using some whacky bought theme.
Also, the error occurs whether I am changing 'from' or 'to' the default theme which suggests it doesn't have too much to do with the theme.
No, the installation is in two separate directories both at the same level as each other - one below root.
I have searched this thread and haven't come up with much of use. Likewise the Zen Cart forum.
To me it looks like the error message is definitely Zen Cart generated as it refers to a Zen Cart file:
The line it refers to is line 46 of the credit_card.php file. Which goes:
Code:
define('IMAGE_CC_ENABLED_VISA', zen_image($template->get_template_dir('cc1.gif', DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . 'cc1.gif'));
The only reference in the forum to this goes along the lines of :
Quote:
The choke occurs here:
Fatal error: Call to a member function on a non-object in /home/content/z/o/l/zolaweb/html/zencart/includes/languages/english/credit_cards.php on line 46
The issue is that the object $template doesn't exist
That being said, $template *should* have been created, it gets called earlier in the code without puking, so I'm digging through to see where it gets unset/lost whatever.
I will report back later today with more details and hopefully a fix.
But really other than talking about it being a session issue does not provide any answers.
Does anybody have any ideas?
Nick
Re: Wordpress On Zencart / Released
So if the new theme is based on the default, AND the add-on worked with the default theme, why not just simply modify the default theme and be done with it..?? Just a thought.. I mean sure it would be nice to know THE answer:yes:, but seeing that this is largely an abandoned add-on, you may not get an answer here.. (sad but true) You might need to start looking at "Plan B" options..
Quote:
Originally Posted by
niccol
Thanks for your answer and your time,
I find it unlikely that it is a issue with the theme. I have a bit of experience with WP themes and had just copied the default theme to a new folder to use as the base of a new theme. So the two folders actually contain exactly the same files. It is not as if I am using some whacky bought theme.
Also, the error occurs whether I am changing 'from' or 'to' the default theme which suggests it doesn't have too much to do with the theme.
No, the installation is in two separate directories both at the same level as each other - one below root.
I have searched this thread and haven't come up with much of use. Likewise the Zen Cart forum.
To me it looks like the error message is definitely Zen Cart generated as it refers to a Zen Cart file:
The line it refers to is line 46 of the credit_card.php file. Which goes:
Code:
define('IMAGE_CC_ENABLED_VISA', zen_image($template->get_template_dir('cc1.gif', DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . 'cc1.gif'));
The only reference in the forum to this goes along the lines of :
But really other than talking about it being a session issue does not provide any answers.
Does anybody have any ideas?
Nick
Re: Wordpress On Zencart / Released
Well, actually i can work with any theme I like as long as I don't change between them.
Yes, you are right - I may never know the answer. It isn't a show stopper.
So, I will sidestep the issue. Which raises another question whether I am going about this the right way in the first place.
I have a site with a shop and with a 'must sign in to comment' wordpress news section. I want the login's for the shop and the blog to be the same. If a customer is logged into the blog then they are logged into the shop. And vice versa.
As I write this I realise the code isn't all that intricate but is there a good solution to do this that already exists?
WOZ with the add-on zencart-and-wordpress-user-integration seemed to do it but is there a better solution? I don't really care about templates/themes - I can make wordpress/zen cart/xhtml all look the same anyway.
Thanks
Nick
And thanks divavocals for all your help in general:smile:
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
niccol
Well, actually i can work with any theme I like as long as I don't change between them.
Yes, you are right - I may never know the answer. It isn't a show stopper.
So, I will sidestep the issue. Which raises another question whether I am going about this the right way in the first place.
I have a site with a shop and with a 'must sign in to comment' wordpress news section. I want the login's for the shop and the blog to be the same. If a customer is logged into the blog then they are logged into the shop. And vice versa.
As I write this I realise the code isn't all that intricate but is there a good solution to do this that already exists?
WOZ with the add-on zencart-and-wordpress-user-integration seemed to do it but is there a better solution? I don't really care about templates/themes - I can make wordpress/zen cart/xhtml all look the same anyway.
Thanks
Nick
And thanks divavocals for all your help in general:smile:
You're welcome.. :smile: As for your question HOPEFULLY someone will post an answer.. However, the real downside of this add-on is that because it is an abandoned project, this thread generally only sees action when people have issues.. There unfortunately isn't enough of an exchange of "ideas' in this thread.. **sigh**
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
niccol
The line it refers to is line 46 of the credit_card.php file. Which goes:
Code:
define('IMAGE_CC_ENABLED_VISA', zen_image($template->get_template_dir('cc1.gif', DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . 'cc1.gif'));
Does anybody have any ideas? Nick
the conflict is because of this variable: $template , which has been defined earlier by wordpress. Do you still have this line at the end of your wordpress-config.php file? $template = new template_func(DIR_WS_TEMPLATE);
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
rainthebat
the conflict is because of this variable: $template , which has been defined earlier by wordpress. Do you still have this line at the end of your wordpress-config.php file? $template = new template_func(DIR_WS_TEMPLATE);
no I don't have that line anywhere in that file.
thanks for your help.
Nick
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
niccol
no I don't have that line anywhere in that file.
thanks for your help.
Nick
I am sorry, that is incorrect. That line does not go at the end of wordpress-config.
However, I still believe that it is the $template variable problem.
When does this problem occur? Is it when accessing the wordpress_default.php page? Or when accessing any wordpress page?
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
niccol
Does anybody have any ideas?
Nick
It is something to do with the pesky wp_redirect() function on line 17 of wp-admin/themes.php
Re: Wordpress On Zencart / Released
Quote:
Originally Posted by
rainthebat
I am sorry, that is incorrect. That line does not go at the end of wordpress-config.
However, I still believe that it is the $template variable problem.
When does this problem occur? Is it when accessing the wordpress_default.php page? Or when accessing any wordpress page?
Yes, in a quick search of the whole forum the only other reference to this error had it down to a issue about when and how the variable $template is defined. In their case it seemed to be a session issue but that isn't the issue here I think.
When it occurs for me is in the wp admin section when I try to change themes- so this really isn't a great problem ( ie so despite your kindness do not waste huge amounts of time on it ) as long as it isn't the first sign of anything horrible !
In my head at the moment I have an problem when a Zen Cart/Wordpress preview page is called from the Wordpress admin area as a preview. This sounds like there is a weirdness in the way the variable $template is defined in the two programs. I am guessing that the variable is used in both lots of code? I'll have a look when I get a minute.
As long as I believe it is what I have described then I don't have too much problem in just sidestepping it.
Thanks again guys.....