Tag Archives: Zen Cart module

Solutions for Better Zen Cart & WordPress Integration

Why Widgets & Sideboxes are a Better Solution than Blog & Shop Embedding for Integration

…embedded blog solutions make Zen Cart/WordPress integration overly complicated mainly because they seek to solve the WRONG problem..

When I was first introduced to WordPress I wanted to try and build a WordPress site linked to a Zen Cart store.

There are “embedded blog” (WordPress on Zen Cart) solutions available which allows a shop owner to “embed” their WordPress blog within their Zen Cart store. However I often wondered why no such solution to embed Zen Cart within WordPress had never been created. When I decided to pursue a “Zen Cart on WordPress “solution (based on a client request/need), I followed the path that had already been established in the world of Zen Cart and WordPress integration solutions. So naturally I initially pursued a solution which “embedded” Zen Cart inside WordPress. After all, that’s how the WordPress on Zen Cart solutions had all worked in the past. Wouldn’t it stand to reason that the opposite is what was needed for Zen Cart and WordPress integration? AKA Zen Cart on WordPress.

em·bed (emˈbed) also im·bed (imˈbed)
v. em·bed·ded also im·bed·ded, em·bed·ding also im·bed·ding, em·beds also im·beds
v.tr.

  1. To fix firmly in a surrounding mass: embed a post in concrete; fossils embedded in shale.
  2. To enclose snugly or firmly.
  3. To cause to be an integral part of a surrounding whole: “a minor accuracy embedded in a larger untruth” (Ian Jack).
  4. To assign (a journalist) to travel with a military unit during an armed conflict.
  5. Biology To enclose (a specimen) in a supporting material before sectioning for microscopic examination.

v.intr.
To become embedded: The harpoon struck but did not embed.
n.
One that is embedded, especially a journalist who is assigned to an active military unit.

As I began to explore this, I was shocked that what  I got back from most developers and Zen Cart gurus was a LOT of resistance. I was told that what I was asking for was “impossible” — “hard” — “not necessary” or simply not doable at all.. Most of the responses went something like this: “I don’t think it can be done easily as you are trying to merge two very different codesets”

Along the way I was frequently asked, “WHY are you doing this?”. My basic answer remains pretty much the same as when I first tried walking down this path two years ago. I have never been happy with the available options for WordPress e-commerce plugins. While that landscape is changing with the introduction of  The Cart Press, WooCommerce and now Ready E-Commerce, these plugins in my opinion still fall a little short in that these plugins still do not match all the features found in other standalone e-commerce frameworks such as Zen Cart, osCommerce, Presta Cart, and even Magento..

Based on my 15+ years of experience as a software solutions Business Analyst, I KNEW that Zen Cart & WordPress integration was totally attainable. However, with all the resistance I was getting whenever I would inquire about or express my interest in Zen Cart & WordPress integration, I began to ask different questions. I began to question if the traditional approach and assumptions surrounding Zen Cart & WordPress integration were indeed correct. Here’s what I found:

Upon hearing that there was an osCommerce plugin for WordPress, I was excited. Since Zen Cart is a fork of osCommerce, I took a look at this plugin to see if I could gain insight on how to accomplish the same thing with Zen Cart. The WP Online Store plugin support forum SAYS you can install any osCommerce add-on module, and upon further research I verified that yes that is true.. BUT a closer look revealed that you may need some knowledge of PHP to modify your favorite osCommerce module so that it works inside the WordPress framework.

Eventually updates to PHP, WordPress, and the version of  osCommerce used for the osCommerce for WordPress plugin KILLED the plugin.

NOTICE: As from Summer 2014 this plugin will no longer be supported.
Changes in the latest version of PHP, which was being rolled out across many servers, meant that there would have to be a major re-write to most of the files within the WP Online Store Plugin. The developers could no longer afford to update and support this free plugin.

I don’t know about you, but for the shop owners in the dubious position of having to migrate a site built around a now VERY dead plugin seems like a lot of work JUST to avoid creating matching themes/templates. Not to mention the risk of lost sales because a shopowners embedded solution is interfering with some aspect of their site. (you know interfering with something  like SALES!!)

After spending a LOT of time reviewing solutions to embedded blogs inside Zen Cart and looking at WordPress plugins to embed the osCommerce framework inside WordPress, I began to realize that many folks (including myself) walked down this “embedded blog” road simply to avoid having to deal with WordPress and Zen Cart themes/templates. There seems to be this perception that creating a WordPress theme to match one’s Zen Cart store is “hard” or “too much work” or that creating a Zen Cart template was also too much work or too hard.. I believed this too initially, but I eventually realized that blog or store embedding JUST to avoid having to create a matching theme/template was a lot of work for VERY little gain..

At the end of the day I realized what my clients REALLY needed was to be able to display Zen Cart products and a live shopping cart in their WordPress site, and vice versa without all of the headaches that go into maintaining an embedded solution.. It takes LESS time for me to create a WordPress theme and matching Zen Cart template than it does to deal with every single issue that rears it’s ugly head to make sure my embedded solution doesn’t wreak havoc on my site because it doesn’t play nice with some plugins/modules.. Plus, there are plenty of NICE template and theme options (free and commercial) for both Zen Cart and WordPress out there which makes all the fuss over themeing and templating a NON-ISSUE.

My clients know that they don’t need the WHOLE store displayed inside WordPress, but they do need their PRODUCT LISTINGS, PRODUCT CATEGORIES, and LIVE SHOPPING CART TOTALS displayed inside WordPress.. They don’t need their WHOLE blog displayed inside of Zen Cart, but they DO need links to their RECENT POSTS/PAGES, TAG CLOUD, and BLOG CATEGORIES displayed inside their Zen Cart stores.

My conclusion??

I realized that embedded solutions make Zen Cart & WordPress integration overly complicated mainly because they seek to solve the WRONG problem.

Unlike embedding plugins/modules, Zen Cart® for WordPress (zen4wp) & WordPress for Zen Cart® (wp4zen) allows siteowners to use the FULL power of WordPress and the FULL power of Zen Cart. This means that shopowners will be able to use any plugin/module for Zen Cart or WordPress without limits or conflicts (like having to implement some gnarly code just to get their Zen Cart module to work inside WordPress).

To get Zen Cart® for WordPress (zen4wp) & WordPress for Zen Cart® (wp4zen) for your site today go to  »  http://overthehillweb.com/shop/

Author: C Jones

Related posts

FAQs | Zen Cart for WordPress (zen4wp) & WordPress for Zen Cart (wp4zen)

Top FAQs for Zen Cart® for WordPress (zen4wp) & WordPress for Zen Cart® (wp4zen)

Question: Where can I get  Zen Cart® for WordPress (zen4wp) & WordPress for Zen Cart® (wp4zen)?

Answer: The base (free) versions are available on the Zen Cart and WordPress sites in the free module/plugin repositories.  The premium versions are available here »  http://overthehillweb.com/shop/


Question: When someone goes to the shop page I don’t want it to look like the Zen Cart pages. Will Zen Cart® for WordPress (zen4wp) & WordPress for Zen Cart® (wp4zen) make my Zen Cart site look like my WordPress site?

