CAME Studio Blogs

WordPress & Zen Cart: Incorporating WordPress into Zen Cart

Incorporating WordPress into Zen Cart Posted On
Posted By Bryan Reazon Vasquez

Before you start, remember that we likewise offer the support of incorporating WordPress with Zen Cart. This instructional exercise and administration have been tried with Zen Cart variants: 1.3.8a to 1.5.5f.

At the point when we previously sent off the 1carpe Blogs, we attempted to utilize a module called WordPress on Zen Cart to show our WordPress blog as a page inside Zen Cart. Tragically, that module hasn’t been refreshed in years (years” is never something to be thankful for while alluding to programming) and really causes clashes with plenty of different modules for Zen Cart. 

Quick forward to seven days prior when one of our dependable clients demanded we figure out how to coordinate the blog into Zen Cart so such things as shopping basket amount and login status can be kept up with in any event, when in the blog. In the wake of doing a little research, I found that joining had been accomplished for osCommerce and that it should likewise be workable for Zen Cart. 

Thus, after a couple of effective combinations across different client sites, including our own, I chose to compose this instructional exercise on the best way to coordinate WordPress with Zen Cart. Because of the enormous number of steps, I figured it wouldn’t be smart to deliver this as a module.

So this instructional exercise, first and foremost, accepts you have one of the accompanying arrangements:

Circumstance 1

  • Zen Cart introduced to the root
  • WordPress introduced to a sub-envelope, for example,/blog/

We’ve additionally accomplished the accompanying circumstance:

Circumstance 2

  • Zen Cart was introduced to a sub-organizer, for example,/shop/
  • WordPress introduced to a sub-envelope, for example,/blog/

It is suggested that your webpage either not use SEO URLs, or utilize an SEO URLs module like SIMPLE SEO URLs (Magic SEO URLs functions too) which can incapacitate/prohibit modifying the “blog” page. On the off chance that you are utilizing a module that can’t incapacitate revamping, issues could emerge in the event that the module attempts to revise PHP URLs made by WordPress.

For instance, while “seeing” a blog entry, WordPress makes a PHP URL that could be erroneously modified.

The subsequent circumstance requires extra advances except if you are fine with your blog showing up in/shop/blog/as opposed to/blog/.

Getting ready WordPress

Caution: IF YOU DO NOT HAVE EXPERIENCE WITH DEVELOPING A WEBSITE YOURSELF, DO NOT ATTEMPT TO PERFORM THESE STEPS. CONTACT A PROFESSIONAL!

Stage 1:

Make a WordPress Child Theme.

Stage 2:

In the first place, you should cripple admittance to your ongoing web journal by transferring a clear record named index.html to your WordPress root registry. You may likewise need to rename your index.php document in the event that your server settings consequently load this record before any HTML documents (this will contrast from one server to another).

Stage 3:

Then, save a duplicate of your subject’s style.css document and any pictures that are referred to in the template to a put in your work area to later be transferred to your Zen Cart establishment.

Rename style.css on your work area to blog.css and open the document and change all picture URL ways to match the URLs found in your Zen Cart templates.

Stage 4:

  1. Open http://www.domain.com/path_to_wordpress/wp-administrator/and go to SETTINGS
  2. Change WordPress address (URL) to http://www.domain.com/folder_name_of_your_choice (WordPress will be actually introduced here)
  3. Change Blog address (URL) http://www.domain.com/blog

Note: these two ways should not coordinate. In the event that WordPress is situated in “/WordPress/”, the blog will be openly available through a substitute URL (for example /blog/). You can name either anything you like, yet the blog should actually exist at the WordPress Address. 

The Blog address will be utilized as a revamp for the Zen Cart page we will construct later on. On the off chance that you might want to utilize an alternate name other than/blog/in the URL, you’ll have to change the access modification given in the Zen Cart establishment guidelines beneath.

Stage 5:

Rename your WordPress organizer to the envelope name you decided for the WordPress Address in sync 4 above.

** END OF WORDPRESS PREPARATION **

ZEN CART INSTALLATION

Stage 1:

  • Transfer blog.css to incorporates/layouts/YOUR_TEMPLATE/css/
  • Transfer your WordPress pictures to incorporate/layouts/YOUR_TEMPLATE/pictures/

