Results 1 to 10 of 19

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    15
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    May 2006
    Location
    Texas
    Posts
    565
    Plugin Contributions
    4

    Default Re: WordPress and Zen Cart

    Quote Originally Posted by jamiemcparland View Post
    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)

  3. #3
    Join Date
    Dec 2006
    Posts
    15
    Plugin Contributions
    0

    Default 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

    Code:
    <?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 ;)

  4. #4
    Join Date
    Dec 2006
    Posts
    15
    Plugin Contributions
    0

    Default 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?

  5. #5
    Join Date
    May 2006
    Location
    Texas
    Posts
    565
    Plugin Contributions
    4

    Default Re: WordPress and Zen Cart

    Jamie,

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

    Code:
    <?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 :).

  6. #6
    Join Date
    Dec 2006
    Posts
    15
    Plugin Contributions
    0

    Default 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

    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
    Code:
    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!

  7. #7
    Join Date
    Dec 2006
    Posts
    15
    Plugin Contributions
    0

    Default 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.

    Code:
    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

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

    I 've also tryed
    Code:
    <?php require('./wordpress/wp-blog-header.php'); ?>
    and
    Code:
    <?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!

 

 

Similar Threads

  1. Wordpress blog and Zen-Cart?
    By Rimo in forum General Questions
    Replies: 1
    Last Post: 25 Apr 2011, 09:35 PM
  2. Wordpress and Zen Cart Sessions
    By roweenaweb in forum General Questions
    Replies: 3
    Last Post: 28 Sep 2010, 01:29 PM
  3. Replies: 1
    Last Post: 18 Jul 2010, 08:35 AM
  4. Wordpress and Zen-Cart
    By gene6482 in forum General Questions
    Replies: 1
    Last Post: 1 Feb 2007, 04:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg