Jump to content

dalai

Members
  • Content count

    65
  • Joined

  • Last visited

  1. Could realy do with some help with this cont. Craig
  2. im trying to get this cont to work, it throws no errors, but it dont work. in the admin section after you click Additional Info when you select manufacurers or categories you do get the list of either, but the code is wrong the link it generates to edit a cat or manufacturers additional info is missing somthing: admin/additional_description.php?task=prep_edit_form&what_info=&what_info_id=36 the what_info is missing heres the code, ive looked but cannot see the problem. any help would be great Craig <?php /* $Id: additional_description.php,v 1.2 2003/05/14 08:21:48 erisen Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); //1 - We allow category and manufacturer information only $additional_info_array = array ("CATEGORY","CATLEVEL","MANUFACTURER"); // so the shop owner will chose which one the additional info is for. $languages = tep_get_languages(); ?> <!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> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if (($HTTP_POST_VARS['task'] == '')&&($task=='')) { echo "<FORM name='add' action='$PHP_SELF' method='post'>"; echo "<select name = 'what_info'>"; while (list($key,$value)=each($additional_info_array)) { echo "<option value='$value'>$value</option>"; } echo "</select>"; echo "<input type='hidden' name='task' value='gen_entry_form'>"; echo "<input type='submit' name='submit' value='submit'>"; echo "</FORM>"; } if ($HTTP_POST_VARS['task']=='gen_entry_form') { echo "<form name='add2' action='$PHP_SELF' method='post'>"; echo "<input type='hidden' name='task' value='enter_data'>"; if ($HTTP_POST_VARS['what_info']== 'CATEGORY' || $HTTP_POST_VARS['what_info']== 'CATLEVEL') { $cat_query = "select cd.categories_name object_name,cd.categories_id object_id from ".TABLE_CATEGORIES_DESCRIPTION." cd, ".TABLE_LANGUAGES." l where 1=1 and cd.language_id = l.languages_id and l.directory = '$language' "; } elseif ($HTTP_POST_VARS['what_info']== 'MANUFACTURER') { $cat_query = "select cd.manufacturers_name object_name, cd.manufacturers_id object_id from ".TABLE_MANUFACTURERS." cd where 1=1 "; } $cat_result = tep_db_query($cat_query); echo "<TABLE>"; echo "<tr><th colspan='2'></th>"; while ( $cat_array_first=tep_db_fetch_array($cat_result)) { echo "<tr><td>".$cat_array_first['object_name']."</td>\n <td valign='top'><a href='".$PHP_SELF."?task=prep_edit_form&what_info=$what_info&what_info_id=".$cat_array_first['object_id']."'> <img src='includes/languages/".$language."/images/buttons/button_edit.gif' border='0'></a></td></tr>"; } echo "</table>"; } if ($task == 'prep_edit_form') { echo "<form name='edit_form' action='$PHP_SELF' method='post'>\n"; $n = count($languages); reset($languages); for ($i=0;$i<$n;$i++) { $additional_info_query_raw = "SELECT add_desc_id, context, context_value, additional_description, language, sort_order FROM ".TABLE_ADD_INFO." where context='$what_info' and context_value='$what_info_id' and language = '".$languages[$i]['directory']."' order by sort_order,language "; $additional_info_query = tep_db_query($additional_info_query_raw); if (mysql_num_rows($additional_info_query) =='1') { $action = 'update'; } else { $action ='insert'; } $additional_info = tep_db_fetch_array($additional_info_query); echo "<input type='hidden' name='action[]' value='$action'>\n"; echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); echo "<br>\n"; echo tep_draw_textarea_field('description[]', 'soft', '70', '10',$additional_info['additional_description'] ); echo "<input type='hidden' name='lang[]' value='".$languages[$i]['directory']."'><br>\n"; } echo "<input type='hidden' name='context' value='$what_info'>\n"; echo "<input type='hidden' name='context_value' value='$what_info_id'>\n"; echo "<input type='submit' name='submit' value='submit'>\n"; echo "<input type='hidden' name='task' value='process_edit'>\n"; echo "</form>\n"; } if ($HTTP_POST_VARS['task']=='process_edit') { $n_action = count($HTTP_POST_VARS['action']); reset ( $HTTP_POST_VARS['action']); for ($ia=0;$ia<$n_action;$ia++) { $add_text = $HTTP_POST_VARS['description'][$ia]; // $add_text = nl2br($add_text); $add_language = $HTTP_POST_VARS['lang'][$ia]; if ($HTTP_POST_VARS['action'][$ia] == 'insert') { $sql = "insert into ".TABLE_ADD_INFO." (add_desc_id ,context,context_value,additional_description,language,sort_order) values ('','".$HTTP_POST_VARS['context']."','".$HTTP_POST_VARS['context_value']."','".$add_text."','$add_language','0') "; } elseif ($HTTP_POST_VARS['action'][$ia] == 'update') { $sql = "update ".TABLE_ADD_INFO." set additional_description = '$add_text' where context = '".$HTTP_POST_VARS['context']."' and context_value = '".$HTTP_POST_VARS['context_value']."' and language = '$add_language' "; } //echo $sql; $ress = tep_db_query($sql); } if (!mysql_error()) { echo ICON_SUCCESS; } else { echo ICON_ERROR; } } echo ' </td>' . "\n"; ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </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'); ?>
  3. dalai

    [Contrib] Manufacturers Multilanguage

    hi all this is just what i need, i have a couple of issues, but ill start with the main prob, ive followed the instructions properly, i believe. im getting the error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where manufacturers_id = '36'' at line 1 update manufacturers se where manufacturers_id = '36' [TEP STOP] now i see others have had this issue, but i cant see that anyone has solved it, i noticed the "se" in "update manufacturers se where manufacturers_id = '36'" looked at the code but i cant see where the se is coming from. I have the manufacturers.php from the 1.2 version Any help would be great Craig
  4. hi, after installing the contib, im getting this error in orders.php: Any thoughts would help
  5. hi, when a discount coupon is used in our shop, it adds the value to the total, not deduct it. also an order came through: Sub-Total: ?43.99 bestway ?3.95 Discount Coupons:e0a269: ?9.59 Total: ?57.53 but when it got through to paypal they actually took: Total Amount: ?47.94 Fee Amount: ?1.83 Net Amount: ?46.11 i dont see why, firstly its adding the discount not deducting it and secondly, when it passes it through to paypal its ignoring it totally. im using creloaded so it already comes with Credit Class/Gift Voucher/Discount Coupons 5.10b pre installed. Please help Craig
  6. im also getting an error when i purchase a gift voucher via the site when i try to purchase it with my gift voucher balance: Fatal error: Call to undefined function: grosspaymentamount() in d:\home\phpserv\mysite.com\htdocs\includes\modules\payment\paypal\catalog\checkout_process.inc.php on line 173 and when i check the gift voucher account ballance box, it ignors it and proceeds to paypal for payment thats on any item i buy using my credit balance. Any thoughts. Craig
  7. Hi all, im having a little trouble with the voucher system. i can send vouchers from the admin panel, via coupon admin and it comes through with a link to redeem. if i try to use Mail Gift Voucher, from the admin panel, i get the mail with no link. if i redeem it as a customer it gos into my account, but then if i use send voucher i get the mail come through but no link, and if i then try to redeem it at checkout with the code checkout just ignors it and passes it through to paypal. also i have voucher queue set to true, and i check the queue but none of the vouchers are listed. they are listed in vouchers sent, and those that i have redeemed are showing as redeemed. ok i get that coupons and vouchers are different items, but i dont get why the coupons are mailed with a link to redeem but the vouchers are not. any help would be appriciated. Craig
  8. Hi Leigh, Well we have 1 oscomm shop, and a ameber membership system, problem is that the shop is behild the membership wall, which means that clients join via the amember system pay through nochex and the apc fires the amember system to activate their account, so then they enter the members area and get access to the shop....... hold on am i getting confused, does the shop actually need the apc....? i suppose it does for the db update for payment... doh, now i am confused. if a transaction comes in from the shop, the apc will send the authorised to the amember nochex_ipn.php file because thats the url thats been set in nochex... What do you think Craig :'(
  9. Hi im hoping this is the place to ask my Question, we have 2 payment systems on the same server, one for membership and one for our shop,when we set up the APC im assuming we can only give it on url, so can we set it up in the php code so that oscomm send the responderurl in the form. Any help would be great. Craig :thumbsup:
×