WordPress.org

Support

Support » How-To and Troubleshooting » Include a webpage into a page?

Include a webpage into a page?

  • Hiya!

    I have my WordPress all set up allright, but I would also like to add a shop. So I have got myself a shop from spreadshirt.net. My question is how do I implement the shop into a page? The Shop is alittle wide, so I need to remove the sidebar aswell I think.

    Spreadshop.net has this html code that you could use to implement the shop, but I don’t want it to be an iFrame, I just want it showing as a normal page in WordPress.

    Heres the iFrame link:
    <iframe height=”540″ width=”620″ src=”http://www.spreadshirt.net/shop.php?sid=110931″ name=”Spreadshop” id=”Spreadshop” frameborder=”0″></iframe>

    Thanks for any help! πŸ™‚

    PS: I’ve allready tried the Spreadshirt plugin from Tassomoni (or something), but it only gives me these errors:
    Warning: Cannot modify header information – headers already sent by (output started at /home/www/vsffc.com/wp-content/plugins/spreadshop.php:212) in /home/www/vsffc.com/wp-admin/admin.php on line 10

    Warning: Cannot modify header information – headers already sent by (output started at /home/www/vsffc.com/wp-content/plugins/spreadshop.php:212) in /home/www/vsffc.com/wp-admin/admin.php on line 11

    Warning: Cannot modify header information – headers already sent by (output started at /home/www/vsffc.com/wp-content/plugins/spreadshop.php:212) in /home/www/vsffc.com/wp-admin/admin.php on line 12

    Warning: Cannot modify header information – headers already sent by (output started at /home/www/vsffc.com/wp-content/plugins/spreadshop.php:212) in /home/www/vsffc.com/wp-admin/admin.php on line 13

    Thanks for all help

