Jump to content

accarter

Members
  • Content count

    27
  • Joined

  • Last visited

Profile Information

  • Real Name
    Allison
  1. Hi, is there an easy way to add an add to wishlist button in the righthand column? thanks! best, allison
  2. accarter

    Wishlist 3.0 Support Thread

    Hi all, my wishlist works swell except for public_wishlist.php, which is still giving me this error: 1054 - Unknown column 'p.products_id' in 'on clause' select pd.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products p, products_description pd left join specials s on p.products_id = s.products_id where pd.products_id = '84' and p.products_id = pd.products_id and pd.language_id = '1' order by products_name [TEP STOP] I changed <?php echo tep_draw_form('wishlist_form', tep_href_link(FILENAME_WISHLIST_PUBLIC)); ?> to <?php echo tep_draw_form('wishlist_form', tep_href_link(FILENAME_WISHLIST_PUBLIC, 'public_id='.$public_id)); ?> already - why would I still be getting this message? Thanks so so much for your help! Best, Allison
  3. Hi, I am trying to install this to a heavily modified site and am wondering if anyone else has either encountered this problem or could help me solve it. Basically part of the install instructions clash with the attribute sort add-on. Below is my product_info.php code - any ideas about how to make this work? Thank you! Best, Allison <?php /* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <div id="content"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="200" valign="top"><table border="0" width="190" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-bottom: 2px #e4e3bc solid; padding:10px;"> <?php if ($product_check['total'] < 1) { ?> <tr> <td colspan="3"><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { //BOF UltraPics //BOF Original /* $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); */ //EOF Original $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); //EOF UltraPics $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } //DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED if(tep_session_is_registered('wishlist_id')) { ?> <tr> <td colspan="3" class="messageStackSuccess"><?php echo PRODUCT_ADDED_TO_WISHLIST; ?></td> </tr> <?php tep_session_unregister('wishlist_id'); } ?> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="0" vspace="0"') . '</a>'; ?>'); //--></script> <?php if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') include(DIR_WS_MODULES . 'additional_images.php'); ?> </td> <td class="main" align="left" valign="top"> </td> </tr> <tr style="padding-top:10px;"> <td><br/><?php echo $products_name; ?> <?php echo $products_price; ?></td></tr> </table></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td colspan="3" class="main"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"><!--BOF UltraPics--> <?php if ($product_info['products_image_med']!='') { $new_image = $product_info['products_image_med']; $image_width = MEDIUM_IMAGE_WIDTH; $image_height = MEDIUM_IMAGE_HEIGHT; } else { $new_image = $product_info['products_image']; $image_width = SMALL_IMAGE_WIDTH; $image_height = SMALL_IMAGE_HEIGHT; } ?> <!--EOF UltraPics--> </td> </tr> </table> <?php } ?> <p align="left"><?php echo stripslashes($product_info['products_description']); ?></p> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); //commented out for attributes sort module // $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . //TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . //(int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.attribute_sort"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main" valign="top"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main" valign="top"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> <td align="right"></td> </tr> <?php } ?> </table> <?php } ?> </td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr><td colspan="3" align="center"></td> <tr> <td colspan="3" class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td colspan="3" class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td colspan="3" align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td colspan="3" align="center" class="smallText"></td> </tr> <?php } ?> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><br><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if($registry_mode_id == 0){ ?> <tr> <td class="main"></td> <td width="15%" height="40" align="right" class="main"></td> </tr> <?php }else{ ?> <tr> <td class="main"></td> <td class="main" align="left" valign="middle"> <!--test to see if 2 submit buttons work!? //--> <input type="text" name="products_quantity_registry" value="1" size="2"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_registry.gif', IMAGE_BUTTON_ADD_TO_REGISTRY, 'name="submit_registry"'); ?><br/><br/><br/> </td> <td width="15%" height="40" class="main" align="left" valign="middle"> <br/><br/><br/> </td> </tr> <?php } ?> <tr> <td align="center" valign="top"> <p align="center" style="margin-left:0px;"><span style="margin-left:0px;"><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></span> </p> <p align="center" class="smallText"> <table width="100%" cellspacing="1" cellpadding="2" > <tr> <td></td> </tr> </table></td> <td align="center" valign="top"><span style="margin-left:0px;"><span class="smallText"> <input name="image" type="image" title=" Tell A Friend " src="includes/languages/english/images/buttons/button_tell_a_friend.gif" alt="Tell A Friend" vspace="3px" border="0"> <input type="hidden" name="products_id" value="###PRODUCT ID###"> <br> <input type="text" name="to_email_address" size="15"> <br/> Email A Friend! </span></span></td> <td align="center" valign="top" style="margin-right:100px;"><span style="margin-left:0px;"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'name="submit_cart"'); ?></span></td> </tr> <tr> <td colspan="3"> <!-- start gift registry //--> </table></td> </tr> <tr> <!-- end gift registry //--> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> </table> </form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <!-- footer_eof //-->
  4. Hi, I've installed CCGV and have tried several times to send myself a gift voucher from admin. The email goes through with a voucher code, but when I go to redeem it, I get the following message: The Gift Voucher number may be invalid or has already been redeemed. To contact the shop owner please use the Contact Page Any idea where this problem is occurring? Thank you! Best, Allison pergolina.com/catalog
  5. Hi, I've installed CCGV and have tried several times to send myself a gift voucher from admin. The email goes through with a voucher code, but when I go to redeem it, I get the following message: The Gift Voucher number may be invalid or has already been redeemed. To contact the shop owner please use the Contact Page Any idea where this problem is occurring? Thank you! Best, Allison pergolina.com/catalog
  6. accarter

    CCGV - Send Voucher

    Hi, I just installed CCGC (traditional). I am able to send the email, but then when I click on the link to redeem my voucher, it says that the voucher has already been redeemed or is an invalid code. Do you have any idea where this problem might be happening? Thank you!! Best, a
  7. Hi, is anyone working on something that would allow people purchasing from a registry to ship to the registry owner? Thanks! Best, Allison
  8. Just so you know - what was going on was that the install instructions i was using skipped the part where you define functions in /includes/functions.php. The following code was missing: //start gift registry //// // Function to return all inmate facilities function tep_get_registry_occasions($pull_down_default_value = true) { global $languages_id; if($pull_down_default_value) { $occassion_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT_REGISTRY)); }else{ $occassion_array = array(); } $occassion_query_string = "select registry_occasion_id, registry_occasion_name from " . TABLE_REGISTRY_OCCASION . " WHERE language_id = '" . $languages_id . "' order by registry_occasion_name"; $occassion_query = tep_db_query($occassion_query_string); while ($occassion_values = tep_db_fetch_array($occassion_query)) { $occassion_array[] = array('id' => $occassion_values['registry_occasion_id'], 'text' => $occassion_values['registry_occasion_name']); } return $occassion_array; } //// // Function to return all inmate facilities function tep_get_registry_occasion_name($occasion_id) { global $languages_id; $occassion_query_string = "select registry_occasion_name from " . TABLE_REGISTRY_OCCASION . " WHERE language_id = '" . $languages_id . "' AND registry_occasion_id = '" . $occasion_id . "'"; $occassion_query = tep_db_query($occassion_query_string); $occassion_value = tep_db_fetch_array($occassion_query); return $occassion_value['registry_occasion_name']; } //// // Function to return name and email address from the registry owner function tep_get_registry_email_info($registry_owner_id) { $registry_owner_query_string = "select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " WHERE customers_id = '" . $registry_owner_id . "'"; $registry_owner_query = tep_db_query($registry_owner_query_string); $registry_owner_value = tep_db_fetch_array($registry_owner_query); return $registry_owner_value; } function tep_get_registry_customers_id($reg_id){ $registry_customers_id_query_string = "select customers_id from " . TABLE_REGISTRY_PRODUCTS . " WHERE registry_id = '" . $reg_id . "'"; $registry_customers_id_query = tep_db_query($registry_customers_id_query_string); $registry_customers_id_value = tep_db_fetch_array($registry_customers_id_query); return (int)$registry_customers_id_value['customers_id']; } function tep_get_registry_owners($reg_id){ $registry_owners_query_string = "select c.customers_firstname, c.customers_lastname, r.co_registrant_first_name, r.co_registrant_last_name from " . TABLE_CUSTOMERS . " c, " . TABLE_REGISTRY . " r where r.customers_id = c.customers_id AND r.registry_id = '" . $reg_id . "'"; $registry_owners_query = tep_db_query($registry_owners_query_string); $registry_owners_value = tep_db_fetch_array($registry_owners_query); return $registry_owners_value; } function tep_get_default_address($customers_id){ $registry_default_address_id_string = "select c.customers_default_address_id from " . TABLE_CUSTOMERS . " c where c.customers_id = '" . $customers_id . "'"; $registry_default_address_id_query = tep_db_query($registry_default_address_id_string); $registry_default_address_id_value = tep_db_fetch_array($registry_default_address_id_query); return $registry_default_address_id_value['customers_default_address_id']; } //end gift registry best! Allison
  9. I am having the same problem - I did run the mysql changes. Thank you, Allison
  10. Hi, I just installed the Gift Registry, and am having a problem with add_registry_process.php - the dropdown menu and everything else below it isn't running. Is it possible that the dropdown options aren't defined? Where would those be defined? Thank you! add_registry_details: <?php /* $Id: address_book_details.php,v 1.6 2003/02/12 23:55:58 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ if (!isset($process)) $process = false; ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="formAreaTitle"><?php echo CATEGORY_REGISTRY; ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo CO_REGISTRANT_FIRST_NAME; ?></td> <td class="main"> <?php if ($process == true) { if ($firstname_error == true) { echo tep_draw_input_field('co_registrant_first_name') . ' ' . CO_REGISTRANT_FIRST_NAME_ERROR; } else { echo $co_registrant_first_name . tep_draw_hidden_field('co_registrant_first_name'); } } else { echo tep_draw_input_field('co_registrant_first_name', $registry_result['co_registrant_first_name']); } ?></td> </tr> <tr> <td class="main"> <?php echo CO_REGISTRANT_LAST_NAME; ?></td> <td class="main"> <?php if ($process == true) { if ($lastname_error == true) { echo tep_draw_input_field('co_registrant_last_name') . ' ' . CO_REGISTRANT_LAST_NAME_ERROR; } else { echo $co_registrant_last_name . tep_draw_hidden_field('co_registrant_last_name'); } } else { echo tep_draw_input_field('co_registrant_last_name', $registry_result['co_registrant_last_name']); } ?></td> </tr> <tr> <td class="main"> <?php echo REGISTRY_OCCASION_DATE; ?></td> <td class="main"> <?php if ($process == true) { if ($registry_occasion_date_error == true) { echo tep_draw_input_field('registry_occasion_date') . ' ' . REGISTRY_OCCASION_DATE_ERROR; } else { echo tep_date_short($registry_occasion_date) . tep_draw_hidden_field('registry_occasion_date') . ' ' . REGISTRY_OCCASION_DATE_ERROR; } } else { echo tep_draw_input_field('registry_occasion_date', tep_date_short($registry_result['registry_occasion_date'])) . ' ' . REGISTRY_OCCASION_DATE_TEXT; } ?></td> </tr> <tr> <td class="main"> <?php echo REGISTRY_OCCASION; ?></td> <td class="main"> <?php if ($process == true) { if ($registry_occasion_error == true) { echo tep_draw_pull_down_menu('registry_occasion_id', tep_get_registry_occasions(), '', '') . ' ' . REGISTRY_OCCASION_ERROR; } else { echo tep_get_registry_occasion_name($registry_occasion_id) . tep_draw_hidden_field('registry_occasion_id'); } } else { echo tep_draw_pull_down_menu('registry_occasion_id', tep_get_registry_occasions(), $registry_result['registry_occasion_id'], '') . ' ' . REGISTRY_OCCASION_TEXT; } ?></td> </tr> </table></td> </tr> </table></td> </tr> </table> add_registry_process.php <?php /* $Id: add_registry_process.php,v 1.01 2003/04/10 19:30:00 gs Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] SammySolutions.com ltd., [url="http://www.SammySolutions.com"]http://www.SammySolutions.com[/url] Copyright © 2003 SammySolutions.com and osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'remove') && tep_not_null($HTTP_GET_VARS['registry_id']) ) { $registry_id = tep_db_prepare_input($HTTP_GET_VARS['registry_id']); tep_db_query("delete from " . TABLE_REGISTRY . " where registry_id = '" . tep_db_input($registry_id) . "' and customers_id = '" . $customer_id . "'"); //delete the stuff from the registry if ($customer_id && ($registry_mode_id != 0)) { tep_db_query("delete from " . TABLE_REGISTRY_PRODUCTS . " where customers_id = '" . $customer_id . "' AND registry_id = '" . $registry_mode_id . "'"); tep_db_query("delete from " . TABLE_REGISTRY_PRODUCTS_ATTRIBUTES . " where customers_id = '" . $customer_id . "' AND registry_id = '" . $registry_mode_id . "'"); } tep_redirect(tep_href_link(FILENAME_ADD_REGISTRY, 'registry_mode_id=0', 'SSL')); } // Post-entry error checking when updating or adding an entry $process = false; if (isset($HTTP_POST_VARS['action']) && (($HTTP_POST_VARS['action'] == 'process') || ($HTTP_POST_VARS['action'] == 'update'))) { $process = true; $error = false; $registry_occasion_id = tep_db_prepare_input($HTTP_POST_VARS['registry_occasion_id']); $registry_occasion_date = tep_db_prepare_input($HTTP_POST_VARS['registry_occasion_date']); $co_registrant_first_name = tep_db_prepare_input($HTTP_POST_VARS['co_registrant_first_name']); $co_registrant_last_name = tep_db_prepare_input($HTTP_POST_VARS['co_registrant_last_name']); if (checkdate(substr(tep_date_raw($registry_occasion_date), 4, 2), substr(tep_date_raw($registry_occasion_date), 6, 2), substr(tep_date_raw($registry_occasion_date), 0, 4))) { $registry_occasion_date_error = false; } else { $error = true; $registry_occasion_date_error = true; } if ($registry_occasion_id == '') { $registry_occasion_error = true; $error = true; } else { $registry_occasion_error = false; } //check the registry date here as well if ($error == false) { $sql_data_array = array('customers_id' => $customer_id, 'registry_occasion_id' => $registry_occasion_id, 'registry_occasion_date' => tep_date_raw($registry_occasion_date), 'co_registrant_first_name' => $co_registrant_first_name, 'co_registrant_last_name' => $co_registrant_last_name ); $registry_id = tep_db_prepare_input($HTTP_POST_VARS['registry_id']); if ($HTTP_POST_VARS['action'] == 'update') { tep_db_perform(TABLE_REGISTRY, $sql_data_array, 'update', "registry_id = '" . tep_db_input($registry_id) . "' and customers_id ='" . tep_db_input($customer_id) . "'"); } else { tep_db_perform(TABLE_REGISTRY, $sql_data_array); // Go back to where we came from if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); tep_redirect($origin_href); } } tep_redirect(tep_href_link(FILENAME_ADD_REGISTRY, '', 'SSL')); } } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'modify') && tep_not_null($HTTP_GET_VARS['registry_id'])) { $registry_query_string = "select registry_id, customers_id, registry_occasion_id, registry_occasion_date, co_registrant_first_name, co_registrant_last_name from " . TABLE_REGISTRY . " where customers_id = '" . $customer_id . "' and registry_id = '" . $HTTP_GET_VARS['registry_id'] . "'"; $registry_query = tep_db_query($registry_query_string); $registry_result = tep_db_fetch_array($registry_query); } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADD_REGISTRY_PROCESS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ADD_REGISTRY, '', 'SSL')); if ( (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'modify')) || (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'update') && tep_not_null($HTTP_POST_VARS['registry_id'])) ) { $breadcrumb->add(NAVBAR_TITLE_MODIFY_REGISTRY, tep_href_link(FILENAME_ADD_REGISTRY_PROCESS, 'action=modify&registry_id=' . ((isset($HTTP_GET_VARS['registry_id'])) ? $HTTP_GET_VARS['registry_id'] : $HTTP_POST_VARS['registry_id']), 'SSL')); } else { $breadcrumb->add(NAVBAR_TITLE_ADD_REGISTRY, tep_href_link(FILENAME_ADD_REGISTRY_PROCESS, '', 'SSL')); } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function check_form() { var error = 0; var error_message = "<?php echo JS_ERROR; ?>"; var registry_occasion_id = document.add_registry.registry_occasion_id.value; var registry_occasion_date = document.add_registry.registry_occasion_date.value; if (registry_occasion_id == "") { error_message = error_message + "<?php echo JS_REGISTRY_OCCASION_ID; ?>"; error = 1; } if (registry_occasion_date == "" || registry_occasion_date.length < 10) { error_message = error_message + "<?php echo JS_REGISTRY_OCCASION_DATE; ?>"; error = 1; } if (error == 1) { alert(error_message); return false; } else { return true; } } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('add_registry', tep_href_link(FILENAME_ADD_REGISTRY_PROCESS, '', 'SSL'), 'post', 'onSubmit="return check_form();"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo (isset($HTTP_GET_VARS['action']) && $HTTP_GET_VARS['action'] == 'modify') ? HEADING_TITLE_MODIFY_REGISTRY : HEADING_TITLE_ADD_REGISTRY; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_add_registry.gif', (isset($HTTP_GET_VARS['action']) && $HTTP_GET_VARS['action'] == 'modify') ? HEADING_TITLE_MODIFY_REGISTRY : HEADING_TITLE_ADD_REGISTRY, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . 'add_registry_details.php'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'modify') && tep_not_null($HTTP_GET_VARS['registry_id'])) { ?> <tr> <td><table border="0" width="100%" cellspacing="2" cellpadding="0"> <tr> <td class="main"><?php echo tep_draw_hidden_field('action', 'update') . tep_draw_hidden_field('registry_id', $HTTP_GET_VARS['registry_id']) . '<a href="' . tep_href_link(FILENAME_ADD_REGISTRY, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> <td class="main" align="center"><?php echo '<a href="' . tep_href_link(FILENAME_ADD_REGISTRY_PROCESS, 'action=remove&registry_id=' . $HTTP_GET_VARS['registry_id'], 'SSL') . '">' . tep_image_button('button_delete.gif', IMAGE_BUTTON_DELETE) . '</a>'; ?></td> <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> </tr> </table></td> </tr> <?php } elseif (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'update') && tep_not_null($HTTP_POST_VARS['registry_id'])) { ?> <tr> <td><table border="0" width="100%" cellspacing="2" cellpadding="0"> <tr> <td class="main"><?php echo tep_draw_hidden_field('action', 'update') . tep_draw_hidden_field('registry_id', $registry_id) . '<a href="' . tep_href_link(FILENAME_ADD_REGISTRY, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> </tr> </table></td> </tr> <?php } else { if (sizeof($navigation->snapshot) > 0) { $back_link = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); } else { $back_link = tep_href_link(FILENAME_ADD_REGISTRY, '', 'SSL'); } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo '<a href="' . $back_link . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> <td align="right" class="main"><?php echo tep_draw_hidden_field('registry_id', (isset($HTTP_GET_VARS['registry_id']) ? $HTTP_GET_VARS['registry_id'] : $registry_id)) . tep_draw_hidden_field('action', 'process') . tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> </tr> </table></td> </tr> <?php } ?> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> pergolina.com/catalog/add_registry_process.php Thank you! Allison
  11. Hi, I have several items that are monogramable - is there a way to have an empty attributes field in the product listing? Thanks! a
  12. Hi, I am having a problem with my UPS shipping module - when I click edit, it just returns the list of modules - the editing options disappear. Does anyone have an idea of what might be going on? Thank you, Allison
  13. accarter

    right hand column shopping cart display

    gorgeous - thank you! best, a
×