Zen Cart Logo
Forums / All Other Contributions/Addons / WordPress and Zen Cart

WordPress and Zen Cart

Locked

Views: 4,751

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
28 Dec 2006, 11:09 AM
#1
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

WordPress and Zen Cart

Maybe this isn't the place to post this but since all of us are using zen cart maybe it is ;)

I have the module that allows WP and zen cart to play together installed and working. I would like the front page of my store to display the main wordpress page.

I know i could do a redirect to the wordpress page but that's kind of a drag.. I'd really like to have the blog and at the bottom of the blog still display the "New Products for December" thingie..

I know that's asking alot. I thought about maybe somehow doing a server side includes but that doesn't seem to be working.

Any thoughts??

28 Dec 2006, 2:11 PM
#2
xerophyte avatar

xerophyte

New Zenner

Join Date:
Nov 2006
Posts:
4
Plugin Contributions:
0

Re: WordPress and Zen Cart

It should not be hard, just modify your zen cart template to display the wordpress loop on the front page or where-ever you want the loop, it will put it there

hope that helps

http://www.linuxnetworkcare.com
Affordable Linux Server Managament Solution

29 Dec 2006, 8:25 AM
#3
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

sounds easy but i have no idea what tham means haha! I looked in the faq and forums about wordpress and loops, also on the wordpress site. But i don't really get it. Is their some kind of tag i can stick on the zen index.php?

Could you give me an example? Sorry to be such a pain.. I'm stumped on this one.

Thanks!
Jamie

29 Dec 2006, 9:40 AM
#4
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: WordPress and Zen Cart

jamiemcparland:

sounds easy but i have no idea what tham means haha! I looked in the faq and forums about wordpress and loops, also on the wordpress site. But i don't really get it. Is their some kind of tag i can stick on the zen index.php?

Could you give me an example? Sorry to be such a pain.. I'm stumped on this one.

Thanks!
Jamie

Are you talking about something like on the front page of http://www.getyourgameshere.com ? I basically did what xerophyte was saying.. put some code into my define_main_page that loops and pulls posts from wordpress (currently latest 3 posts)

29 Dec 2006, 9:50 AM
#5
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

Yea that's exactly it! I'm getting close. I got a loop going and i'm sticking it in the define_main_page.php but i'm fighting an error message right now.

Heres the loop that i'm working on right now

<?php
require('./wordpress/wp-blog-header.php');
?>

<div id="blog"><?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<div class="post" id="post-<?php the_ID(); ?>">
	 <h3 class="storytitle"><?php the_title(); ?></a></h3>
</div>
	
	<div class="storycontent">
		<?php the_content(__('(more...)')); ?>
	</div>
	

</div>

<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</div>

But i'm getting this error ugh!

1146 Table 'wordpress.configuration' doesn't exist
in:
[select configuration_key, configuration_value from configuration where configuration_key RLIKE 'SHOW_PRODUCT_INFO_MAIN' and configuration_value > 0 order by configuration_value]
1146 Table 'wordpress.sessions' doesn't exist
in:
[select count(*) as total from sessions where sesskey = '2pavvh6j66ieaf1p5as8bo3h81']

Care to share the loop code your useing ;)

29 Dec 2006, 9:53 AM
#6
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

Hey samad64,
that's a great theme you have on your site. Is that one you made or is it available for download somewhere?

30 Dec 2006, 2:58 AM
#7
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: WordPress and Zen Cart

Jamie,

Here's the code I've got on the define_main_page:

<?php require('wordpress-path/wp-blog-header.php'); ?>
<?php
$posts = get_posts('numberposts=3'); // change to whatever number of posts to show
foreach($posts as $post) :
setup_postdata($post);
?>
<h2><strong><font color="red"><?php the_title(); ?></font></strong></h2>
<?php the_date(); ?>
<?php the_content(); ?><hr />
<?php endforeach; ?>

Currently its not XHTML and pretty poor regarding formatting (using the font tag) but i didn't have too much time when i put it together.. I plan to make a css entry for it and everything so its all CSS based instead of hardcoded into it

I'm not sure why you're getting that error, though it could be related to the path of your wordpress install

Regarding the theme.. thanks! its actually the default theme from 1.3.5 (classic tableless) with the blue graphic taken from the TruBlu template from Qhome and the silver button package in the downloads section :).

4 Jan 2007, 12:39 PM
#8
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

Thanks samad64 for all your help so far!

I've been working on this for days and i'm still stumped. I posted this as my loop code

<?php require('wordpress/wp-blog-header.php'); ?>
<?php
$posts = get_posts('numberposts=3'); // change to whatever number of posts to show
foreach($posts as $post) :
setup_postdata($post);
?>
<h2><strong><font color="red"><?php the_title(); ?></font></strong></h2>
<?php the_date(); ?>
<?php the_content(); ?><hr />
<?php endforeach; ?>

and i keep getting this error

1146 Table 'wordpress.configuration' doesn't exist
in:
[select configuration_key, configuration_value from configuration where configuration_key RLIKE 'SHOW_PRODUCT_INFO_MAIN' and configuration_value > 0 order by configuration_value]

Then the "New Products for January" don't show up!

