Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2007
    Posts
    159
    Plugin Contributions
    0

    Default Embed Products onto 3rd Party Site

    Has anyone worked with this module yet? I would love to use it as it seems to be the perfect solution for integrating my old site's style of newsletters with products but for me there is not enough information on how to work it into pages.

    Beth-katherine

  2. #2
    Join Date
    Mar 2007
    Posts
    153
    Plugin Contributions
    0

    Default Re: Embed Products onto 3rd Party Site

    I would like to know more about it too, I downloaded the mod, its 1 file with little to no instructions except 'upload to path.
    It has another site listed in the variables and not how to use, seems pretty hard to use, wouldn't find it in the admin section for each store.

  3. #3
    Join Date
    Feb 2007
    Location
    Worldwide Web
    Posts
    191
    Plugin Contributions
    0

    Default Re: Embed Products onto 3rd Party Site

    I wanted to know if there was any more information on using this module as the information that was given for this module is not enough information for the not so experience users.

    Instructions:
    Upload this file to domain.ext/zen/cart/path/embed.php
    Then execute http://www.domain.ext/zen/cart/path/...?products_id=3

    Can someone explain where I would put this at I don't kow where these files are located?
    Diva Boutiques
    www.divaboutiques.com

  4. #4
    Join Date
    Feb 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: Embed Products onto 3rd Party Site

    The best advice is to read back a few pages of posts and then start from the beginning to get a sense of how to use this template.

    HOWEVER I am still a bit confused as to HOW to use this template.

    From what I gather you insert the code wherever you want ZEN CART to be shown on an html document BUT what I would appreciate is a bit of more detailed info as to how this is done.

    My goal is to SELL products from EZ PAGES in a newsletter manner just like the way I am able to do with regular plain ole html. From my readings of previous posts I understand that once you leave the Zen-Cart environment you loose everything in your shopping cart. This is true when you open up a new page but is it true when you open up a new tab?

    Is this the way it is done?

    Beth-katherine

  5. #5
    Join Date
    Jun 2005
    Location
    London, UK
    Posts
    144
    Plugin Contributions
    0

    Default Re: cannot get this to work

    Well, I can't get it to work at all.

    I uploaded the embedjs.php file to my zencart directory (after updating the image file paths in the script to the my store details).

    I then put the script on a test page but nothing happens (and the script is definitely modified to the path to the embedjs.php file).

    It seems simple but obviously I am missing something that is not fully explained.

  6. #6
    Join Date
    Feb 2009
    Posts
    1
    Plugin Contributions
    0

    Default Re: Embed Products onto 3rd Party Site

    HELLO, i am using the code below for displaying the item on a third party site.

    But the price is excluding VAT,

    What am i doing wrong?
    For example:

    http://www.snelleveters.nl/embed.php?products_id=2
    who can help?

    PHP Code:
    <?php
    /*


    Instructions:
    Upload this file to domain.ext/zen/cart/path/embed.php
    Then execute http://www.domain.ext/zen/cart/path/embed.php?products_id=3

    The Following variables can be included in the URL.

    'showprice'  => &showprice=hide will hide the price
    'showqty'    => &showqty=hide will hide the quantity
    'showsubmit' => &showsubmit=hide will not allow the item to be added directly into the cart

    */




    //
    // +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce                                       |
    // |Module: Embeding Products onto 3rd Party Sites  0.20                  |
    // |File: Including file with PHP                                         |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2008 Leonard Burton leonardburton######################            |
    // | This code can be seen to work at http://24hourskin.com               |
    // | Which adds the item to the cart at http://shopilm.com                |
    // | Released under GPL 2.0                                               |
    // |                                                                      |
    // | http://www.zen-cart.com/index.php                                    |
    // |                                                                      |
    // | Portions Copyright (c) 2003 osCommerce                               |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license,       |
    // | that is bundled with this package in the file LICENSE, and is        |
    // | available through the world-wide-web at the following url:           |
    // | http://www.zen-cart.com/license/2_0.txt.                             |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to       |
    // | [email protected] so we can mail you a copy immediately.          |
    // +----------------------------------------------------------------------+
    //  $Id: packingslip.php 6251 2007-04-22 19:21:48Z wilt $
    //

      
    require('includes/application_top.php');


      
    $pID zen_db_prepare_input($_REQUEST['products_id']);
      
    $product $db->Execute("select * from products where products_id ='" . (int)$pID "'");

    while (!
    $product->EOF){
    $image  "<img src='http://www.snelleveters.nl/images/";
    $image .= "{$product->fields['products_image']}' width=150/>";

    $url  "http://www.snelleveters.nl/index.php?";
    $url .= "main_page=product_info";
    $url .= "&products_id={$product->fields['products_id']}";
    $url .= "&action=buy_now";

    if (
    $_GET['showsubmit'] !== "hide"){
        print 
    "<form method='post' ";
        print 
    "action='$url'>\n";
    }

    print 
    "$image\n";
    if (
    $_GET['showprice'] !== "hide"){

            print 
    "<br />Prijs: €";
            print 
    sprintf("%.2f",$product->fields['products_price']);
            print 
    "<input type='hidden' name='cart_quantity' value=1>\n";
    }


    print 
    "<input type='hidden' name='products_id' ";
    print 
    "value={$product->fields['products_id']}>\n";

    print 
    "<br />";
    if (
    $_GET['showqty'] !== "hide"){
            print 
    "<input type='text' name='cart_quantity' value=1 size='4' />\n";
    }
    if (
    $_GET['showsubmit'] !== "hide"){
        print 
    "<input type='submit' name='submit' value='Nu bestellen!'>\n";
        print 
    "</form>";
    }

    break;
    }






    ?>

  7. #7
    Join Date
    Nov 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Embed Products onto 3rd Party Site

    Hello, you do nothing wrong, except the script is not complete to show prices inclusive VAT.
    As you can see, it requests only the products fields and the product_price is the price exclusive VAT.
    To include VAT you have to extend the query to get the tax_rate (from the tax_rates table) as well and calculate the price inclusive VAT (don't forget to mention the TAX as well: it's mandatory in the Netherlands as far as I know).

    Now my problem with this script :
    When I execute it, I get the webstore, but no product added to the shop-cart.
    Just a message telling that the shop-cart is empty .
    As I study the call to the webshop for a add_product action, the parameter cPath=... is also included in the URL, and not in the call from within the script .
    But even when I add this parameter to the script, it still doesn't add the product to a shop-cart... Am I forgetting something ??

    Does anyone know if Zencart has a restriction in adding products to the shop-cart from within another website?

  8. #8

    Default Re: Embed Products onto 3rd Party Site

    I uploaded the files (2) to the root folder of the website and I cannot get the embed function to work. Can anyone add a link to show that they have successfully made this mod work? I seem to get an error: http://www.hotnbottled.com/embed.php?products_id=1136
    Matthew Heald
    All Hot N' Bottled - Retail
    http://hotnbottled.com

    Hot Shots Hot Sauce - Wholesale
    http://hotshotshotsauce.com

  9. #9
    Join Date
    Nov 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Embed Products onto 3rd Party Site

    Hello mbheald, As I klick on your link I got a message :
    1146 Table 'hotnbott_zc2.products' doesn't exist
    in:
    [select * from products where products_id ='1136']

    When you have a PREFIX entered on your install of Zencart (before the tablename), you have to add the prefix as well in the query. This is not done by the original developper of the embed.php.
    You also can change the code of embed.php line

    $product = $db->Execute("select * from products where products_id ='" . (int)$pID . "'");

    to

    $product = $db->Execute("select * from ".TABLE_PRODUCTS." where products_id ='" . (int)$pID . "'");

    wich also will solve this issue....

  10. #10

    Default Re: Embed Products onto 3rd Party Site

    Quote Originally Posted by minddigger View Post
    Hello mbheald, As I klick on your link I got a message :
    1146 Table 'hotnbott_zc2.products' doesn't exist
    in:
    [select * from products where products_id ='1136']

    When you have a PREFIX entered on your install of Zencart (before the tablename), you have to add the prefix as well in the query. This is not done by the original developper of the embed.php.
    You also can change the code of embed.php line

    $product = $db->Execute("select * from products where products_id ='" . (int)$pID . "'");

    to

    $product = $db->Execute("select * from ".TABLE_PRODUCTS." where products_id ='" . (int)$pID . "'");

    wich also will solve this issue....
    Thank you, this solved my problem. I also noticed that on both embed.php and embedjs.php you must change the website to match your url in order for your products to display correctly.

    embed.php
    Line 53 and 56: $image = "<img src='http://shopilm.com/images/"; should be changed to: $image = "<img src='http://YOUR_WEBSITE.com/images/";

    embedjs.php
    Line 57 and 60

    I am now having a second problem... I tried adding the Javascript into a basic HTML site that I would like to display products on, but the code did not show anything on the website. www.asskickinshop.com

    Here is how I implemented the code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>###### Kickin Shop - hotnbottled.com</title>
    </head>

    <body>
    <script language="JavaScript"
    src="http://www.hotnbottled.com/embed.php?products_id=1136"
    type="text/javascript"></script>
    </body>
    </html>
    Matthew Heald
    All Hot N' Bottled - Retail
    http://hotnbottled.com

    Hot Shots Hot Sauce - Wholesale
    http://hotshotshotsauce.com

 

 

Similar Threads

  1. Embeding product onto a 3rd party site
    By systemagic in forum General Questions
    Replies: 24
    Last Post: 23 Oct 2010, 01:56 PM
  2. Embed 3rd Party Products error
    By digidiva-kathy in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Jan 2009, 05:49 AM
  3. Embed Products onto 3rd Party Site
    By breck in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 2 Oct 2008, 01:34 PM
  4. New Mod: Embed Products onto third Party Site
    By systemagic in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 19 Apr 2008, 10:41 PM
  5. Help - Site stuffed by 3rd party template developers
    By pstarling in forum General Questions
    Replies: 7
    Last Post: 22 Mar 2007, 08:39 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