Stage 2:

  • Download the WordPress/Zen Cart combination bundle.
  • Unfasten the bundle and transfer the full bundle to your Zen Cart organizer.

Stage 3:

  • Open incorporates/wordpress_page.php and change require(‘../wordpress/wp-blog-header.php’);
  • To utilize your WordPress organizer name that you picked already. Assuming that your Zen Cart envelope is in the root, eliminate “../”.

Stage 4:

Open incorporates/layout/YOUR_TEMPLATE/normal/tpl_main_page.php and find require($body_code);

Supplant it with:

$zc_template = $template;

require($body_code);

$layout = $zc_template;

Stage 5:

Open incorporates/application_top.php and find: require(‘includes/autoload_func.php’);

Add later:

// WordPress combination

require(‘includes/wordpress_page.php’);

Stage 6 

(SKIP THIS STEP IF USING A SEO MODULE THAT CAN NOT BE DISABLED):

In your space root, open .htaccess and add the accompanying:

Choices +FollowSymLinks

RewriteEngine on

RewriteBase/

RewriteRule ^blog(.*)$/list/index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

This will revise your blog page URL to domain.com/blog/. In the event that this causes a server mistake, take a stab at changing the last line above to:

RewriteRule ^blog(.*)$/inventory/index.php?main_page=blog$1 [L]

Note: on the off chance that your store is in the base of your space, eliminate “/list” from the standard. In the event that you need WordPress to stack as an alternate URL, change the main occurrence of “blog” in the RewriteRule to anything you set as the Blog Address in sync 3 of the Preparing WordPress segment above.

Stage 7:

To show your blog titles as the page title:

Open incorporates/modules/YOUR_TEMPLATE/meta_tags.php

Find:

// EZ-Pages:

case ‘page’:

Furthermore, add previously:

case ‘blog’:

define(‘META_TAG_TITLE’, (defined(‘NAVBAR_TITLE’) ? NAVBAR_TITLE . PRIMARY_SECTION : ”) . wp_title(PRIMARY_SECTION, bogus, ‘right’) . TITLE . Slogan);

define(‘META_TAG_DESCRIPTION’, TITLE . PRIMARY_SECTION . (defined(‘NAVBAR_TITLE’) ? NAVBAR_TITLE : ” ) . SECONDARY_SECTION . Catchphrases);

define(‘META_TAG_KEYWORDS’, KEYWORDS . METATAGS_DIVIDER . (defined(‘NAVBAR_TITLE’) ? NAVBAR_TITLE : ” ) );

break;

You can control this code assuming you have insight with PHP to make the title design that you’d like. Likewise opening the meta_tags.php record and making a custom configuration for “blog” would be smart.

Stage 8

Add the accompanying AROUND any meta labels in incorporates/formats/YOUR_TEMPLATE/normal/html_header.php that you would rather not load on the blog page (for example portrayal and catchphrases) so that wordpress labels will be utilized all things being equal:

<?php if ($_GET[‘main_page’] != ‘blog’) { ?>

also,

<?php } ?>

** END OF INSTALLATION **

Indeed, the EASY aspect is finished. Presently is the part where you will require a few involvements in CSS and HTML as you have quite recently brought your whole blog into the principal page region of your Zen Cart layout… odds are good that it won’t fit and the CSS is all destroyed by the worldwide template of your Zen Cart. Or on the other hand, worldwide styles inside the blog.css document will meaningfully affect the appearance of your store.

A FEW TIPS:

Eliminate the header and footer code that you never again need from header.php and footer.php in your WordPress topic organizer.

Change all selectors in your CSS record to be well defined for just the primary region of the blog page.

Indeed, that is the finish of the instructional exercise on the most proficient method to incorporate WordPress into Zen Cart. In the event that I’ve missed any means, if it’s not too much trouble, let me know and I will twofold really look at all that and update this posting on a case by case basis. Assuming you might want to get CAME Studio by One Carpe & Co. to finish these means for you, kindly visit our WordPress/Zen Cart Integration administration page.

Cheerful contributing to a blog!

CONTACT US! For customer support or a free consultation. Furthermore, if you would like to take advantage of our services.

Check our blog site for more tips!

Related Post

leave a Comment