Jump to content

whodah

Members
  • Content count

    47
  • Joined

  • Last visited

Profile Information

  • Real Name
    Who Dah?
  1. Hi all, I searched, but to no avail. When a customer makes a purchase using PayPal Express Checkout, I get the PayPal email notification all nifty like. The only monetary items I receive is the order total. (i.e. no breakdown of items vs. shipping vs. tax, just the order total.) And this is OK, no big deal. But is there a way to include the Order ID # in that email notification? As it stands now, the Description is null. An example of a PayPal confirmation email looks like: Description = (null) Unit price = $200.00 USD Qty = 1 Qty Amount = $200.00 USD Subtotal = $200.00 USD Total = $200.00 USD Payment = $200.00 USD Is there a way to make that (null) Description say like "Order ID ####"? Thanks!
  2. Interesting solutions, I shall toy with both. Thank you much!
  3. Hello, I've been searching, but can't find anything. Thought I'd ask before custom coding: I'd like to assign an attribute called WYSIWYG (What you see is what you get) and products that have that attribute set show up in their typical category, plus a second category 'WYSIWYG'. I.e. if selling a "Red Rose", it'd typically be under the category "Flowers", but if the attribute called WYSIWYG is assigned because one has a photo of an exact "Red Rose" for sale rather than just the generic product "Red Rose", then the product "Red Rose" shows up in both the category "Flowers" and the category "WYSIWYG". Does anything like that exist? Thanks!
  4. Hi all! I've been searching and searching but to no avail. Is there a 'consignment sales' solution to track who owns the product that the store is selling, reports on if it has sold or not by the product owner, and to keep track of whether or not the original owner has been paid their cut of the consignment sale? Everything I see with the terms 'consignment' in it seems to relate to shipping -- so maybe theres a synonym I should be searching on that I just can't put my finger on? Thanks for the help!
  5. Thanks to Nicholas Rivera to getting me going real quick here with your code on sorting by price! If you have installed "Product Attributes Sort Order": http://www.oscommerce.com/community/contri...uct+Attrib+Sort And would like to sort by your assigned sort order, a simple one line modification in pad_base.php will do the trick. What it does... First - sorts by attributes sort order Second - sorts by price Third - if price is same (or 0), it sorts based on the order that the option was entered. includes/classes/pad_base.php Line ~ 318 from: $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)$this->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 . "'"); to: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id, pa.attribute_sort from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->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, pa.options_values_price, pa.products_attributes_id");
  6. After creating a customer, I thought it would make more sense that the link that says 'Congratulations! The new account has been successfully created! You can now take a manual order' (just the "manual order" part is the link" would take you to the new customer you created. But on the "manual order" page, you then have to find your new customer in the drop down box. If you're lazy, like me, here's how to make your newly created customer show up in that "manual order" link... 2 EZ-PZ changes: 1: admin/includes/languages/english/create_account_success.php ~line 16 change from: define('TEXT_ACCOUNT_CREATED', 'Congratulations! The new account has been successfully created! You can now take a <a href="' . "create_order.php . '"> manual order</a>. <p><p> to: define('TEXT_ACCOUNT_CREATED', 'Congratulations! The new account has been successfully created! You can now take a <a href="' . "create_order.php?Customer=".intval($_GET["Customer"]) . '"> manual order</a>. <p><p> 2: admin/create_account_process.php ~line 429 change from: tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL')); to: tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS."?Customer=$address_id", '', 'SSL')); Now you can enjoy a Pepsi with me now that there's a couple less mouse clicks! :D :D
  7. whodah

    AJAX Attribute Manager support

    Heya! I see that the QT Pro is on the horizon. In the mean time, one can add a quick 'Stock' button by editing attributeManager/attributeManager.php around line 118. From: if(false !== AM_USE_TEMPLATES) { ?> <?php echo tep_draw_pull_down_menu('template_drop',$attributeManager->buildAllTemplatesDropDown(),(0 == $selectedTemplate) ? '0' : $selectedTemplate,'id="template_drop" style="margin-bottom:3px"'); ?> <input type="image" src="attributeManager/images/icon_load.png" onclick="return customTemplatePrompt('loadTemplate');" border="0" title="Loads the selected template" /> <input type="image" src="attributeManager/images/icon_save.png" onclick="return customPrompt('saveTemplate');" border="0" title="Saves the current attributes as a new template" /> <input type="image" src="attributeManager/images/icon_rename.png" onclick="return customTemplatePrompt('renameTemplate');" border="0" title="Renames the selected template" /> <input type="image" src="attributeManager/images/icon_delete.png" onclick="return customTemplatePrompt('deleteTemplate');" border="0" title="Deletes the selected template" /> <?php } ?> </div> </td> </tr> </table> to: (the only change is just past that php statement) if(false !== AM_USE_TEMPLATES) { ?> <?php echo tep_draw_pull_down_menu('template_drop',$attributeManager->buildAllTemplatesDropDown(),(0 == $selectedTemplate) ? '0' : $selectedTemplate,'id="template_drop" style="margin-bottom:3px"'); ?> <input type="image" src="attributeManager/images/icon_load.png" onclick="return customTemplatePrompt('loadTemplate');" border="0" title="Loads the selected template" /> <input type="image" src="attributeManager/images/icon_save.png" onclick="return customPrompt('saveTemplate');" border="0" title="Saves the current attributes as a new template" /> <input type="image" src="attributeManager/images/icon_rename.png" onclick="return customTemplatePrompt('renameTemplate');" border="0" title="Renames the selected template" /> <input type="image" src="attributeManager/images/icon_delete.png" onclick="return customTemplatePrompt('deleteTemplate');" border="0" title="Deletes the selected template" /> <?php } ?> <!-- whodah mod -- include button to link to QT Pro stock.php --> <a href="stock.php?<?php echo "cPath=&product_id=$products_id"; ?>"><img border="0" src="includes/languages/english/images/buttons/button_stock.gif"></a> </div> </td> </tr> </table> Does anyone know how to access the cPath from within this file? These do not work: $cPath $_GET['cPath'] $VARS['cPath'] Thanks! -Who Dah?
  8. whodah

    AJAX Attribute Manager support

    Thx for the tip, Alex! Thought I'd add: United States english, this should work as your header type: header('Content-type: text/html; charset=utf-8');
  9. whodah

    AJAX Attribute Manager support

    I forget which table... But when I got this message, it told me which table it was barking at. I then added 'by hand' the column 'products_options_sort_order' as an INT of size 10. It kinda looks like it's looking for that table whether or not one has the sort option enabled or not...
  10. perhaps "072" is being submitted to authorize.net as "72". an integer or val type truncation?
  11. maybe a modification of: catalog/checkout_process.php in the $sql_data_array around line 60 or so, change: 'cc_number' => $order->info['cc_number'], to 'cc_number' => "XXXX-XXXX-XXXX-".substr($order->info['cc_number'],strlen($order->info['cc_number'])-4), or something? the cc_number field in the orders table is already set to varchar(32), so the X's shouldn't freak it out i wouldn't think. thoughts?
  12. whodah

    Price Updater

    heya! ty VERY much for the module! i've modified the price_updater.php file to update the price of the attributes as well (if you want to, i've added a checkbox option to the menu to optionally update attributes). if an attribute has a '-' price_prefix, then the OPPOSITE is done. i.e. if you add $1 to every product and include attributes and have an option of: - $6 then it will update that price to: - $5 not to - $7 i don't use '-' myself, but felt that this is how it should be treated? dunno, easy enough to change in the code if not. at any rate, i dind't make a contribution, if you'd like to kymation, by all means, go for it! :) typical warning: ** do at yer own risk, i take no responsibility, blah blah blah ** and here it is: price_updater.php w/ optional price attribute price updater <?php /* $Id: price_updater.php,v 1.1 2004/04/18 jck Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2004 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // Functions to fill the dropdown boxes function tep_get_manufacturers($manufacturers_array = '') { // Function borrowed from the Catalog side if (!is_array($manufacturers_array)) $manufacturers_array = array(); $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']); } return $manufacturers_array; } function tep_get_categories($categories_array = '') { // Function modified from tep_get_manufacturers() global $language; if (!is_array($categories_array)) $categories_array = array(); $categories_query = tep_db_query("SELECT categories_id, categories_name FROM " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_LANGUAGES . " l WHERE l.languages_id = cd.language_id AND l.name = '" . $language . "' ORDER BY categories_name" ); while ($categories = tep_db_fetch_array($categories_query)) { $categories_array[] = array('id' => $categories['categories_id'], 'text' => $categories['categories_name']); } return $categories_array; } function tep_get_models($models_array = '') { // Function modified from tep_get_manufacturers() global $language, $first, $last; if (!is_array($models_array)) $models_array = array(); $models_query = tep_db_query("SELECT products_id, products_model FROM " . TABLE_PRODUCTS . " ORDER BY products_model" ); $count = 0; while ($models = tep_db_fetch_array($models_query)) { if ($count == 0) { $first = $models['products_model']; } $models_array[] = array('id' => $models['products_model'], 'text' => $models['products_model']); $count++; $last = $models['products_model']; } return $models_array; } $models_array = tep_get_models(); $from = $first; $to = $last; // Process the request data if (isset($_GET['action']) && $_GET['action'] == 'update') { // Get the data from the form and sanitize it if (isset($_POST['manufacturers_id'])) { $mfr = (int)$_POST['manufacturers_id']; } else { $mfr = 0; } if (isset($_POST['categories_id'])) { $cat = (int)$_POST['categories_id']; } else { $cat = 0; } if (isset($_POST['from_id'])) { $from = $_POST['from_id']; } if (isset($_POST['to_id'])) { $to = $_POST['to_id']; } if (isset($_POST['like'])) { $like = $_POST['like']; } else { $like = ''; } if (isset($_POST['add'])) { $add = (int)$_POST['add']; } else { $add = 1; } if (isset($_POST['fixed'])) { $fixed = (int)$_POST['fixed']; } else { $fixed = 1; } if (isset($_POST['value'])) { $value = ereg_replace('[^0-9.]', '', $_POST['value']); } else { $value = 0; } // Set the SQL where function if ($mfr == 0) { if ($cat == 0) { $where_string = ''; } else { $where_string = ' AND pcat.categories_id = ' . $cat; } } else { $where_string = ' AND manufacturers_id=' . $mfr; if ($cat != 0) { $where_string .= ' AND pcat.categories_id = ' . $cat; } } if ($like == '') { if ($from != $first) { $where_string .= " AND p.products_model >= '" . $from . "'"; } if ($to != $last) { $where_string .= " AND p.products_model <= '" . $to . "'"; } } else { $where_string .= " AND p.products_model LIKE '" . $like . "'"; } // Query to get the selected products and make the changes $products_update_query = tep_db_query('SELECT p.products_id AS id, p.products_price AS price FROM ' . TABLE_PRODUCTS . ' p, ' . TABLE_PRODUCTS_TO_CATEGORIES . ' pcat WHERE p.products_id = pcat.products_id' . $where_string ); $count = 0; $count_attr = 0; while ($products_update = tep_db_fetch_array($products_update_query)) { if ($fixed == 0) { // Fixed price change if ($add == 0) { // Subtract $new_price = $products_update['price'] - $value; } else { // Add $new_price = $products_update['price'] + $value; } } else { // Percent change if ($add == 0) { // Subtract $new_price = $products_update['price'] * (1 - ($value / 100)); } else { // Add $new_price = $products_update['price'] * (1 + ($value / 100)); } } tep_db_query("UPDATE " . TABLE_PRODUCTS . " SET products_price='" . $new_price . "' WHERE products_id='" . $products_update['id'] . "'" ); if ($update_attributes) { // main product updated at this point, now lets optionally update the attributes! $attributes_update_query = tep_db_query('SELECT * FROM ' . TABLE_PRODUCTS_ATTRIBUTES . ' where products_id = '. $products_update['id']); while ($attributes_update = tep_db_fetch_array($attributes_update_query)) { // add/sub/percent price code // update query if($attributes_update[options_values_price]==0) { $new_attr_price = $attributes_update['options_values_price']; } elseif ($attributes_update[price_prefix]=="-") { // need to reverse sign logic... if ($fixed == 0) { // Fixed price change if ($add == 0) { // Subtract $new_attr_price = $attributes_update['options_values_price'] + $value; } else { // Add $new_attr_price = $attributes_update['options_values_price'] - $value; } } else { // Percent change if ($add == 0) { // Subtract $new_attr_price = $attributes_update['options_values_price'] * (1 + ($value / 100)); } else { // Add $new_attr_price = $attributes_update['options_values_price'] * (1 - ($value / 100)); } } } else { if ($fixed == 0) { // Fixed price change if ($add == 0) { // Subtract $new_attr_price = $attributes_update['options_values_price'] - $value; } else { // Add $new_attr_price = $attributes_update['options_values_price'] + $value; } } else { // Percent change if ($add == 0) { // Subtract $new_attr_price = $attributes_update['options_values_price'] * (1 - ($value / 100)); } else { // Add $new_attr_price = $attributes_update['options_values_price'] * (1 + ($value / 100)); } } } tep_db_query("UPDATE " . TABLE_PRODUCTS_ATTRIBUTES . " SET options_values_price='" . $new_attr_price . "' WHERE products_attributes_id='" . $attributes_update['products_attributes_id'] . "'"); $count_attr++; } } $count++; } // Products while loop // If a manufacturer was selected, get the name if ($mfr != 0) { $manufacturers_query = tep_db_query("SELECT manufacturers_name FROM " . TABLE_MANUFACTURERS . " WHERE manufacturers_id=" . $mfr); $manufacturers = tep_db_fetch_array($manufacturers_query); $manufacturer = $manufacturers['manufacturers_name']; } else { $manufacturer = TEXT_ALL_MANUFACTURERS; } // If a category was selected, get the name if ($cat != 0) { $categories_query = tep_db_query("SELECT cd.categories_name FROM " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_LANGUAGES . " l WHERE l.languages_id = cd.language_id AND l.name = '" . $language . "' AND categories_id = " . $cat); $categories = tep_db_fetch_array($categories_query); $category = TEXT_THE . $categories['categories_name'] . TEXT_CATEGORY; } else { $category = TEXT_ALL_CATEGORIES; } // Finish the rest of the update text information $fixed_string = ''; if ($fixed == 1) { $fixed_string = TEXT_PERCENT; } $add_string = TEXT_DECREASED_BY; if ($add == 1) { $add_string = TEXT_INCREASED_BY; } $update_string = $manufacturer . TEXT_PRICES_IN . $category . TEXT_WERE . $add_string . $value . $fixed_string; } // End action=update ?> <!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><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading">Product Price Updater</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=700 cellspacing=0 cellpadding=5> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_UPDATES; ?> </td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"> <?php if (isset($count) && $count != 0) { echo $update_string; } ?> </td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"> <?php if (isset($count) && $count != 0) { echo $count; } else { echo TEXT_NO; } echo TEXT_PRODUCTS_UPDATED; if (isset($count) && $count != 0) { echo " ($count_attr attributes were updated)"; } ?> </td> </tr> </table> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', "100%", 20); ?></td> </tr> <tr> <td> <form action="price_updater.php?action=update" method=post> <table border=0 width=700 cellspacing=0 cellpadding=2> <tr> <td colspan=7><?php echo tep_black_line(); ?></td> </tr> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_MANUFACTURER; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_CATEGORY; ?> </td> <td class="dataTableHeadingContent"> Update<br>Attributes </td> <!--<td colspan=2 class="dataTableHeadingContent"> <?php echo TABLE_HEADING_CATEGORY; ?> </td>--> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_PLUS_MINUS; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_FIXED; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_VALUE; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <tr> <td colspan=7><?php echo tep_black_line(); ?></td> </tr> <tr class=attributes-odd> <td class="smallText"> <?php echo tep_draw_pull_down_menu('manufacturers_id', tep_get_manufacturers(array(array('id' => '0', 'text' => 'All Manufacturers ')))); ?> </td> <td class="smallText"> <?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '0', 'text' => 'All Categories ')))); ?> </td> <td class="smallText"> <?php echo tep_draw_checkbox_field('update_attributes', '1', false);?> </td> <!--<td colspan=2 class="smallText"> <?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '0', 'text' => 'All Categories ')))); ?> </td>--> <td class="smallText"> <?php echo tep_draw_pull_down_menu('add', array(array('id' => '1', 'text' => '+'), array('id' => '0', 'text' => '-'))); ?> </td> <td class="smallText"> <?php echo tep_draw_pull_down_menu('fixed', array(array('id' => '1', 'text' => '%'), array('id' => '0', 'text' => 'Fixed'))); ?> </td> <td class="smallText"> <?php echo tep_draw_input_field('value', "0"); ?> </td> <td class="smallText"> <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?> </td> </tr> <tr> <td colspan=7><?php echo tep_black_line(); ?></td> </tr> <tr> <td colspan=7><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td> </tr> <tr> <td colspan=7><?php echo tep_black_line(); ?></td> </tr> <tr class="dataTableHeadingRow"> <td colspan=7 class="dataTableHeadingContent"> <?php echo TABLE_HEADING_MODEL; ?> </td> </tr> <tr> <td colspan=7><?php echo tep_black_line(); ?></td> </tr> <tr class=attributes-odd> <td class="smallText"> <?php echo tep_draw_pull_down_menu('from_id', $models_array, $from); ?> <?php echo TEXT_TO ?> </td> <td class="smallText"> <?php echo tep_draw_pull_down_menu('to_id', $models_array, $to); ?> </td> <td class="smallText"> Like: </td> <td colspan=4 class="smallText"> <?php echo tep_draw_input_field('like', ""); ?> <?php echo TEXT_NOTES ?> </td> </tr> <tr> <td colspan=7><?php echo tep_black_line(); ?></td> </tr> </table> </form> </td> </tr> </table></td> </tr> </table> </body> </html> ggs!
  13. whodah

    Price Updater

    ok, ignoring a checkbox in the config to maybe 'include attributes in price change' or something, do you think it's this 'simple'? in price_updater.php, the while loop that does the update around line 153... a second while loop (nested in yours) which fundamentally does this: select * from TABLE_PRODUCTS_ATTRIBUTES where products_id = $products_update['id'] while <above query>{ <code that takes the price and add/subtract/multiply price difference> <query that updates it similar to line 167 of yours> }
  14. whodah

    Price Updater

    hrm.. the more we talk about this and i think about it, i'm wondering if it isn't a 1-liner addon...
  15. whodah

    Price Updater

    ok, so yer code is obviously modifying prices in table 'products' on the field 'products_price'. from that relationship, get products_id (which i bet you already are? dunno..) then, in table products_attributes UPDATE products_attributes SET options_values_price = <original price +/- price updater price> WHERE products_id='products_id' at that point, one doesn't even care about the verbage description of the attribute, just the price. thoughts? -Who Dah? PS: thx for even entertaining this conversation! :D
×