Latest News: (loading..)

IWAS

Members
  • Content count

    100
  • Joined

  • Last visited

2 Followers

About IWAS

Profile Information

  1. I rewrote it to update on the client side with js/jquery when they select a customer and it works. But now if you do it as creating a new customer account, it doesn't enable the password fields??? <?php /* $Id: create_order.php,v 1 2003/08/17 23:21:34 frankl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_INCLUDES . 'template_top.php'); require('includes/form_check.js.php'); // #### Get Available Customers $query = tep_db_query("select a.customers_id, a.customers_firstname, a.customers_lastname, a.customers_email_address, a.customers_telephone, a.customers_fax, b.entry_company, b.entry_city, b.entry_street_address, b.entry_postcode, c.zone_name, c.zone_code, c.zone_country_id from " . TABLE_CUSTOMERS . " AS a, " . TABLE_ADDRESS_BOOK . " AS b LEFT JOIN " . TABLE_ZONES . " as c ON (b.entry_zone_id = c.zone_id) WHERE a.customers_default_address_id = b.address_book_id ORDER BY entry_company,customers_lastname"); $result = $query; $customer_count = tep_db_num_rows($result); if ($customer_count > 0){ // Query Successful $SelectCustomerBox = "<select name=\"Customer\" id=\"Customer\" onchange=\"fillCust()\"><option value=\"\">" . TEXT_SELECT_CUST . "</option>\n"; while($db_Row = tep_db_fetch_array($result)){ $SelectCustomerBox .= "<option value=\"" . $db_Row['customers_id'] . "\" data-fname=\"".$db_Row['customers_firstname']."\" data-lname=\"".$db_Row['customers_lastname']."\" data-email=\"".$db_Row['customers_email_address']."\" data-company=\"".$db_Row['entry_company']."\" data-city=\"".$db_Row['entry_city']."\" data-state=\"".$db_Row['zone_name']."\" data-postcode=\"".$db_Row['entry_postcode']."\" data-street=\"".$db_Row['entry_street_address']."\" data-country=\"".$db_Row['zone_country_id']."\" data-phone=\"".$db_Row['customers_telephone']."\" data-fax=\"".$db_Row['customers_fax']."\""; if(isSet($HTTP_GET_VARS['Customer']) and $db_Row['customers_id']==$HTTP_GET_VARS['Customer']){ $SelectCustomerBox .= " SELECTED "; $SelectCustomerBox .= ">" . (empty($db_Row['entry_company']) ? "": strtoupper($db_Row['entry_company']) . " - " ) . $db_Row['customers_lastname'] . " , " . $db_Row['customers_firstname'] . " - " . $db_Row['entry_city'] . ", " . $db_Row['zone_code'] . "</option>\n"; }else{ $SelectCustomerBox .= ">" . (empty($db_Row['entry_company']) ? "": strtoupper($db_Row['entry_company']) . " - " ) . $db_Row['customers_lastname'] . " , " . $db_Row['customers_firstname'] . " - " . $db_Row['entry_city'] . ", " . $db_Row['zone_code'] . "</option>\n"; } } $SelectCustomerBox .= "</select>\n"; } $query = tep_db_query("select code, value from " . TABLE_CURRENCIES . " ORDER BY code"); $result = $query; if (tep_db_num_rows($result) > 0){ // Query Successful $SelectCurrencyBox = "<select name=\"Currency\"><option value=\"\">" . TEXT_SELECT_CURRENCY . "</option>\n"; while($db_Row = tep_db_fetch_array($result)){ $SelectCurrencyBox .= "<option value='" . $db_Row["code"] . " , " . $db_Row["value"] . "'"; if ($db_Row["code"] == DEFAULT_CURRENCY){ $SelectCurrencyBox .= " SELECTED "; } $SelectCurrencyBox .= ">" . $db_Row["code"] . "</option>\n"; } $SelectCurrencyBox .= "</select>\n"; } if(isset($HTTP_GET_VARS['Customer'])){ $account_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $HTTP_GET_VARS['Customer'] . "'"); $account = tep_db_fetch_array($account_query); $customer = $account['customers_id']; $address_query = tep_db_query("select * from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $HTTP_GET_VARS['Customer'] . "'"); $address = tep_db_fetch_array($address_query); }elseif (isset($HTTP_GET_VARS['Customer_nr'])){ $account_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $HTTP_GET_VARS['Customer_nr'] . "'"); $account = tep_db_fetch_array($account_query); $customer = $account['customers_id']; $address_query = tep_db_query("select * from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $HTTP_GET_VARS['Customer_nr'] . "'"); $address = tep_db_fetch_array($address_query); } // #### Generate Page cust_select_id_field ?> <script language="javascript" type="text/javascript"> function fillCust() { document.getElementById("cust_select_id_field").value = document.getElementById("Customer").value; document.getElementsByName("customers_id")[0].value = document.getElementById("Customer").value; document.getElementsByName("customers_firstname")[0].value = $('#Customer option:selected').data('fname'); document.getElementsByName("customers_lastname")[0].value = $('#Customer option:selected').data('lname'); document.getElementsByName("customers_email_address")[0].value = $('#Customer option:selected').data('email'); document.getElementsByName("entry_company")[0].value = $('#Customer option:selected').data('company'); document.getElementsByName("entry_street_address")[0].value = $('#Customer option:selected').data('street'); document.getElementsByName("entry_postcode")[0].value = $('#Customer option:selected').data('postcode'); document.getElementsByName("entry_city")[0].value = $('#Customer option:selected').data('city'); document.getElementsByName("entry_state")[0].value = $('#Customer option:selected').data('state'); document.getElementsByName("entry_country")[0].value = $('#Customer option:selected').data('country'); document.getElementsByName("customers_telephone")[0].value = $('#Customer option:selected').data('phone'); document.getElementsByName("customers_fax")[0].value = $('#Customer option:selected').data('fax'); } </script> <!--<script> $('#Customer').change(function () { document.getElementsByName("customers_firstname")[0].value = $(this).find('option:selected').attr('data-fname'); } </script>--> <script language="javascript" type="text/javascript"><!-- function selectExisting() { document.create_order.customers_create_type.value = 'existing'; selectorsStatus(false); selectorsExtras(true); } function selectNew() { document.create_order.customers_create_type.value = 'new'; selectorsStatus(true); selectorsExtras(false); } function selectNone() { document.create_order.customers_create_type.value = 'none'; selectorsStatus(true); selectorsExtras(true); } function selectorsStatus(status) { document.cust_select.Customer.disabled = status; document.cust_select.cust_select_button.disabled = status; document.cust_select_id.cust_select_id_field.disabled = status; document.cust_select_id.cust_select_id_button.disabled = status; } function selectorsExtras(status) { document.create_order.customers_password.disabled = status; document.create_order.customers_newsletter.disabled = status; <?php if (ACCOUNT_DOB == 'true') { ?> document.create_order.customers_dob.disabled = status; <?php } ?> <?php if (ACCOUNT_GENDER == 'true') { ?> document.create_order.customers_gender[0].disabled = status; document.create_order.customers_gender[1].disabled = status; <?php } ?> } //--></script> <?php ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table> <br /> <table border="0" width="100%" class="dataTableHeadingRow"> <tr> <td class="dataTableHeadingContent">&nbsp;&nbsp;<?php echo TEXT_STEP_1; ?></td> </tr> </table> <table border="0" cellpadding="3" cellspacing="0"> <tr> <td class="main" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="500" class="formArea"> <tr> <td class="main" valign="top"> <table border="0" cellpadding="3" cellspacing="0"> <tr> <td class="main" valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> <td class="main" valign="top"></td> </tr> <?php if ($customer_count > 0){ ?> <tr> <td class="main" valign="top"><input name="handle_customer" id="existing_customer" value="existing" type="radio" checked="checked" onClick="selectExisting();" /></td> <td class="main" valign="top"><label for="existing_customer" style="cursor:pointer;"><?php echo CREATE_ORDER_TEXT_EXISTING_CUST; ?></label></td> </tr> <tr> <td class="main" valign="top"></td> <td class="main" valign="top"> <?php echo "<form action=\"$PHP_SELF\" method=\"GET\" name=\"cust_select\" id=\"cust_select\">\n"; echo tep_hide_session_id(); echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; echo "<tr>\n"; echo "<td>$SelectCustomerBox</td>\n"; //echo "<td>&nbsp;<input type=\"submit\" value=\"" . BUTTON_SUBMIT . "\" name=\"cust_select_button\" id=\"cust_select_button\"></td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</form>\n"; ?> </td> </tr> <tr> <td class="main" valign="top"></td> <td class="main" valign="top"><?php echo TEXT_OR_BY; ?></td> </tr> <tr> <td class="main" valign="top"></td> <td class="main" valign="top"> <?php echo "<form action=\"$PHP_SELF\" method=\"GET\" name=\"cust_select_id\" id=\"cust_select_id\">\n"; echo tep_hide_session_id(); echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; echo "<tr>\n"; echo "<td><font class=main><input type=text name=\"Customer_nr\" name=\"cust_select_id_field\" id=\"cust_select_id_field\" readonly></td>\n"; //echo "<td>&nbsp;<input type=\"submit\" value=\"" . BUTTON_SUBMIT . "\" name=\"cust_select_id_button\" id=\"cust_select_id_button\"></td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</form>\n"; ?> </td> </tr> <tr> <td class="main" valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> <td class="main" valign="top"></td> </tr> <?php } ?> <tr> <td class="main" valign="top"><input name="handle_customer" id="new_customer" value="new" type="radio" onClick="selectNew();"></td> <td class="main" valign="top"><label for="new_customer" style="cursor:pointer;"><?php echo CREATE_ORDER_TEXT_NEW_CUST; ?></label></td> </tr> <tr> <td class="main" valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> <td class="main" valign="top"></td> </tr> <tr> <td class="main" valign="top"><input name="handle_customer" id="no_customer" value="none" type="radio" onClick="selectNone();"></td> <td class="main" valign="top"><label for="no_customer" style="cursor:pointer;"><?php echo CREATE_ORDER_TEXT_NO_CUST; ?></label></td> </tr> <tr> <td class="main" valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> <td class="main" valign="top"></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <?php if (!empty($_GET['message'])) { ?> <br /> <table border="0" width="100%" style=" background-color:#FF0000; height:40px;"> <tr> <td class="dataTableHeadingContent">&nbsp;&nbsp;<?php echo $_GET['message']; ?></td> </tr> </table> <?php } ?> <br> <table border="0" width="100%" class="dataTableHeadingRow"> <tr> <td class="dataTableHeadingContent">&nbsp;&nbsp;<?php echo TEXT_STEP_2; ?></td> </tr> </table> <?php echo tep_draw_form('create_order', FILENAME_CREATE_ORDER_PROCESS, '', 'post', 'onsubmit="return check_form(this);" id="create_order"') . tep_draw_hidden_field('customers_create_type', 'existing', 'id="customers_create_type"') . tep_hide_session_id(); ?> <table border="0" cellpadding="3" cellspacing="0" width="500"> <tr> <td><?php require(DIR_WS_MODULES . 'create_order_details.php'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link(FILENAME_DEFAULT, '', 'SSL')); ?></td> <td class="main" align="right"><?php echo tep_draw_button(IMAGE_SAVE, 'disk'); ?></td> </tr> </table></td> </tr> </table></form></td> </tr> </table> <br /> <script language="javascript" type="text/javascript"><!-- selectorsExtras(true); //--></script> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); require(DIR_WS_INCLUDES . 'template_bottom.php'); ?>
  2. I am using OSC 2.3.4 (NOT bootstrap), I have installed this, and it works to create a customer but to create order for existing customer, I am getting a 404 error when you select the customer from the dropdown box and hit the select button. It is trying to refresh the page without the /admin directory. So it just goes to /catalog/create_orderblahblahblah instead of catalog/admin/ Where can this be found? On another note some of the directories in this contribution are renamed with capital letters (Admin instead of admin)
  3. In login.php it has the right value for customer group but when I register it to the session it is not passing it, am I missing something? login.php $customer_id = $login_customer_id; tep_session_register('customer_id'); $customer_default_address_id = $customer_info['customers_default_address_id']; tep_session_register('customer_default_address_id'); $customer_first_name = $customer_info['customers_firstname']; tep_session_register('customer_first_name'); $sppc_customer_group_id = $customer_info['customers_group_id']; //echo $sppc_customer_group_id;die; tep_session_register('sppc_customer_group_id'); tep_session_register('sppc_customer_group_show_tax'); tep_session_register('sppc_customer_group_tax_exempt'); if (tep_not_null($sppc_customer_specific_taxes_exempt)) { tep_session_register('sppc_customer_specific_taxes_exempt'); } $customer_country_id = $customer_info['entry_country_id']; tep_session_register('customer_country_id'); $customer_zone_id = $customer_info['entry_zone_id']; tep_session_register('customer_zone_id'); But when I echo it in index.php, it is null top of index.php // BOF Separate Pricing Per Customer echo $_SESSION['customer_group_id'].'<BR>'; if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { //echo $_SESSION['sppc_customer_group_id'].'<BR>'; $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } // EOF Separate Pricing Per Customer echo $customer_group_id; // the following cPath references come from application_top.php $category_depth = 'top';
  4. So I figured out it is not the login, it is logging in correctly. It is just not displaying prices correctly.
  5. I got most to work in 2.3.4 but my version is jcommerce so all files are modified slightly to work as a joomla component. My biggest problem is the login is not logging them in as their group and that file has the most conflicting code as it is a 2.3.3.4 addon, a 2.3.4 shop and there is login changes to pull from and update the joomla database too. the login.php file is from the sppc add-on login-jcommerce2.3.4.php login.php login-attempted-merge.php
  6. Thanks, I only have one other group, but I need it to work with the old sppc product format, specifically the database fields. I updated all the other standard database fields, but I doubt anything in the SPPC or customer groups fields were changed. I had SPPC on a 2.2rc2 site and I want to upload (hopefully with easypopulate) my products to the new 2.3.4 site.
  7. I am running OSCommerce 2.3.4 as a joomla Component (jcommerce), so It is NOT the Bootstrap edition. Is there a version of SPPC that will work for stock 2.3.4 not bootstrapped? I had this mod on my old 2.2rc2 shop and I really don't want to live without it
  8. Thanks Jim, I just had my first sale to UK in a long time and got this error. Googled it and found the same thread where you have helped me (and others) in the past. THANK YOU!!!!
  9. IS there a setting to get the image popups to work? They show on the main page but dissapear when you click on them. http://craftkits4kids.com/product_info.php?cPath=26_24&products_id=30 Running Bootstrap Edge
  10. I guess it pays to read your instructions, LOL. Didn't see that it was posted in front of my face :rolleyes:
  11. You're right it was in the osc-BS build. I was looking at the JS of that, was wondering if that is how it worked. Sweet. :) I attached the scaled images if you want to include it on the next release. I think Google has something to do with blogger and blog_spot.
  12. Thanks for the fix. You had the image for blogspot in the images file but not on the page where it can be checked and command entered. I'll take a closer look later.
  13. @@Jack_mcs Nice job on the Social Bookmarks. I was going to add a blogspot.com link to your social bookmarks, and noticed you already had the image for it in the images directory. Is this something you already had tried before or is it something intended for the future?
  14. Thanks Jack :) . I'm not using the included file. This is the instructions for template_top, I guess the css call is missing. I added it like it was in the included file and all is good. Little <div> runover, but I can live with this. =================================================================== In admin/includes/template_top.php, FIND (around line 39): </head> ADD ABOVE: <?php /*** Begin Header Tags SEO ***/ switch (HEADER_TAGS_ENABLE_HTML_EDITOR) { case 'CKEditor': echo '<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>'; break; case 'FCKEditor': break; case 'TinyMCE': if (HEADER_TAGS_ENABLE_EDITOR_CATEGORIES == 'true' || HEADER_TAGS_ENABLE_EDITOR_PRODUCTS == 'true' || HEADER_TAGS_ENABLE_EDITOR_LISTING_TEXT == 'true' || HEADER_TAGS_ENABLE_EDITOR_SUB_TEXT == 'true' ) { if ($action == 'new_product' || $action == 'new_category' || $action == 'edit_category') { // No need to put JS on all pages. $languages = tep_get_languages(); // Get all languages // Build list of textareas to convert $str = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { if (HEADER_TAGS_ENABLE_EDITOR_CATEGORIES == 'true') $str .= "categories_htc_description[".$languages[$i]['id']."],"; if (HEADER_TAGS_ENABLE_EDITOR_PRODUCTS == 'true') $str .= "products_description[".$languages[$i]['id']."],"; if (HEADER_TAGS_ENABLE_EDITOR_LISTING_TEXT == 'true') $str .= "products_head_listing_text[".$languages[$i]['id']."],"; if (HEADER_TAGS_ENABLE_EDITOR_SUB_TEXT == 'true') $str .= "products_head_sub_text[".$languages[$i]['id']."],"; } //end for each language $mce_str = rtrim ($str,","); // Removed the last comma from the string. // You can add more textareas to convert in the $str, be careful that they are all separated by a comma. echo '<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>'; include "includes/javascript/tiny_mce/general.php"; } } break; default: break; } /*** End Header Tags SEO ***/ ?> ===================================================================