Answer: Zen Cart® for WordPress (zen4wp) & WordPress for Zen Cart® (wp4zen) isn’t going to change the look of Zen Cart or WordPress. The look and feel of Zen Cart is still controlled by the Zen Cart template and the look and feel of WordPress is still controlled by your WordPress theme. You WILL still need to modify your Zen Cart template to make it MATCH your WordPress site. (which is EXACTLY what was done for the sites that are using Zen4WP — http://tablelegworld.com, http://www.eyeitalia.com, & http://www.laserdiscvault.com)

Zen Cart® for WordPress (zen4wp) & WordPress for Zen Cart® (wp4zen) are not theming or templating add-ons.. They are CONTENT add-ons. They will allow you to display Zen Cart products, reviews, testimonial, shopping cart, etc in your WordPress site. They will allow you to display your blogs post categories, recent posts or tag cloud widgets, etc in Zen Cart. What your WordPress site and Zen cart site LOOK like is still controlled by the respective WordPress theme and Zen Cart template. But don’t stress about themes and templates. Making your WordPress site and Zen cart site LOOK alike is a LOT easier today than it has been historically. (As you can see in http://www.eyeitalia.com, http://tablelegworld.com, & http://www.laserdiscvault.com sites)


Question: Why do these tools require that Zen Cart & WordPress be in the same database ? Could I configure a different database for Zen Cart & WordPress? I don’t think it’s that desirable to mix the product and order data with blog data?

Answer: Having Zen Cart look up info in WordPress tables in a database Zen Cart already has access to is a world of difference from having to establish credentials and communication with a different database. The two table systems can be separated with prefixes if necessary; the database-prefix capability is built into Zen Cart. The database-prefix capability is also built into WordPress! The default Zen Cart database prefix is ” (i.e. none) and the default WordPress prefix is ‘wp_’. As long as the prefixes are different, you will have no issues.

The point is that there is NO REASON why your Zen Cart and WordPress tables cannot co-exist in the same database.

(http://stackoverflow.com/questions/2674222/what-is-purpose-of-database-schema) A database schema is a way to logically group objects such as tables, views, stored procedures etc. Think of a schema as a container of objects.


Question: Do I install WordPress and Zen Cart in the same directory?

Answer: IN GENERAL you need WordPress in a sub-directory of Zen Cart or Zen Cart in a sub-directory of WordPress. You don’t install them BOTH in the root of your domain.

On that same note you DO NOT need to install each into TWO separate sub-directories.


Question (s): How does one set this up for Zen Cart & WordPress to share a database?

Zen Cart is in my root and WordPress is installed in a sub-directory. Do I need to reinstall WordPress in a different manner?

It sounds like I need to wipe-out and reinstall [Zen Cart/WordPress] manually as it was installed with [my host’s autoinstaller] & I never had the option of selecting or naming a database. My [Zen Cart/WordPress] install was a manual install. Will the default database settings for this install conform to these rules? There’s no way that I’d want to re-install [Zen Cart/WordPress] now that the site is built and customized.

Answer: If this is a FRESH installation of Zen Cart with an existing WordPress blog or a fresh installation of WordPress with an existing Zen Cart store, or a fresh install of BOTH Zen Cart and WordPress, the approach is pretty simple.. It doesn’t matter which one you install first (Zen Cart or WordPress), but during the installation when you are asked for your database information you use the SAME database information for both. (DB name, DB Password, DB Username)

You also need to make sure you are using a DB prefix for BOTH installs. For Zen Cart you can use zen_ and for WordPress you would use wp_. You can also use NO prefix for one and a prefix for the other. As long as the prefixes are different, you should be good-to-go! (no-prefix for one is “different” enough)

Because there are still a few errant WordPress plugins in the wild which do not inherit/use the wp_ table prefix for their plugins’ tables, we suggest ALWAYS including a table prefix in your Zen Cart and WordPress installs to be SUPER SURE that the tables for the two systems are distinguishable.


Question: What if I have an exiting WordPress blog & Zen Cart store, can I combine these databases without losing my store or my blog?

Answer: Yes It’s actually pretty easy to consolidate your databases into one database. Decide which one of the databases will be the one which you will import into to create the combined database.

It’s simply a matter of exporting one database (WordPress or Zen Cart.. your choice), and then importing that exported database into the other. Then you simply update the configuration files (for WordPress or Zen Cart) so that they BOTH point to the same database.. It is recommended that you do this by creating a clone of your site to “test” first so you don’t put your live site in danger..

One caveat, is that if your your Zen Cart database has it’s roots in the v1.3.x series, and you have not yet done the UTF-8 conversion of the Zen Cart tables, you will need to make sure you have converted your Zen Cart database to UTF-8 before combining your WordPress and Zen Cart databases.

DON’T WORRY!! You will not wipe out the existing tables if you import your WordPress database into the database with the Zen Cart tables. (or vice versa)

Exporting MySQL databases and tables using phpMyAdmin – https://www.youtube.com/watch?v=ffmCGVse8yg

Importing MySQL databases and tables using phpMyAdmin  – https://www.youtube.com/watch?v=jW5lrS6EUPM


Question: I found a plugin for WordPress which says it “integrates osCommerce into any WordPress theme“.  This plugin looks like it embeds osCommerce inside WordPress.  Does Zen Cart® for WordPress (zen4wp) work the same way? Will I be able to embed Zen Cart inside my WordPress site/theme?

Answer: Simply put, no. Unlike other plugins, Zen Cart® for WordPress (zen4wp) is not going to display a whole Zen Cart store inside WordPress.. Zen Cart® for WordPress (zen4wp) is NOT an embedding plugin (ALA WordPress on Zen Cart or other “blog embedding” solutions). Zen Cart® for WordPress (zen4wp) allows you to display specific Zen Cart content on your WordPress site using a series of widgets (which can be displayed inside ANY WordPress sidebar) and shortcodes (which can be displayed inside any page or post or text widget).. Unlike embedding plugins, Zen Cart® for WordPress (zen4wp) allows you to use the FULL power of WordPress and the FULL power of Zen Cart. This means that you will be able to use any plugin/module for Zen Cart or WordPress without limits (like having to implement some gnarly code just to get your Zen Cart module to work inside WordPress).

(http://en.support.wordpress.com/widgets/)
Widget is a fancy word for tools or content that you can add, arrange, and remove from the sidebar(s) of your blog. Widgets make it easy to customize the content of your sidebar(s). You can learn more about the widgets we offer by checking out the Related links on the right. You can access your widgets from the Appearance → Widgets screen in your Dashboard.

(http://devotepress.com/wordpress-coding/how-to-register-sidebars-in-wordpress/) Sidebar is a theme feature introduced with WordPress Version 2.2. This is one of the best features in WordPress that gave lot of flexibility in Theme and Dynamic Custom Site Development. Initially, sidebars were used only as a vertical column provided by a theme for displaying information other than the main content of the web page. But now sidebar usages has been expanded dramatically. It can be any part of your WordPress site and it’s an excellent way to display information.

(http://maddisondesigns.com/2010/03/how-to-add-multiple-widget-sidebars-to-your-wordpress-blog/) Even though it’s called a “sidebar” it doesn’t need to specifically reside in the sidebar of your website. You can add a “sidebar” to anywhere in your site you want to display your widgets. A common place to include them is the site footer.

(http://en.support.wordpress.com/category/shortcodes/)
A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. For more information on the shortcodes we offer please check out the support docs below.

Related posts