Jump to content

aodfan

Members
  • Content count

    200
  • Joined

  • Last visited

Profile Information

  1. aodfan

    Payment method stored?

    umm...I think you are thinking of something different or I didnt write it out correctly......there are many retailers that do this to name a few, newegg.com, at&t, amazon.com, ebay, paypal. They just store your information to make the checkout process faster.
  2. Just wondering if there was a contribution where it saves the payment info in the database and allows a returning customer to order faster so that they dont have to re-enter cc info all the time. they can delete it at anytime and at order process it asks with a tick box if they want their cc data to be saved for faster transactions later. they can update it within their account info.
  3. aodfan

    Mass-Price Editor Contribution

    price_process.php <?php /* $Id: price_process.php,v 1.0 2005/05/25 01:51 Arctic 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'); if(isset($_POST['submit'])) { array_pop($_POST); $input['catID'] = array_pop($_POST); $input['page'] = array_pop($_POST); array_pop($_POST); array_pop($_POST); array_pop($_POST); $x = 0; for($i = 0; $i < count($_POST); $i = $i + 3) { $tax_classes[$x] = current($_POST); $prices[$x] = next($_POST); $products[$x] = next($_POST); next($_POST); $x++; } /* print_r($_POST); echo '<br><br>'; print_r($tax_classes); echo '<br><br>'; print_r($prices); echo '<br><br>'; print_r($products); echo '<br><br>'; echo $input['catID']; echo '<br><br>'; echo $input['page']; */ for($y = 0; $y < count($products); $y++) { if($prices[$y] && is_numeric($prices[$y])) { $price_query_raw = "update " . TABLE_PRODUCTS . " set products_price = '" . $prices[$y] . "', products_tax_class_id = '" . $tax_classes[$y] . "' where products_id = '" . $products[$y] . "'"; $price_query = tep_db_query($price_query_raw); } } header("Location: price_editor.php?catID=" . $input['catID'] . "&page=" . $input['page']); } else { header("Location: price_editor.php"); } ?>
  4. Ok, I have had this contribution, Mass Price Editor, installed for quite awhile now, the only thing that I wish it had is a spot where I can update my product cost as well. I tried to code the best I could. I believe I have coded price_editor.php correctly, but I am needing help coding price_process.php to reflect the updated cost price as well. Below are the two files. price_editor.php <?php /* $Id: price_editor.php,v 1.0 2005/05/24 01:05 Arctic 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'); ?> <!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> <script language="JavaScript"> function doCurrency(amount) { var i = parseFloat(amount); if(isNaN(i)) { i = 0.00; } var minus = ''; if(i < 0) { minus = '-'; } i = Math.abs(i); i = parseInt((i + .005) * 100); i = i / 100; s = new String(i); if(s.indexOf('.') < 0) { s += '.00'; } if(s.indexOf('.') == (s.length - 2)) { s += '0'; } s = minus + s; return s; } function fixPrices() { var priceValue = document.forms['priceEditor'].elements['priceVal']; var valueMode = document.forms['priceEditor'].elements['valueMode'].value; var priceMode = document.forms['priceEditor'].elements['priceMode'].value; var error = false; var factor; var i; if(isNaN(priceValue.value)) { alert('Enter a valid numerical value'); error = true; } else if(valueMode == 'percent') { if(priceValue.value > 300 || priceValue.value < 0) { alert('Enter a percentage value from 0% to 300%'); error = true; } if(!error) { var result = Math.round(priceValue.value * 100) / 100; for(i = 0; i < document.forms['priceEditor'].elements.length; i = i + 3) { if((document.forms['priceEditor'].elements.length - i) >= 8) { // alert(document.forms['priceEditor'].elements[i + 1].value); if(!isNaN(document.forms['priceEditor'].elements[i + 1].value)) { factor = Math.round((parseFloat(document.forms['priceEditor'].elements[i + 1].value) * (parseFloat(result) / 100)) * 100) / 100; if(priceMode == 'raise') { document.forms['priceEditor'].elements[i + 1].value = parseFloat(document.forms['priceEditor'].elements[i + 1].value) + factor; } else { document.forms['priceEditor'].elements[i + 1].value = parseFloat(document.forms['priceEditor'].elements[i + 1].value) - factor; } document.forms['priceEditor'].elements[i + 1].value = doCurrency(document.forms['priceEditor'].elements[i + 1].value); if(document.forms['priceEditor'].elements[i + 1].value < 0) { document.forms['priceEditor'].elements[i + 1].value = doCurrency(parseFloat('0')); } } } } } } else if(valueMode == 'fixed') { if(!error) { var result = Math.round(priceValue.value * 100) / 100; for(i = 0; i < document.forms['priceEditor'].elements.length; i = i + 3) { if((document.forms['priceEditor'].elements.length - i) >= 8) { // alert(document.forms['priceEditor'].elements[i + 1].value); if(!isNaN(document.forms['priceEditor'].elements[i + 1].value)) { if(priceMode == 'raise') { document.forms['priceEditor'].elements[i + 1].value = parseFloat(document.forms['priceEditor'].elements[i + 1].value) + parseFloat(result); } else { document.forms['priceEditor'].elements[i + 1].value = parseFloat(document.forms['priceEditor'].elements[i + 1].value) - parseFloat(result); } document.forms['priceEditor'].elements[i + 1].value = doCurrency(document.forms['priceEditor'].elements[i + 1].value); if(document.forms['priceEditor'].elements[i + 1].value < 0) { document.forms['priceEditor'].elements[i + 1].value = doCurrency(parseFloat('0')); } } } } } } } </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><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo "Price Management"; ?></td> <td class="smallText" align="right"> <?php echo tep_draw_form('goto', 'price_editor.php', '', 'get'); echo 'Go To: ' . tep_draw_pull_down_menu('catID', tep_get_category_tree(), $_GET['catID'], 'onChange="this.form.submit();"'); echo '</form>'; ?> </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 echo tep_draw_form('priceEditor', 'price_process.php', '', 'post'); ?> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo "Product"; ?></td> <td class="dataTableHeadingContent"><?php echo "Category"; ?></td> <td class="dataTableHeadingContent"><?php echo "Tax Category"; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo "Cost"; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo "Price (Net)"; ?> </td> </tr> <?php $i = 1; $tax_class_array[0]['text'] = '-- none --'; $tax_class_array[0]['id'] = '0'; $tax_class_query_raw = "select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_id"; $tax_class_query = tep_db_query($tax_class_query_raw); while ($tax_class = tep_db_fetch_array($tax_class_query)) { $tax_class_array[$i]['text'] = $tax_class['tax_class_title']; $tax_class_array[$i]['id'] = $tax_class['tax_class_id']; $i++; } if(isset($_GET['catID'])) { if(is_numeric($_GET['catID']) && $_GET['catID'] != 0) { $input['category'] = addslashes($_GET['catID']); } } if(isset($_GET['page'])) { if(is_numeric($_GET['page']) && $_GET['page'] != 0) { $input['page'] = addslashes($_GET['page']); } } if(isset($input['category'])) { $category_query_where = " and categories_id = '" . $input['category'] . "'"; $category_desc_query_raw = "select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $input['category'] . "' and language_id = '" . $languages_id . "'"; $category_desc_query = tep_db_query($category_desc_query_raw); $category_desc = tep_db_fetch_array($category_desc_query); } else { $category_query_where = ""; } $category_query_raw = "select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id != 0" . $category_query_where . " order by products_id"; $category_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $category_query_raw, $category_query_numrows); $category_query = tep_db_query($category_query_raw); while ($category = tep_db_fetch_array($category_query)) { $product_query_raw = "select p.products_id, pd.products_name, p.products_cost, p.products_price, p.products_tax_class_id, c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " c, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $category['products_id'] . "' and p.products_id = c.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'"; $product_query = tep_db_query($product_query_raw); $product = tep_db_fetch_array($product_query); $product_cost = substr($product['products_cost'], 0, strpos($product['products_cost'], '.') + 3); $product_price = substr($product['products_price'], 0, strpos($product['products_price'], '.') + 3); if(!isset($input['category'])) { $category_desc_query_raw = "select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $product['categories_id'] . "' and language_id = '" . $languages_id . "'"; $category_desc_query = tep_db_query($category_desc_query_raw); $category_desc = tep_db_fetch_array($category_desc_query); } echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n"; echo ' <td class="dataTableContent">' . $product['products_name'] . '</td>' . "\n"; ?> <td class="dataTableContent"><?php echo $category_desc['categories_name']; ?></td> <td class="dataTableContent"> <?php echo tep_draw_pull_down_menu('tax_class_' . $category['products_id'], $tax_class_array, $product['products_tax_class_id']); ?> </td> <td class="dataTableContent" align="right"> <?php echo '<b>' . DEFAULT_CURRENCY . '</b> ' . tep_draw_input_field('price_' . $category['products_id'], $product_cost, 'style="text-align: right;"'); ?> <?php echo tep_draw_hidden_field('pid_' . $category['products_id'], $category['products_id']); ?> </td> <td class="dataTableContent" align="right"> <?php echo '<b>' . DEFAULT_CURRENCY . '</b> ' . tep_draw_input_field('price_' . $category['products_id'], $product_price, 'style="text-align: right;"'); ?> <?php echo tep_draw_hidden_field('pid_' . $category['products_id'], $category['products_id']); ?> </td> </tr> <?php } if(tep_db_num_rows($category_query) <= 0) { ?> <tr> <td class="dataTableContent" colspan="4" align="center"> <i>- No rows to display -</i> </td> </tr> <?php } else { ?> <tr> <td class="dataTableContent" colspan="2"> <select name="priceMode"> <option value="raise">Raise</option> <option value="lower">Lower</option> </select> all prices by <?php echo tep_draw_input_field('priceVal', '0', 'style="text-align: right;" size="5" maxlength="10"'); ?> <select name="valueMode"> <option value="percent">percent</option> <option value="fixed">fixed amount</option> </select> <input type="button" value="Go" onClick="fixPrices()"> </td> <td class="dataTableContent" colspan="2" align="right"> <?php echo tep_draw_hidden_field('page', addslashes($input['page'])); ?> <?php echo tep_draw_hidden_field('catID', addslashes($input['category'])); ?> <input type="submit" value="Make Changes" name="submit"> </form> </td> </tr> <tr> <td colspan="4"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $category_split->display_count($category_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> products)'); ?></td> <td class="smallText" align="right"><?php echo $category_split->display_links($category_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page'))); ?></td> </tr> </table></td> </tr> <?php } ?> </table></td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  5. Just wondering since there is a contributions that involve AJAX already including order editor and attribute manager, if anyone has considered creating a ajax module that when you click on "edit" to edit a product that an ajax window would pop up so that editing products are much faster.
  6. aodfan

    fast easy checkout

    I noticed that there are no screenshots provided in the downloads of the contribution, could anyone post some screenshots please.
  7. Hello, I am having some trouble with this contribution. I have installed it twice and looked over to see if there was anything that I was missing. But it seems that it may be the AJAX that is not working on my side. When I go to : http://www.mysite.com/admin/product_sets.php, it shows the page, but the '+' or '-' signs do not work, neither do they in admin/categories.php. I searched the OSC forums, but didnt find anything. I was hoping if you guys could help me figure out what is wrong. I also have other AJAX contributions installed and working on my site as of now. Thanks
  8. aodfan

    AJAX Attribute Manager support

    Hello, I installed this, followed the instructions, but nothing is showing up as if I changed nothing.
  9. aodfan

    Cancelled Orders Contribution Support

    Well, I have talked to KBonline, I tried what he said, which was basically clone the orders table for the canceled orders, but I am still getting this error: 1136 - Column count doesn't match value count at row 1 insert into cancelled_orders_products select * from orders_products where orders_id = '100' [TEP STOP] anyone know what could be the issue here?
  10. Hello, I have installed this contribution, it was working for some time, now there are vertical lines messing up my product_info.php page as shown below: I have found the code that is giving the issue and it is part of this contribution: <?php // BOF MaxiDVD: Modified For Ultimate Images Pack! if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); } // BOF MaxiDVD: Modified For Ultimate Images Pack! ; ?> Hoping someone can help me with this.
  11. aodfan

    Product Tabs

    Hey Mike, I deleted the code you were talking about, it removed the double description, but the other part still does not show tabs and shows the new descriptions on the same page, just links as in the photo below, also now in the admin when categores.php is clicked it pops up as if a download and does not directly go to the link in the browser, as in the second photo below?? Does anyone have a clue? Thanks
  12. aodfan

    Product Tabs

    Has no one had this issue with this contribution??
  13. aodfan

    Product Tabs

    Hello, I recently installed Product Tabs v.1.7.3, everything seemed to be going fine, but after I was done installing Product Tabs, I went ahead and started aligning things in categories.php correctly. Well soon after that I generated a problem, now everytime I try to go to admin/categories.php the page shows up blank. Now, I have even tried using back ups and even stock OSC categories.php files, but I receive the same blank page. Now the weird thing is if I rename the file to say categories123.php and go to it shows up, but of course doesnt have a language file, and if I created a language file the same name(categories123.php) to get the correct headings and such, the page goes back to being blank? The other issue I am having with Product Tabs is that on the catalog side, the tabs are not showing up,and showing the description twice, as in the photo below: If you could help me with these problems I would be greatly appreciative! -- Thanks, Aodfan (James)
  14. aodfan

    Multi_Vendor_Shipping new thread

    Would anyone know what is happening here?
  15. aodfan

    Multi_Vendor_Shipping new thread

    Parse error: parse error, unexpected '<' in /hsphere/local/home2/aodfan/alteredmotorsports.com/catalog/checkout_shipping.php on line 59 I just installed the catalog side and get this when I go to checkout. This is what is on that line: <?php------line 59 //MVS start if (tep_count_shipping_modules() > 0 || SELECT_VENDOR_SHIPPING == 'true') { ?> Any help would be appreciated :) Thanks
×