Announcement

Collapse
No announcement yet.

Miva WordPress header

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Miva WordPress header

    Hey,
    We have a sub-folder with a WordPress install (http://store.com/blog/) It’s working as expected, but I would like to include the Miva header and Miva footer. I found some instructions that note I should include one of the following:

    Code:
    <?php include 'http://www.DomainName.com/mm5/merchant.mvc?Screen=WP-HEADER'; ?>
    <?php echo file_get_contents("http://www.DomainName.com/mm5/merchant.mvc?Screen=WP-HEADER"); ?>
    <?php $wp=readfile("http://www.DomainName.com/mm5/merchant.mvc?Screen=WP-HEADER"); ?>
    Our default install on the server doesn’t allow_urls for such calls. Also, this is likely a security risk. Has anyone figured out how to get around this? There is a nice site: https://www.mypapershop.com/weblog/ that basically does this.

    #2
    I don't believe there's a workaround for this because the only way to interface with Merchant from the public-facing side, and to have it process and render a page template, is via web request. Perhaps if your php allows for local command execution, you could use something like an exec call to the 'curl' or 'wget' program to make the request for you and send back the data? That starts to get pretty ugly though when each request to the site triggers a local command execution, followed by another request, which itself triggers Merchant, and then you have to hope everything works well to get the content back where it was supposed to go.

    From a strict performance standpoint, I don't like integrating Merchant into Wordpress, because you're driving up server load (via the two calls to Merchant) in return for the convenience of not having to recreate the header data in wordpress, and with the rate wordpress sites tend to get scanned for vulnerabilities from viruses and malware, that can create a huge burst of requests to your store.
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      We run both Miva and WordPress on our server, and we manage the process of keeping headers and footers in sync manually. Of course, it's not ideal, but how often are you updating headers and footers? When you do, you just need to remember to do it in two places.
      Todd Gibson
      Oliver + S | Sewing Patterns for Kids and the Whole Family

      Comment


        #4
        I think the primary reason they would like to do this is for the persistent mini-basket throughout the site. I agree that it's easy enough to update both places - it's more for the mini-basket. I'll need to do an AJAX call to spawn the mini-basket, but I think it's doable. I managed to get the header and footer pulling correctly - just have to pin down the pathways for the includes.

        Comment

        Working...
        X