[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/ -> wishlist_public.php (source)

   1  <?php
   2  /*

   3  $Id: wishlist_public.php 3 2006-05-27 04:59:07Z user $

   4    osCMax Power E-Commerce

   5    http://oscdox.com

   6  

   7    Copyright 2006 osCMax2005 osCMax, 2002 osCommerce

   8    Released under the GNU General Public License

   9  */
  10  
  11  // Most of this file is changed or moved to BTS - Basic Template System - format.

  12  // For adding in contribution or modification - parts of this file has been moved to: catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).

  13  //       catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).

  14  // (Sub 'fallback' with your current template to see if there is a template specific file.)

  15    require ('includes/application_top.php');
  16    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_WISHLIST);
  17  
  18  if(!isset($_GET['public_id']) && !isset($HTTP_POST_VARS['add_wishprod'])) {
  19        tep_redirect(tep_href_link(FILENAME_DEFAULT));
  20  }
  21  
  22  if((isset($_GET['public_id'])) && ($_GET['public_id'] == '')) {
  23        tep_redirect(tep_href_link(FILENAME_DEFAULT));
  24  }
  25  
  26    $public_id = $_GET['public_id'];
  27  
  28  // QUERY CUSTOMER INFO FROM ID

  29       $customer_query = tep_db_query("select customers_firstname from " . TABLE_CUSTOMERS . " where customers_id = '" . $public_id . "'");
  30      $customer = tep_db_fetch_array($customer_query);
  31  
  32  // ADD PRODUCT TO SHOPPING CART

  33    if (isset($HTTP_POST_VARS['add_wishprod'])) {
  34      if(isset($HTTP_POST_VARS['add_prod_x'])) {
  35          foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {
  36              $product_id = tep_get_prid($value);
  37              $cart->add_cart($product_id, $cart->get_quantity(tep_get_uprid($product_id, $HTTP_POST_VARS['id'][$value]))+1, $HTTP_POST_VARS['id'][$value]); 
  38          }
  39      tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
  40      }
  41    }
  42  
  43  
  44    $breadcrumb->add(NAVBAR_TITLE_WISHLIST, tep_href_link(FILENAME_WISHLIST, '', 'SSL'));
  45    $content = CONTENT_WISHLIST_PUBLIC;
  46  
  47    include (bts_select('main', $content_template)); // BTSv1.5

  48    require (DIR_WS_INCLUDES . 'application_bottom.php'); 
  49  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7