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

Wordpress On ZC [Support Thread]

Views: 620,675

Results 441 to 460 of 1,861
17 Jul 2008, 1:53 PM
#441
eecom avatar

eecom

New Zenner

Join Date:
Sep 2007
Posts:
14
Plugin Contributions:
0

Wordpress On ZC [Support Thread]

That was it!!

Thanks!!!

thebasher:

In your ZenCart configure.php (includes/configure.php) what does it say here:

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', 'WHAT DOES IT SAY HERE?');

> 
> This should be around line 40. This is the direct path to your ZC. If you are putting WP in it's own directory, as in "blog", all you would have to do in your wordpress-config.php file is add the path to ZC and then add "blog/" at the end. 
> 
> The wordpress-config.php is part of the WOZ install and is located in includes/extra_configures/wordpress-config.php. This is the file where you need to define the path to WP.
22 Jul 2008, 1:12 AM
#442
alisammeredith avatar

alisammeredith

New Zenner

Join Date:
Apr 2008
Location:
Hill Country, Texas
Posts:
37
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

eecom:

That was it!!

Thanks!!!
That was it for me, too! Thanks so much.:clap:

24 Jul 2008, 12:24 AM
#443
alisammeredith avatar

alisammeredith

New Zenner

Join Date:
Apr 2008
Location:
Hill Country, Texas
Posts:
37
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

busyMom:

OK, I sorted out what was wrong here... In case anyone else makes the same mistake, here's what you need to know:

  1. It doesn't matter which of the sideboxes you choose to use, but if you want the title to be a link, you need to make sure the appropriate file in includes/modules/sideboxes/YOUR_TEMPLATE/*.php has the variable $title_link set properly.
  2. Therein lies my mistake. I just assumed that since I didn't want the value to be "false", then I must've wanted it to be "true". The logical value of True was correctly being passed into the link as the link parameter "index.php?main_page=1" instead of "index.php?main_page=wordpress" as it should've been. My wp_sidebar.php had it correct, but since I had that sidebox disabled, it took awhile to trackdown that I had used the wrong value when I changed my sidebox $title_link!!

Now with that corrected, I'll see if I can get permalinks working with Hira's SEO instructions. It does seem like a bit of a disconnect, though -- all the recommendations here say to install the ZC and WP code into the same directory in order to avoid unspecified probable issues, but Hira's instructions indicate that they should be in different directories for the SEO instructions. I'm hoping that is just a detail based on his experimentation, though, and off I go to try to get it working with them both installed in the root directory!

Hope this helps someone following in my (wrong) footsteps!
Karen

Thanks for posting! I think I am having a similar issue, but I'm just not getting it. My blog works fine http://twelvesteppets.com/index.php?main_page=wordpress However, the links in the sidebar are not right. For example, category "Puppy Log" takes you to http://twelvesteppets.com/petblog/?cat=7 which obviously isn't quite right. Are you saying there is something in sideboxes/wp_sidebar that needs changing? I'm looking at $title_link = 'wordpress' ; Is that what you had to change?
Thanks in advance!

1 Aug 2008, 1:18 AM
#444
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

Still looking for a way to turn off WP sideboxes on certain ZC pages. I tried using:

if
(in_array($cPath,explode(",",'14,14_1,14_2,14_3,14_19,5,14_6')) ) {
    $show_blank_sidebox= false;
  } else {
    $show_blank_sidebox= true;
  }

and

if (isset($_GET['products_id,shopping_cart'])) {
    $show_blank_sidebox= false;
  } else {
    $show_blank_sidebox= true;
  }

but it only works for ZC sideboxes. I'm at a loss so if anyone has a solution that they could share it would be awesome!
Thanks

ps The blank sidebox isn't the sidebox I'm trying to turn off. It's just an example of code.

1 Aug 2008, 2:47 AM
#445
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Wordpress On ZC [Support Thread]

thebasher:

Still looking for a way to turn off WP sideboxes on certain ZC pages. I tried using:

if
(in_array($cPath,explode(",",'14,14_1,14_2,14_3,14_19,5,14_6')) ) {
$show_blank_sidebox= false;
} else {
$show_blank_sidebox= true;
}

