Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Shopper Approved Server Side Code

    Platform: Zencart v1.5.1

    I am trying to install product review integration for Shopper Approved. They give us a sample code as a guide. I am a newbie in zencart so I am kind of lost here. Can someone assist me or lead me in the right direction on solving this issue.

    I found a module for Shopper approved but it only works for Merchant reviews. But there is no module for Product review integration which is what I am trying to do.

    This is what was posted on shopper approved:

    These steps require a developer that can change your server side code to include the product ids of the products purchased.
    This is demo code. Place your customized code on the same page as your current Thank You Page code. You will need to add code to include all of the products in the completed order.

    <script type="text/javascript">
    /* Include all products in the object below 'product id':'Product Name' */
    var sa_products = { 'productid1':'Product Description One', 'productid2':'Product Description Two', 'productid3':'Product Description Three' };
    </script>

  2. #2
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: Shopper Approved Server Side Code

    okay i got this far. The problem I have with this script is it is only grabbing one product. Does anyone know what needs to be adjusted in order to get all the products that were ordered.

    /includes/languages/english/html_includes/classic/define_checkout_success
    <?php
    $productsString = '';
    foreach($products as $p)
    {
    if(!is_array($p))
    {
    continue;
    }
    $product_id = $p["products_id"];
    $product_name = $p['products_name'];
    $productsString .= "'".$product_id."' : '".$product_name."', ";
    }
    $productsString = rtrim($productsString);
    $productsString = rtrim($productsString, ",");
    ?>

    <script type="text/javascript">
    /* Include all products in the object below 'product id':'Product Name' */
    var sa_products = { <?php echo $productsString; ?> };
    </script>

  3. #3
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: Shopper Approved Server Side Code

    okay if anyone is interested in shopper approved product rating and intergrating it with zencart here is the code

    <?php

    $productsString = '';

    foreach($notificationsArray as $p)
    {
    $product_id = $p["products_id"];
    $product_name = $p['products_name'];
    $productsString .= "'".$product_id."' : '".$product_name."', ";
    }
    $productsString = rtrim($productsString);
    $productsString = rtrim($productsString, ",");
    ?>

    <script type="text/javascript">
    /* Include all products in the object below 'product id':'Product Name' */
    var sa_products = { <?php echo $productsString; ?> };
    </script>

 

 

Similar Threads

  1. v154 Adding Shopper Approved code, what is the names of these auto populated fields?
    By seanscully in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Feb 2015, 05:45 PM
  2. cannot delete server-side zc_install folder
    By MarleneF in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 19 Aug 2010, 03:16 AM
  3. can't copy files server-side
    By wysiwygmn in forum General Questions
    Replies: 1
    Last Post: 23 Jun 2007, 11:41 PM
  4. EZ-Pages and server side includes
    By GTrotter in forum General Questions
    Replies: 2
    Last Post: 28 May 2007, 12:41 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR