Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 3 of 3

Thread: Making Wishlist page to display all customers' wishlists.

  1. #1
    dan1234
    Guest


    Default Making Wishlist page to display all customers' wishlists.

    I want to make a wishlist lookup page so that people that come into the brick and mortar store can look up someone's wishlist by bringing up a list of people that have wishlists and clicking on the one of their choice. I have created a page to generate a list of customers that have a wishlist but the link to their wishlist is not coming out correct. I am using the following code:

    <table border="0" cellspacing="0" cellpadding="2">
    <?php
    # Get specific list data
    $customers_query_raw = tep_db_query("select customers_id, customers_firstname, customers_lastname from " .
    TABLE_CUSTOMERS . " where customers_id = '".$HTTP_GET_VARS['cid']."'");
    $customers = tep_db_fetch_array($customers_query_raw);
    ?>
    <tr><td>
    <?php if (isset($HTTP_GET_VARS['cid'])) {
    echo '<a href="' . tep_href_link(FILENAME_WISHLIST_PUBLIC, 'public_id=' . $customers['customers_id'], 'NONSSL') . '"><span class="pageHeading">' . $customers['customers_firstname'] . ' ' . $customers['customers_lastname'] . '</span></a>';
    }else{
    echo tep_draw_separator('pixel_trans.gif', 1, 1);
    } ?>
    </td></tr>
    </table>

    It generates a complete wishlist fine but the link is incorrect. The link comes out as just http://...../wishlist_public.php and thus reverts to the index page.

    I think my error is in the line <a href="' . tep_href_link(FILENAME_WISHLIST_PUBLIC, 'public_id=' . $customers['customers_id'], 'NONSSL') . '">

    I have tried to write it several ways but cannot get it to include ?public_id=1 at the end of the link.

    Can anyone point me in the right direction?

    Thanks,

    Dan

  2. #2
    osCMax Development Team

    Making Wishlist page to display all customers' wishlists.

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    77


    Default Re: Making Wishlist page to display all customers' wishlists.

    I think you are mixing your ' 's too much ... make $customer['customers_id'] a variable then call it in the href construct. Also you seem to be mis-using the PHP ... Try something like:

    <?php
    $cus_is = $customer['customers_id'];
    ?>

    <a href="<?php echo tep_href_link(FILENAME_WISHLIST_PUBLIC, 'public_id=' . $cus_id, 'NONSSL'); ?>">Your link</a>

    Regards.
    pgmarshall
    _______________________________

  3. #3
    osCMax Development Team

    Making Wishlist page to display all customers' wishlists.

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,137
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Exclamation Re: Making Wishlist page to display all customers' wishlists.

    You will need to keep in mind that you cannot show people someone else's details (name, for example) on the list, unless your country has no Data Protection Act. For a Wedding Wish List, for example, you may need the originator and client to sign a disclaimer. It depends on what application that you're putting this list to.

    On the coding front:
    $HTTP_GET_VARS should be replaced with $_GET
    Last edited by ridexbuilder; 11-02-2011 at 11:38 AM.

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

Similar Threads

  1. Need help on new products page and admin/customers/create account page
    By tsui3276 in forum osCMax v2 Features Discussion
    Replies: 12
    Last Post: 02-20-2011, 08:00 PM
  2. Customers Wishlist in admin
    By gasse1014life in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 12-15-2009, 09:00 AM
  3. Put Wishlist in Shopping Cart Page
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-13-2008, 05:00 AM
  4. HELP! MAKING NEW PAGE.
    By Thang422 in forum osCMax v2 Features Discussion
    Replies: 11
    Last Post: 10-20-2005, 06:27 AM
  5. Making Product Attributes Display in Certain Order
    By Anonymous in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 12-15-2002, 11:05 AM

Bookmarks

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
  •