> 
> and
> 
> ```
if (isset($_GET['products_id,shopping_cart'])) {
    $show_blank_sidebox= false;
  } else {
    $show_blank_sidebox= true;
  }

but it only works for ZC sideboxes. I'm at a loss so if anyone has a solution that they could share it would be awesome!
Thanks

ps The blank sidebox isn't the sidebox I'm trying to turn off. It's just an example of code.

You also need to tell the sidebox what to do if it is set to show

if
(in_array($cPath,explode(",",'14,14_1,14_2,14_3,14_19,5,14_6')) ) {
    $show_blank_sidebox= false;
  } else {
    $show_blank_sidebox= true;
  }

if ($show_blank_sidebox == true;) {

Do whatever its supposed to do

}
1 Aug 2008, 5:01 AM
#446
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

Hey Clyde,
Here is the code I have for my "wp_sidebar" sidebox:

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+

  if (in_array($cPath,explode(",",'14,14_1,14_2,14_3,14_19,5,14_6')) ) {
    $show_wp_sidebar= false;
  } else {
    $show_wp_sidebar= true;
  }
  
  if ($show_wp_sidebar == true) {
  require($template->get_template_dir('tpl_wp_cats.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_wp_sidebar.php');

  $title =  BOX_HEADING_WP_SIDEBAR;
  $left_corner = false;
  $right_corner = false;
  $right_arrow = false;
  $title_link = 'wordpress';

  require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
?>

But it completely shuts off my right column. Well not shuts off but the only thing that shows up is this:

Parse error: parse error, unexpected $ in /home/content/b/a/s/basherbeatz/html/includes/modules/sideboxes/wp_sidebar.php on line 38

It's obvious that I'm missing something. I just don't know what that something is. Is the code that I'm using even close to what I need?

Thanks Clyde!

1 Aug 2008, 5:11 AM
#447
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Wordpress On ZC [Support Thread]

thebasher:

Hey Clyde,
Here is the code I have for my "wp_sidebar" sidebox:

<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2004 The zen-cart developers | // | | // | http://www.zen-cart.com/index.php | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | http://www.zen-cart.com/license/2_0.txt. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ if (in_array($cPath,explode(",",'14,14_1,14_2,14_3,14_19,5,14_6')) ) { $show_wp_sidebar= false; } else { $show_wp_sidebar= true; } if ($show_wp_sidebar == true) { require($template->get_template_dir('tpl_wp_cats.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_wp_sidebar.php'); $title = BOX_HEADING_WP_SIDEBAR; $left_corner = false; $right_corner = false; $right_arrow = false; $title_link = 'wordpress'; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); ?>
> 
> But it completely shuts off my right column. Well not shuts off but the only thing that shows up is this:
> 
> ```
Parse error: parse error, unexpected $ in /home/content/b/a/s/basherbeatz/html/includes/modules/sideboxes/wp_sidebar.php on line 38

It's obvious that I'm missing something. I just don't know what that something is. Is the code that I'm using even close to what I need?

Thanks Clyde!

You forgot to close the final if statement:

if ($show_wp_sidebar == true) {
 require($template->get_template_dir('tpl_wp_cats.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_wp_sidebar.php');

 $title =  BOX_HEADING_WP_SIDEBAR;
 $left_corner = false;
 $right_corner = false;
 $right_arrow = false;
 $title_link = 'wordpress';

 require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
1 Aug 2008, 5:27 AM
#448
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

I'm an idiot!!! :lamo:

I forgot one "}".

That's it. I still couldn't get the wp sidebox to not show on my main page without it also not showing on my WP pages. So I decided to add the "archives" to the "categories" sidebox and just have them on all the time.

Not exactly what I was looking for but it gets the job done.

1 Aug 2008, 6:21 AM
#449
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

Is there a way to include the contents of WP in the ZC search form?

ie: When you type something in the search box from ZC it will include entries from the WP database. I installed WP in the same database as ZC.

2 Aug 2008, 4:33 PM
#450
babltd avatar

babltd

New Zenner

Join Date:
Oct 2007
Posts:
73
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

I have installed - all is fine except when I changed the root url (as notes below) nothing works

Step2)Setting of WordPress

[WordPress admin URL] › Options › General
[Blog address (URL)] change to [Zen-Cart URL].

[WordPress admin URL] › Presentation › Themes
Select WordPress Default 1.6(Default setting)*1

before the root was (fake domain used)

http://www.123nothingzzz.co.uk/store/Clean-Language/wp-login.php

the zen cart root is

http://www.123nothingzzz.co.uk/store

so now when I go to login I get

http://www.123nothingzzz.co.uk/store/wp-login.php and a 404 error

Also none of the style sheets work, or the links........

Can i manually edit a file via dreamweaver to correct and then what should I do?

The store root is http://www.123nothingzzz.co.uk/store/

WP is installed under this in the folder /Clean-Language/

2 Aug 2008, 6:16 PM
#451
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

Clyde,
Thanks for the help. That did the trick!

3 Aug 2008, 9:11 AM
#452
babltd avatar

babltd

New Zenner

Join Date:
Oct 2007
Posts:
73
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

I have installed - all is fine except when I changed the root url (as notes below) nothing works

Step2)Setting of WordPress

[WordPress admin URL] › Options › General
[Blog address (URL)] change to [Zen-Cart URL].

[WordPress admin URL] › Presentation › Themes
Select WordPress Default 1.6(Default setting)*1

before the root was (fake domain used)

http://www.123nothingzzz.co.uk/store...e/wp-login.php

the zen cart root is

http://www.123nothingzzz.co.uk/store

so now when I go to login I get

http://www.123nothingzzz.co.uk/store/wp-login.php and a 404 error

Also none of the style sheets work, or the links........

Can i manually edit a file via dreamweaver to correct and then what should I do?

The store root is http://www.123nothingzzz.co.uk/store/

WP is installed under this in the folder /Clean-Language/

5 Aug 2008, 11:59 AM
#453
babltd avatar

babltd

New Zenner

Join Date:
Oct 2007
Posts:
73
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

Sorted it now - but thanks anyway.

5 Aug 2008, 2:50 PM
#454
heatherlsi avatar

heatherlsi

New Zenner

Join Date:
Jan 2007
Posts:
23
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

I'm trying to use WordPress on ZenCart. Everything works fine until I change the wordpress-config.php file, then I start getting this error:
Fatal error: Call to a member function add_current_page() on a non-object in D:\Inetpub\indychristianclothing\ZenCart\includes\autoload_func.php on line 91

ZenCart 1.3.8a
WordPress: 2.6

Server: IIS (but I installed all of this on a Linux server last night and as soon as I changed to wordpress-config.php file it broke also)

Thanks,
Heather

10 Aug 2008, 2:08 PM
#455
babltd avatar

babltd

New Zenner

Join Date:
Oct 2007
Posts:
73
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

In the WOZ install I want to be able to get the WP title and keyword datd to out put instead of the zens cart one.s on the pages that are WP.

In the header file I wanted to write an if/else statement but this doesnt deem to work.

I was going to do it the simple way and just have the wp_head loop first to get the titles and keywords out first where they exsist. So i have

<?php /** * Common Template /** * load the module for generating page meta-tags */ require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php')); /** * output main page HEAD tag and related headers/meta-tags, etc */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> <head> <?php wp_head(); ?> <title><?php echo META_TAG_TITLE; ?></title> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" /> <meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" /> <meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />

is there another way of doing this?

12 Aug 2008, 6:46 AM
#456
jenn8five avatar

jenn8five

New Zenner

Join Date:
Aug 2008
Posts:
54
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

can someone pls clarify what this means --

Change access permission of [Path of WordPress] to 777.

(taken from step 1 of hira's instructions -- lol. i'm stumped already!) :blush:

12 Aug 2008, 7:12 AM
#457
rlfreshwater avatar

rlfreshwater

New Zenner

Join Date:
Oct 2007
Location:
Atlanta, GA
Posts:
79
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

jenn8five:

can someone pls clarify what this means --

Change access permission of [Path of WordPress] to 777.

(taken from step 1 of hira's instructions -- lol. i'm stumped already!) :blush:
Finally something I can answer! :smile: I think. :lookaroun

You need to change the permission within your web-host control panel or FTP client. If using the control panel method, log into your account and look for the file manager. You should see something similar to the attached screen shot. There is a column on the far right titled "perms" (permissions).

Check the box next to the file or folder you want to change the permissions to and then click the "change permissions" button and that's it.

12 Aug 2008, 7:20 AM
#458
jenn8five avatar

jenn8five

New Zenner

Join Date:
Aug 2008
Posts:
54
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

ahhh.. no wonder! i was looking on core. LOL thanks!!!

12 Aug 2008, 7:21 AM
#459
jenn8five avatar

jenn8five

New Zenner

Join Date:
Aug 2008
Posts:
54
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

btw: my host (gator host) already has word press for me to install. can i just do that? and then where should i continue (based on hira's directions) to customize my WP page to make it look like the rest of my ZC site?

12 Aug 2008, 7:29 AM
#460
rlfreshwater avatar

rlfreshwater

New Zenner

Join Date:
Oct 2007
Location:
Atlanta, GA
Posts:
79
Plugin Contributions:
0

Re: Wordpress On ZC [Support Thread]

jenn8five:

btw: my host (gator host) already has word press for me to install. can i just do that? and then where should i continue (based on hira's directions) to customize my WP page to make it look like the rest of my ZC site?
Hmmm. I'm not really sure about that, Jenn. If you do it that way then I don't know if it will flow seamlessly with your ZC store without a lot of modification.

Sorry. Maybe somebody else can come along and give you some advice.