Viewing 15 replies - 1 through 15 (of 30 total)
  • For teh second issue (the error) see this:
    http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    As for the iframe. If you don’t want it (which I fully understand), try to make a Page template and include the code in that file. After that create a a new Page using that template and it should work.

    I think I will go for removing the iframe, but what I don’t know how to do is how the code should be in the template. I’m very unexperienced with php and can only change and edit whats allready there.

    Could you just pase in the code and where I should put the url/address to the shop?

    Thanks alot -:)

    Well I hope you’re still following up on this post, because I can help you.
    I have a css file, a 2-line php script and a block of javascript code you can have.

    The rest is so easy I would just email you the zip right now.
    go to http://www.in2mind.com/blog/ i’ll post it up in my blog. (by evening dec 10th)

    lxg
    Member

    @mastermind

    You can’t put PHP code into a WP page, because the php tags would be converted into HTML special characters. This is also a security feature.

    There is, however, a Plugin named run PHP (and similar ones, too), but I don’t think they will allow to run such complex apps like a webshop.

    I suggest you grab the HTML output of your WP install (after having finished customisation ;-). Then, based on this, you build a template for your webshop.

    meatcake: Oki, I’ll check it out later today πŸ™‚

    mastermind: I don’t want to make a shop, because I allready have one; vsffc.spreadshirt.net

    But what I want is to just to add that ship into a WP page. I have Dreamwaver so I can make a new page template, so I dont need to use php tags inside the Write Page in the admin. But I don’t know the correct code to use to have the template display the shop…

    If you get me.

    Thanks for reply so far πŸ™‚

    PS: I solved the plugin error, and it’s working, but I would still like to get the other method to work too πŸ™‚

    Thanks

    And one more small thing about the plugin. I got it working, and made it active. You see the shop page here with the plugin: Plugin shop

    But as you can see the image goes over the div. How do I correct that?

    Heres the css and code for it:
    CSS:
    .spreadarticle {
    clear: left;
    border-bottom: 1px solid #666;
    margin-bottom: 2em;
    }
    .spreadarticle img {
    float: left;
    }
    .spreadarticle h3, .spreadarticle p {
    margin-left: 150px;
    }

    Display Code:
    <div class=”spreadarticle”>
    &article_id=<?=$article[“id”];?>” title=”<?=$article[“name”];?>” target=”_blank” rel=”no-follow”><img src=”http://www.spreadshirt.net/<?=$article[“picurl”];?>” alt=”<?=$article[“name”];?>” />
    <h3><?=$article[“name”];?></h3>
    <?=$article[“description”];?>
    KR:. <?=$article[“price”];?>
    </div>

    Thanks for any tips about this, and my earlier post about the template thing πŸ™‚

    Edit: And why does it show Γ―ΒΏΒ½ instead of the norwegian letters; æ, ø, ΓƒΒ₯? The letters show as normal on the other parts of the website

    lxg
    Member

    @mastermind

    what is this?! second time I’m pushing “submit” once and end up with double posting?!

    lxg
    Member

    @mastermind

    Sorry, if I don’t get you correctly. But as far as I see, we have several premises:
    1. The shop has to perform different kinds of action. So there have to be either more than one pages or one page handling the actions by the query string.
    2. the shop itself is not hosted on the same site as your blog, so any link to a shop item goes to another page anyway.

    Now, if I understand you correctly, you want to include the very HTML of the shop into your blog. This is — theoretically — possible, but I wouldn’t do that. To get it working, you would need something like

    <?php
    echo file_get_contents('http://the-shop-website.com');

    (just a starter)
    For this to work you’d need to put allow_url_fopen = On in your server’s php.ini and you’d need a plugin which runs native php inside a WP page (as I posted above).

    However, I don’t need to say that running code from an external webpage is highly dangerous; even if you trust that page you are risking man-in-the-middle attacks and similar threats.

    Back on template building πŸ˜‰ I meant you could just take the HTML output of the page and replace anything inside the <div id="content"> by your shop stuff. Then you put your WP CSS there, ready. The question is just: in how far are you able to customize the spreadshirt template.

    And why does it show Γ―ΒΏΒ½ instead of the norwegian letters; æ, ø, ΓƒΒ₯? The letters show as normal on the other parts of the website

    I’d suspect you edited those lines in a text editor that didn’t have utf-8 support.

    Thanks for reply πŸ™‚

    Since the first option was dangerous concerning attacks, I will drop that one πŸ™‚ I don’t want angry buyers at my door with a bat… Would’ve been highly unpleasent.

    Heh, I think I partly understand the template thing now. Will try it out asap. As far as the customization of the spreadshirt shop, it is atleast there, and I think the options goes as far as to colours and fonts, and background colour. I can also change the number of products in a row vertically, and that was it I think.

    But if I make the template as you said, won’t all the stuff there go under the WP css? If so I could just add and edit in the Wp css to get the desired layout I think (hope).

    Thanks for fast reply

    Connection is slow, so got a double post :/

    lxg
    Member

    @mastermind

    As far as the customization of the spreadshirt shop, it is atleast there, and I think the options goes as far as to colours and fonts, and background colour. I can also change the number of products in a row vertically, and that was it I think.

    Then I’m afraid the template idea is not for you. πŸ™ I thought you’d have a bit more influence on the shop’s HTML…

    But if I make the template as you said, won’t all the stuff there go under the WP css? If so I could just add and edit in the Wp css to get the desired layout I think (hope).

    That of course you could do. You could adapt your WordPress to look like the spreadshirt shop. ;-P But I don’t think this is the real thing.

    As far as I see, the iframe would be the nicest solution under your circumstances.

    Apart from that, I’ve been playing around with Joomla! lately. This is an easy to set up OpenSource CMS where you can have both a blog and a shop. Maybe this is more suitable for you?

    *duckandcover*

    *Darn, missed*

    Hehe, ok, I guess I jsut have to use the plugin in then, it works Ok I guess πŸ™‚ Except my little problem with the image going over the div.

    Joomla! is some where along the lines of Mambo if i’m not mistaken, and Mamba didn’t really suit me. I really like WP so I think I’ll stick with it πŸ˜›

    And if you’re still with me here, do you think you could take a fast look at my problem with the plugin? (Some post earlier)

    Thanks anyway mate, you’ve helped me alot πŸ™‚ πŸ™‚ πŸ™‚
    simenfs

    lxg
    Member

    @mastermind

    I just fed the W3 validator with your shop page. You still have some non-utf8 characters inside your page, which is why I overwrote it with ISO-8859-1. Then it seems you have nested a <style> section inside the document <body> (and there are other errors, too). This is not valid and therefore I suppose this to be the display error.

    Also, you might want to validate your CSS.

    Humm. I’ll take a look at it now.

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Include a webpage into a page?’ is closed to new replies.