So i started from scratch, to hopefully figure out where i went wrong. Yep a fresh install of Zen Cart and a fresh install of wordpress in another directory.

You can see my orig problem here
http://propsbmx.net/zen/

and my virgin install here
http://propsbmx.net/zen2/

In both instances wordpress is under the zen directory so..

http://propsbmx.net/zen/wordpress/ is where wordpress lives.

I thought it was a wordpress problem at first but reading the error closer it's obvious it's not a WP problem.

Ideas anyone? I'm totally stumped!

5 Jan 2007, 10:18 AM
#9
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

I spent another 6 hours on this tonight and still i'm no where.. Actually that isn't true. It seems the error i get changes depending on where i stick the wordpress loop.

I cleared out the define_main_page.php so it was totally blank. My site started to work again. (with no wordpress)

So i decided to paste my wordpress loop in the tpl_footer.php to see if that worked. Then i got this error.

1146 Table 'wordpress.banners' doesn't exist
in:
[select banners_id, banners_title, banners_image, banners_html_text, banners_open_new_windows, banners_url from banners where status = 1 and ( banners_group = 'Wide-Banners') order by rand()]

Which is funny because now it's complaining about banners. So i trimmed down the loop and just pasted this in the tpl_footer.php

<?php require('wordpress/wp-blog-header.php'); ?>
``` and i get the error. 

I 've also tryed ```
<?php require('./wordpress/wp-blog-header.php'); ?>

and ```

<?php require('/wordpress/wp-blog-header.php'); ?>
With the same result.

So i don't know what's going on. All i can tell is zen cart is hating the wp-blog-header.php file for some weird reason. 

I've looked up and down this site and the WP site to no avail. 

Help! :blink:
5 Jan 2007, 10:33 AM
#10
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: WordPress and Zen Cart

Info below may not help but posting anyway.
Original WordPress module only worked correctly
when zencart was installed into main domain name
i.e did not work when zencart installed into subfolder
of main domain name.
Latest WordPress Module fixed this anomaly..

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

5 Jan 2007, 7:57 PM
#11
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: WordPress and Zen Cart

Jamie, do you have wordpress installed on a Subdomain or anything? When I go to visit this page: http://www.propsbmx.net/zen/wordpress/ all the formatting is gone.. normally there should be a template there

Other than that.. lets try something. Instead of just putting wordpress/wp-header... put zen/wordpress/wp-header.. so your require statements will look like this:

<?php require('zen/wordpress/wp-blog-header.php'); ?>

Hopefully that will work

6 Jan 2007, 9:43 PM
#12
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

No it's not in a subdomain. It's we have a virtual server all to ourselves and it's in a users public folder. So the path to wordpress is like

/home/propsadmin/public_html/zen/wordpress

and the URL ends up here

http://propsbmx.net/zen/wordpress/

I tryed your suggestion

<?php require('zen/wordpress/wp-blog-header.php'); ?>

but it didn't do much good.

This is the silliest problem but i need a blog on the front page of a shopping cart. ugh!

I really do appreciate all the help.

6 Jan 2007, 10:24 PM
#13
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

Ok i did a fresh install of zen cart and wordpress on another totally different host.

I got the same exact problem. I don't know what i could be doing wrong!

Check it out.

http://www.jamiemcparland.com/zen/index.php

6 Jan 2007, 10:51 PM
#14
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: WordPress and Zen Cart

I don't know much about the wordpress/zen mod but I did note that each of the errors you have posted says that a table or two is missing. Have you made sure that the tables its looking for are in the database? and if they are is the path to the database in the wordpress config files correct? just my 2 cents.

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

7 Jan 2007, 12:25 AM
#15
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

I'm not useing the wordpress zen mod. Just a loop to stick the blog postings on the front page. Depending on where the loop is placed i get different errors about missing tables. I think something in the zen css or template files is what's balling this up.

7 Jan 2007, 7:59 AM
#16
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: WordPress and Zen Cart

Using WordPress Module, added blog post to main zencart page.
Only one post showing currently, but possible to add as many as
required... i.e as at
http://www.dezinacart.co.uk/index.php

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

7 Jan 2007, 9:11 AM
#17
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: WordPress and Zen Cart

jamiemcparland:

Ok i did a fresh install of zen cart and wordpress on another totally different host.

I got the same exact problem. I don't know what i could be doing wrong!

Check it out.

http://www.jamiemcparland.com/zen/index.php

You're getting somewhere though - the default wordpress post shows up on that page. Not sure why you're still getting that error though

7 Jan 2007, 1:06 PM
#18
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

Yea i've always been able to get postings to show up. I just get that error and then it kills all my boxes below it. Like the new products for january box.

As for the wordpress on zen cart module the current version says

"From this version, I do not include the main body of WordPress."

So it doesn't do me anygood. ugh!

7 Jan 2007, 1:10 PM
#19
jamiemcparland avatar

jamiemcparland

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: WordPress and Zen Cart

OK i think i found a work around. Although it's not the greatest.

<?php
$url = "http://www.propsbmx.net/zen/wordpress/index.php";
print file_get_contents($url);*
?>

This seems to work. I just need to strip the style sheet out of it so the zen style sheet will do the work.

I'll let you know how it goes - Jamie