Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Jun 2011
    Location
    Colorado, USA
    Posts
    46
    Plugin Contributions
    0

    Default Re: wordpress template html_header.php blocking modules/pages/index?

    I should add that I'm not using any of the cart functionality to display the cart totals on the WordPress side from Mike's template.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: wordpress template html_header.php blocking modules/pages/index?

    For what it's worth, I've found that Numinix's method of embedding Wordpress in Zencart works well. Not the best solution if your goal is to use one of the many thousands of excellent free Wordpress templates that are available, but I've had some luck recreating many of those in Zencart, too.

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: wordpress template html_header.php blocking modules/pages/index?

    There have been many attempts at getting WP and ZC to site nicely together, but in general, their fundamental structural schemas are too divergent.

    I am no guru on the platforms of either system, but they are functionally very far apart.

    But also, I look at it differently...

    I believe that a blog and an eComm site serve two very different business objectives, and people vist a blog for very different reasons than an eComm site. I think that by mashing everything together can have overall detrimental effects. People get easily distracted, and while they may have come to the site initially to do some shopping, if they get the opportunity to sit and natter (or listen to other people's nattering), then you risk losing their focus. They may abandon the idea of shopping all-together.

    Kinda defeats the purpose for getting them to the site in the first place.

    We advise our clients to use blogs and social networking as HARVESTING sites, where people may land to have a bit of a chat, or whatever... but there is a clear strategy to get them to the eComm site ASAP, because that's what really counts.

    We feel an eComm site MUST have the single-minded objective of generating sales, and to do this without the rist of distractions that could diminish that objective... That is why we suggest to clients that their eComm sites do NOT have any external links to blogs, etc, while the blogs must have lots of links to the eComm site.

    Some people argue that this can "weaken" SEO potential, but we disagree. In our experience, people with a handful of well-maintained blogs and Social Pages, who use these to "harvest" visitors, find that their stores are quite busy and profitable.
    20 years a Zencart User

  4. #4
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: wordpress template html_header.php blocking modules/pages/index?

    Quote Originally Posted by schoolboy View Post
    While Mike Wender is quite a clever chap, and his system of "blending" ZC and Wordpress appears to function, it is not a system I would ever install... After looking at his methodology, I get the impression that quite a bit could "fall over"...
    I agree.. While I found a few tidbits in Mike Wender's post that I will make use of, IMHO his overall approach (based on digging into WordPress and ZenCart) seems flawed on several levels.. The first hint for me of why his code is the wrong approach is in the first couple of lines in the Zen Cart html_header.php file:
    * Common Template
    *
    * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
    The code posted included this:
    PHP Code:
    add_action('wp_head','zen_head'); 
    get_header(); 
    I'm no coder, but I've done a fair bit of research on how to wrap the WordPress template around ZenCart and here's what I see is wrong with this code (BTW if I am using the wrong terminology here I hope the experts will chime in here):

    • The Zen Cart html_header.php file as the above quote indicates is EVERYTHING that comes between the <head> & </head> tags. Making a call to the WordPress "get_header();" function includes more that that. This WordPress function will bring in the entire WordPress header.php file into the html_header.php which brings in elements to the <head> section that do not belong there.
    • The WordPress "get_header();" function includes a call to the "wp_head" function. The code posted calls BOTH functions which means the "wp_head" function is being called twice. (I beleive the "wp_head" function calls all the installed WordPress plugin stylesheets and javascripts)

    If you read through Mike Wender's comments even he admits that he hasn't fully tested his solution and that even HE wouldn't use it on a new install. (the most telling line is the very last one (highlighted)):
    No, I haven’t tested this extensively; however, I do have it working in two installs for 2+ years.

    With regards to integrating WP and ZC, it isn’t something I would do for new builds of WP e-commerce sites. I would definitely use a WP plugin as they have matured greatly since I developed this solution.

    So, I’d only use the solution above with the understanding that it will probably require the developer to get his/her hands dirty in the code.

    Different WP/ZC configurations with different plugins installed can introduce all manner of variables that my solution doesn’t anticipate.
    Quote Originally Posted by schoolboy View Post
    There have been many attempts at getting WP and ZC to site nicely together, but in general, their fundamental structural schemas are too divergent.

    I am no guru on the platforms of either system, but they are functionally very far apart.

    But also, I look at it differently...

    I believe that a blog and an eComm site serve two very different business objectives, and people vist a blog for very different reasons than an eComm site. I think that by mashing everything together can have overall detrimental effects. People get easily distracted, and while they may have come to the site initially to do some shopping, if they get the opportunity to sit and natter (or listen to other people's nattering), then you risk losing their focus. They may abandon the idea of shopping all-together.

    Kinda defeats the purpose for getting them to the site in the first place.

    We advise our clients to use blogs and social networking as HARVESTING sites, where people may land to have a bit of a chat, or whatever... but there is a clear strategy to get them to the eComm site ASAP, because that's what really counts.

    We feel an eComm site MUST have the single-minded objective of generating sales, and to do this without the rist of distractions that could diminish that objective... That is why we suggest to clients that their eComm sites do NOT have any external links to blogs, etc, while the blogs must have lots of links to the eComm site.

    Some people argue that this can "weaken" SEO potential, but we disagree. In our experience, people with a handful of well-maintained blogs and Social Pages, who use these to "harvest" visitors, find that their stores are quite busy and profitable.
    I agree with all of this, and a lot of this is exactly what I preach to MOST of my clients..

    However, I have a few clients who's primary business is service oriented. Their sites primary function is that of an online brochure/business card/newsletter/informational site. They do SOME sales online, but merchandise/gift certificate sales are a secondary function of the site.. They need CMS functionality with some e-comm capabilities.. (EZ Pages are not quite adequate for CMS by themselves)

    Therefore, I use WordPress as a CMS because in my experience my non-techy clients have an easier time adding/updating site content & articles on their own using WordPress versus Joomla or Drupal.. I prefer ZenCart for e-comm as I remain un-impressed by ANY of the WordPress e-comm plugins..

    However, I wanted to find a way to simplify templating WordPress and the Zen Cart so that they look alike with little fuss. So my current interest in WordPress/Zen Cart "integration" is investigating how to have ZenCart and WordPress share the WordPress theme.. This IMHO solves the real reason I think most folks seek "blog embedding" solutions to begin with -- they want to make the blog and the store look alike without having to do a lot of work to manage templates for two different systems.

    If I were the OP, I'd keep digging for a solution and be prepared to get his hands dirty.. One thing I have discovered in my research is that there is no clean way to do a "plug-n-play" kind of template tat I can see. (Google "display WordPress on External site" as a starting point) There are some basics that must be adhered to, but each WordPress template will be slightly different and therefore you will have to tweak things for each ZenCart/WordPress implementation..
    Last edited by DivaVocals; 22 Nov 2011 at 09:27 PM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: wordpress template html_header.php blocking modules/pages/index?

    Seeing that I just went through the trouble of configuring not one but TWO different sites where I created a WordPress "Wrap" template for Zen Cart, I thought I'd share a few more things I learned and yet MANY more reason's why NO ONE should use Michael Wender's WordPress template for Zen Cart solution without being prepared to modify the heck out of this template to correctly work with Zen Cart.

    I have now created three WordPress wrap templates. (I am hoping the last two will actually be put into use on live sites soon) I have learned quite a bit since starting down this venture.. One thing I want to stress again that I have learned is this:
    There really isn't a "One Size Fits All" method for doing this.. There are some general rules that must be followed, but generally there will need to be tweaks in the process because of variations in WordPress templates.

    A WordPress template framework (such as Catalyst, Genesis, or Thesis) may offer some ability to create a "One Size Fits All" template wrapping method simply because of how these frameworks are constructed (they lend to a more consistent template construction).
    Caveat: I am basing this assumption off of my recent experience in creating a Catalyst driven wrap template for Zen Cart. I am assuming that other frameworks behave in a similar fashion and allow for as close to a "One Size Fits All" template wrapping method as possible.

    That said, even if the Zen Cart wrap template is based on a WordPress framework generated theme, there will always be some level of template tweaking required to make this work correctly.. In my limited experience, this will be not nearly as much tweaking as would be required using a non framework generated theme. (BTW, Mike Wender's "solution" is reported to fail if you are using the Genesis framework)

    Since WordPress provides a method to display WordPress content outside of WordPress, I created a ZenCart template which makes calls to parts of my WordPress theme following ideas I got from this site: http://www.corvidworks.com/articles/...on-other-pages. The net effect of this is that I in essence "wrap" my WordPress theme around the Zen Cart store.
    (and for the curious..Why Zen Cart and NOT a WordPress plugin?? Simply put, I prefer Zen Cart for e-commerce and until one of the many WordPress e-commerce solutions improves to a level that I feel rivals Zen Cart, I have no interest in any WordPress e-commerce plugins at the moment)
    So here's some basics for those seeking to venture down this road:

    • Create two custom files in the WordPress theme folder based on the header.php file. One file will be used to call in the WordPress javascript and CSS (everything between the <head> tag). The other file will be used to call in the WordPress top header and navigation (everything after the <body> tag). Then make a call in the appropriate file/place to these files from the Zen Cart template.
      For the curious, you have to do it this way because the WordPress header.php file includes not only the code that appears inside the <head></head> tags, but also includes code that appears after the <body> tag. Zen Cart templates are structured slightly differently in that there is one file that includes everything between the <head></head> tags, other files which contain code that appears after the opening <body> tag.
    • Create a custom files in the WordPress theme folder based on the footer.php file. This file will be used to call in the WordPress footer area (everything just before the closing </body> tag). Then make a call in the appropriate file/place to these files from the Zen Cart template.


    Now that said you can't do this all willy nilly.. You WILL need to examine your WordPress theme's header.php & footer.php files and you WILL have to make sure that you include ONLY what's needed in the WordPress custom wrap files you are creating.. Remember except in the case of a WordPress framework generated template (Catalyst, Genesis, or Thesis) each template's header.php & footer.php files will be different.. You WILL have to examine them and make sure you understand what you need and where it needs to go..

    After doing this, you MAY find that you have to add some more code on the Zen Cart side to manually call in some of the CSS and javascripts that are not be pulled in using the file includes.. (I have YET to figure out why this is, but the manual addition of these CSS files and javascripts seems to work good enough for it to not be a huge concern) If you are using a WordPress theme framework, you will need to do this to make sure any child theme & custom CSS are properly called on the Zen Cart side of things.

    Like I said.. Not a "One Size Fits All" method, but based on what I have learned, this will work without the errors and issues that are reported using Mike Wender's solution..

    I am still testing and perfecting my methods, and once I am POSITIVE that there are no issues with this (so far so good), then I hope to move two of these sites into live production mode soon.. (the first template was scratched as came up with a MUCH better method for theme wrapping after creating the first template)

    I hope some of what I posted here is useful for others.. (It's general information, but for those who are DIY inclined it should be a good starting point) Google was TRULY my friend in this process!!!
    Last edited by DivaVocals; 8 Dec 2011 at 12:44 AM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  6. #6
    Join Date
    Jun 2011
    Location
    Colorado, USA
    Posts
    46
    Plugin Contributions
    0

    Default Re: wordpress template html_header.php blocking modules/pages/index?

    I either stopped receiving updates from this thread or just missed them. I wish I hadn't!!! Thanks for all the information Diva. I will look at trying to implement what you have suggested. I am using Genesis so there would have been problems.

    Onward and upward!!

  7. #7
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: wordpress template html_header.php blocking modules/pages/index?

    Quote Originally Posted by ZeroGravity View Post
    I either stopped receiving updates from this thread or just missed them. I wish I hadn't!!! Thanks for all the information Diva. I will look at trying to implement what you have suggested. I am using Genesis so there would have been problems.

    Onward and upward!!
    The method I outlined works just fine using Catalyst. I imagine it wouldn't be much different with Genesis. Good luck.. PM me, I'll show you the result of my "integration" efforts (still in dev so don't want to post URL here yet)
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. Using Wordpress in zc - Problem with index.php URL
    By fakeDecoy in forum General Questions
    Replies: 1
    Last Post: 29 Sep 2015, 07:59 PM
  2. html_header.php is missing from my custom template
    By seliko5 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 1 Mar 2011, 02:25 PM
  3. Page specific html_header.php pages
    By mutualadvantage in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Aug 2007, 11:08 PM
  4. wordpress add-on, posts not showing up on index.php
    By joshuaself in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 25 Oct 2006, 07:22 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