Zen Cart Logo
Forums / All Other Contributions/Addons / Wordpress On ZC [Support Thread]

Wordpress On ZC [Support Thread]

Views: 620,628

Results 721 to 740 of 1,861
3 Apr 2009, 11:00 PM
#721
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Wordpress On ZC [Support Thread]

bumba000:

Selecting an option from the Filter List Drop Down doesn't take you to products it instead takes you to the blog.
Why?

After a little research, that one is beyond me, but I have some clue as to what is going on. The blogs address usually has a yoursite.com/? question mark at the beginning. You probably know that that is the beginning of a query string. In the past I've had software that also used a query string, and when clicking on a link you would instead be brought to the blog. But in this case the alpha sorter doesn't seem to be using a query string, so that may not be it.

How do you have your blog set up? Same directory/different?

Here is some code that renders the alpha sorter from modules/product_listing_alpha_sorter.php:

(isset($_GET['alpha_filter_id']) [B]?[/B] $_GET['alpha_filter_id']
```That question mark in the middle may be causing problems. Perhaps it could be replaced with && . I would experiment on that. 

I've got zen cart and blog in different locations on a test site (with all the zen cart test products on) and the alpha sorter does not interfere. However I do not have any sideboxes for wp enabled, so maybe thats why.
3 Apr 2009, 11:33 PM
#722
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Wordpress On ZC [Support Thread]

rainthebat:

  1. I do have two sideboxes enabled (as a test sort of) on the lower right side of the webpage. They are 'blog links' and 'blog pages'. Mostly this page is relying on the wordpress sidebar itself (displayed in the blog part) as opposed to the sidebar appearing in the zencart sideboxes. On another note, when I enabled the sidebar sidebox, it would display the sidebar in the sidebox (on the left column) and would not display the blog in the page.So the sidebar sidebox would cause the display of the blog to fail.. hmmmmm...

what about the other sideboxes, did you find you had issues with those and the ability of the blog to work?? (categories etc..)

4 Apr 2009, 12:03 AM
#723
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

Hey,
Thanks rainthebat. Haven't tried this yet I wanted to get this info out there first.

My install is in the root. Both ZC and WP are in the root. By root I mean inside of public_html.

I don't have the wp sidebox turned on but I do have some others. I don't use the manufacturers sidebox either.

This problem spawns when clicking the manu name in a product listing > being taken to the manufacturers page and give the option to then sort by category / see all products by that manu in a certain category. That's when ya get taken to the blog. Is this still apha sorter?

I will use DTK in admin to find the code that you refered to and try that out in just a min. I'm still not well versed in php but am on my way!

Thank You,
John

4 Apr 2009, 12:13 AM
#724
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

No Go.
Parse error: syntax error, unexpected ':' in /home/****/public_html/includes/modules/product_listing_alpha_sorter.php on line 29

any other ideas?

4 Apr 2009, 12:19 AM
#725
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

DivaVocals:

So the sidebar sidebox would cause the display of the blog to fail.. hmmmmm...

what about the other sideboxes, did you find you had issues with those and the ability of the blog to work?? (categories etc..)

The other sideboxes work. Just the sidebar sidebox does not. This box makes the function call: get_sidebar();

When the sidebox sidebar is on, funky things happen - the identical sidebar that is usually in the blog doesn't load - probably because it already has on a sidebox on column one. Also if on the home page the main blog won't display (just a message that says "oops, couldn't find that page", but the sidebox sidebar does display.

4 Apr 2009, 12:32 AM
#726
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

bumba000:

No Go.
any other ideas?

When you are brought to the blog page, what page are you brought to?

Is it
site.com/?yadaYada
or is it:
site.com/index.php?main_page=wordpress

I don't have any ideas, just trying to help come up with something.

4 Apr 2009, 12:40 AM
#727
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

bumba000:

any other ideas?

I go here:
http://www.12volt-travel.com/12-volt-cooler-accessories-c-688.html

and select a manufacturer, and brought to the blog page at this url:
http://www.12volt-travel.com/?main_page=index&cPath=688&sort=20a&filter_id=168

notice this from the link above:

.com/?main_page

something is missing from there, and it is the word index.php.

o.k., o.k., It seems to be a conflict between another module you have. I believe it is the seo module of some sort. I've never used this, but did see some posts just a few pages back with some people dealing with problems associated with the seo addon.

Let me know if you come up with anything on this.

4 Apr 2009, 12:40 AM
#728
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

The address in the address bar is correct

.com/?main_page=index&manufacturers_id=2&sort=20a&filter_id=88

But the page that is being displayed is the blog home.

the breadcrumbs also read - home :: manufacturers name :: blog home.

4 Apr 2009, 1:14 AM
#729
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

Ha Ha. I just found my old posts from a year ago about this same issue. No answers there though. Someone else mentioned it and the author pointed them to instructions for installing WOZ and using SEO URLs. I have done this. It doesn't work.

I turned off the URLs a sec went to the front side ran through the same routine to get the alpha sorter and it worked just fine.

Also after I turned the URLs back on I went through it all again and ended up back at the blog home page. Since the address bar had the right address (as before) for the page I was supposed to be seeing I added " index.php " where RainTheBat pointed out it was missing from.

I was taken directly to the page I should have seen before.

I sure hope this helps someone help me because I'm still lost here.

Thanks,
John

4 Apr 2009, 2:17 AM
#730
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

bumba000:

because I'm still lost here.

Hey John,

This is why any page with a question mark at the beginning will go to wordpress, it is located in /includes/extra_configures/wordpress-config.php:

if($req=='?'){
        $_GET['main_page']='wordpress';
```if the requested url has a ? at the beginning, then have that page load wordpress_default.php.

o.k., o.k., tried this out:
[12volt-travel.com/?main\_page=index&cPath=96&sort=20a&filter\_id=306](http://www.12volt-travel.com/?main_page=index&cPath=96&sort=20a&filter_id=306)  <-goes to blog

now add the word index.php before the question mark.
now you get to the right page!
[12volt-travel.com/\index.php\[/COLOR\]?main\_page=index&cPath=96&sort=20a&filter\_id=306](http://www.12volt-travel.com/index.php?main_page=index&cPath=96&sort=20a&filter_id=306) [COLOR=DarkRed]<-goes to correct page
forwards you automatically to:
[12volt-travel.com/12-volt-hair-dryers-curling-irons-c-96.html?filter\_id=306&sort=20a](http://www.12volt-travel.com/12-volt-hair-dryers-curling-irons-c-96.html?filter_id=306&sort=20a)  <-goes to correct page

It really seems like adding the index.php in there is the way to go unless of course that would screw up the url mod.

I think that mod does something with your .htaccess file? If it does, perhaps this is where you need to add in 'index.php'
4 Apr 2009, 4:02 AM
#731
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

Would this be easier? >> Can I somehow remove the ? from the address?

4 Apr 2009, 6:35 PM
#732
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

This is still in test mode. Looks Good So Far!:clap:

in includes / extra_configures / wordpress-config.php around line 18 you will find

if($req=='?'){
        $_GET['main_page']='wordpress';
    }
```change it to

if($req=='wordpress'){
$_GET['main_page']='wordpress';
}


I have noticed no other problems not covered by this fix or created by this fix. If you find a problem, please let me know!
5 Apr 2009, 11:41 AM
#733
graphicagenda avatar

graphicagenda

New Zenner

Join Date:
Apr 2009
Posts:
1
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

Hello, I'm trying to find out why the /index.php?main_page=wordpress
brings up a post not found and search posts box. The same wordpress home page works when the full wordpress address is typed in the url.

5 Apr 2009, 3:56 PM
#734
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

bumba000:

This is still in test mode. Looks Good So Far!:clap:!

Brilliant idea. Lookin' pretty slick. You even have permalinks set up to work for your blog!

5 Apr 2009, 4:05 PM
#735
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

graphicagenda:

Hello, I'm trying to find out why the /index.php?main_page=wordpress
brings up a post not found...

I think this can happen when one of the settings in the Wordpress Admin :: General Settings:

WordPress address (URL):
Blog address (URL):

is set incorrect. The first address is probably set correctly, that is why your blog displays when you type in the blog URL. The second address sho

5 Apr 2009, 7:44 PM
#736
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Wordpress On ZC [Support Thread]

graphicagenda:

Hello, I'm trying to find out why the /index.php?main_page=wordpress
brings up a post not found and search posts box. The same wordpress home page works when the full wordpress address is typed in the url.Can you post a link to your site for others to see what's happening?? Can't say for sure, but it sounds like one of the issues that several of us had running WOZ and WordPress v2.7.1. Search this thread for Kiddo's fix.. (I believe it's back around page 55-56 -- but searching this thread for "kiddo" will get you to it quicker..)

6 Apr 2009, 2:08 PM
#737
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

DivaVocals:

Warning: Cannot modify header information - headers already sent by (output started at /home/includes/templates/template_default/common/html_header.php:22) in /home/wp-includes/pluggable.php on line 850

Another fix for this is to open pluggable.php and rename the function wp_redirect() to something like wp_redirect2(). If the error occurs again, keep replacing the name of that function to make the error go away. You may need to replace 3 or 4 occasions of it in 2 or 3 files. I think canonical.php comes up as well.

Now the page will work, and you can use the latest Zen Cart 1.3.8 and the latest Wordpress 2.7.1. Now, some files from your Wordpress Admin will still want to make a call to wp_redirect(), so it would be good to do a bulk search and replace of all calls to that function for any file within the /wp-admin/ folder. A couple plugins may also call wp_redirect(), so rename the function in those files as well.

I know this way is backwards as all 'get out', but it works - until the next wordpress upgrade! Actually, say you upgrade, just remember to do a bulk replace of the function wp_redirect() in the admin files. For those wondering how to do a bulk replace (i.e. search and replace) of a function name in many files, I recommend a program such as WeBuilder 2008, which is a php, html, css etc. etc. editing program. It may be a standard feature in editors these days anyways, not sure.

6 Apr 2009, 5:59 PM
#738
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Wordpress On ZC [Support Thread]

Kiddo already posted a fix to this error earlier in this thread.. (see pages 57-59 of this thread)

Is this fix better than Kiddo's fix?? How/Why??

rainthebat:

Another fix for this is to open pluggable.php and rename the function wp_redirect() to something like wp_redirect2(). If the error occurs again, keep replacing the name of that function to make the error go away. You may need to replace 3 or 4 occasions of it in 2 or 3 files. I think canonical.php comes up as well.

Now the page will work, and you can use the latest Zen Cart 1.3.8 and the latest Wordpress 2.7.1. Now, some files from your Wordpress Admin will still want to make a call to wp_redirect(), so it would be good to do a bulk search and replace of all calls to that function for any file within the /wp-admin/ folder. A couple plugins may also call wp_redirect(), so rename the function in those files as well.

I know this way is backwards as all 'get out', but it works - until the next wordpress upgrade! Actually, say you upgrade, just remember to do a bulk replace of the function wp_redirect() in the admin files. For those wondering how to do a bulk replace (i.e. search and replace) of a function name in many files, I recommend a program such as WeBuilder 2008, which is a php, html, css etc. etc. editing program. It may be a standard feature in editors these days anyways, not sure.

6 Apr 2009, 6:59 PM
#739
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

DivaVocals:

Kiddo already posted a fix to this error earlier in this thread.. (see pages 57-59 of this thread)

Is this fix better than Kiddo's fix?? How/Why??

No, No, Kiddos method is clearly better after reading it. I have been away from this thread for long time, and got back and didn't read the gazillion posts, for I don't have gazillions of time to do so. Its tuff to stay in tune with all these different things, I read a few posts a couple pages ago, and skim through, and find garbage and no answers to my problems. But on certain pages there is much relevant information that has solved same problems in much better way than mine.

7 Apr 2009, 12:14 AM
#740
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

I have seen it asked here a few times but there are no answers.

I (and others) need to be able to use custom meta data for each post, page, category.

I have installed a mod that lets you assign specific metas for each page but as mentioned previously in this thread, they end up in the middle of the page (view page source). This is not good.

Somehow ZC is pulling the Blog Name and using it as the page title. You would imagine that it would be fairly simple to also pull keywords and a description from the DB too. Not for me!

Any advice is greatly appreciated.

Thanks in advance,
John