Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

JFrancis

Pioneers
  • Posts

    26
  • Joined

  • Last visited

Everything posted by JFrancis

  1. Hey Jack, Something's up with my install, likely it's somethin I've done. I just cannot get the upload image process to work correctly in links_submit.php. This is with a vanilla RC2a install. 1st: It will only upload a .gif file, just will not upload any other file (.jpg, .png). 2nd: When I go to update a link's staus to approved (when a .gif file's been used) initially (before clicking edit) I can see the .gif pic, but after edit > and updating status to approved, it's replaced with the "IMAGE DOES NOT EXIST". However it is still in the images/links_manager_uploads folder. Any thoughts, help, direction, is much appreciated! Regards, JF
  2. Hello Again Robert, First off thanks for the opportunity to explore your USU 5 Pro. It's impressive to say the least of it. So thorough you are! I have given USU 5 Pro a good work out with a vanilla osc RC2a install. I cannot find, have not come across any issues to report. I then installed it on a moderate to heavily modified version of osc RC2a, where I ran into some issues with a couple of ajax/jquery/jsonServices based contributions (around adding products to cart & maintaining non default language consistency). I have still a severely modified, osc ms2.2 core updated to use register_globals off with php & mysql 5, I'd like to try it with, and see what comes of it (presently uses chemo's contribution). I realize that I have been of little to no help with discovering anything, however, I am reporting that with extensive exploring I have discovered nothing on a vanilla RC2a, and just the issues mentioned above concerning a couple of contributions on a modified osc RC2a. By the way, though I'm sure you already know, it all works wonderfully well together with your "KissMT Dynamic SEO Meta & Canonical Header Tags" contribution, which is another marvel. Thanks much for all your efforts, and such huge contributions to this community. Regards, with admiration (coupled with a bit of awe), JF P.S. I'd be delighted to report on anything further I experience, as i will continue to "muck about" with it. P.P.S. Could you make your contributions any easier to install! =)
  3. Hey Robert, If you like, I'd have a go at testing this. It's very interesting, to say the least of it. And, I'd be happy to let you know what I experience. Regards, JF
  4. Thank you for responding, and for your advice. I thought maybe I was not doing something correctly that was obvious to one who knows these contributions well. Now, at least I know it is a matter of patience and perseverance. JF
  5. Hi, I am having a time of it trying to get these three (SPPC 4.2.2, QPBPP 2.0, & Hide products (and categories) from customer groups for SPPC 2.0.3) to install properly together. The only thing I am clear about is that the fault is mine. So, I am hoping to be advised as to the best way to go about it. Here's what's been tried more than once, so far, but always ending up with sql errors: Web Server Info --------------- Apache: 2.2.14 PHP: 5.3.1 MySQL: 5.1.41 Vanilla RC2a PHP 5.3 patches (deprecated function updates) SPPC 4.2.2 (dropping in the file changes/updates) QPBPP 2.0 (dropping in the file changes/updates over the SPPC changes/updates) Hide Products for SPPC 2.0.3 (manually installing code - dropping in file changes/updates doesn't work once QPBPP has been added) There are some confusing code overlapping, not quite clear areas when manually installing the Hide Products for SPPC 2.0.3 with QPBPP 2.0 Can you please advise me as to what would be the best and easiest way to have both of these SPPC enhancements (QPBPP 2.0 & Hide Products for SPPC 2.0.3) installed and working on a Vanilla RC2a with SPPC? What am I likely doing wrong? Thanks, JF
  6. The contribution only works properly with flat rate shipping. It doesn't refresh the order total shipping properly, with shipping modues that increase shipping with added quantities &/or weight. JF
  7. The contribution only works properly with flat rate shipping. It doesn't refresh the order total shipping properly, with shipping modues that increase shipping with added quantities &/or weight. JF
  8. The contribution only works properly with flat rate shipping. It doesn't refresh the order total shipping properly, with shipping modues that increase shipping with added quantities &/or weight. JF
  9. Hi, It's looking for the CREDIT CLASS Gift Voucher Contribution, in the includes/classes/onepage_checkout.php file. There are two snippets of code concerning it. Commenting them out solves the issue a bit more easily. Regards, JF
  10. Hi, I hesitate to contradict you as I likely cannot assist you. I don't recall having to change anything major when we installed Mike's custom products add-on, so that it would work with Chemo's Ultimate URLs add-on. However, both add-ons work fine together for us. At the moment it is only on a demo site, and only tested by us, but so far the testing has been fine. Really, I am just writing to let you know that the two add-ons do work together. Regards, JF
  11. Hi, "If you have any changes to your attributes (i.e. attribute weight) you will have to alter the includes/modules/builder_add_attribute.php file to reflect your changes." Regards, JF
  12. Hey! If you want to not have to redo it each time you modify, just use the example form from the earlier post, (replacing the 3 hidden values with your own) as your link to your configurator. Regards, JF
  13. Hi, You'll have to repeat the process if you add another separate system configurator to your site. You won't have to, if you are just updating the same system configurator (if you are just adding or removing products/components from your present system configurator setup). G'Luck! JF
  14. Hey Mike, and All! Wondering if anyone else does not get the correct weight when in single mode, and more than one of an individual component is added in builder_main.php. I'm just getting the weight for one, no matter the quqntity added in builder_main.php, when I reach the checkout_shipping.php file. Thanks in advance for any input! Regards, JF
  15. Hi, If you go to the last link created in ccc.php (2nd useless ccc page!), and view the source, you will see that the link is within a form with hidden values, example: <table border="0" cellpadding="0" cellspacing="0" width="100%"> <form action="http://your_website/catalog/build.php" name="a7" method="POST"> <input type="hidden" name="systype" value="3"> <input type="hidden" name="fsb" value="7"> <input type="hidden" name="pics" value="y"> <tr class="ccc" onclick="submit(a7)" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)"> <td width="100%" align="center" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="center" style="font-size: 22pt;"> Business Computer </td> </tr> </table> </td> </tr> </table> </form> Copy the code, including the specific hidden values (systype & 3, fsb & 7, pics & y), and place the copied code wherever you like (as long as it's not within another form). Regards, JF
  16. Hey Mike! I have Enable_Disable_Categories_1.6.5 installed. It uses a status column. For any files that display products, queries must be modified to accomodate. So... as the shopping_cart.php, and the cpb's files are not modified, it works like a charm! Regards, JF
  17. That you have FILENAME_BUILDER_CATEGORIES in the admin url indicates that you did not properly do step 4 of the install instructions. When you do your url will work, and show: http://www.qgame.org/catalog/admin/builder...ted_box=builder instead. There is an option in the Custom Products admin area to switch between single & bundled modes.
  18. Hi, I thought I might add a couple of cents worth as I've messed around with this incredible contribution as well. - Not a programmer, but am familiar with php & osc. - Have in the neighborhood of 6 to 7 dozen highly modified add-ons. - Presently using xampp in a personal environment (not production). - 2.2ms2 core (php 4+ & mysql 4+) There are so, so many options that I've not tested nearly all. I'm prompted to write now because of the issues being mentioned already, which I have experienced none of. Note: The install was relatively painless, what little discomfort there was, was due to the heavy modifications already in my application. Before installing I tried out the demo sites, which Mike has provided (page 1, post 3). There I too was sent to the index page when attempting to add a one component build. When I added all available components - went to the cart as designed. On my install I'm not having this issue (with or without using the: Enforce 'top-to-bottom' Priority Building option). There is a "Display component Image" option in the pop up section. There is an "Allow 'disabled' Products option in the Available Component Choices section. Couple of experiences: If products quantity is not being used in osc, you have to use the correct option setting in cpb's options or nothing will show in the pop up. If you have any changes to your attributes (i.e. attribute weight) you will have to alter the includes/modules/builder_add_attribute.php file to reflect your changes. To sum up, using a heavily modified 2.2ms2, I've not yet come across anything that's not working properly. I am modifying to suit, and will be continually testing. When I am sure of something, I will share it here. I am most grateful for this piece of versatile work Mike. Thank you for your efforts. Regards, JF P.S. Passes through to Google Checkout properly.
  19. Hey There! Both warnings are because there is no ccc.php language file present in the admin/includes/languages/english/ folder. So, in the contribution's admin/includes/languages/English/ folder there are two language files: ccc.php & view_prod.php (note: for some reason the contribution's folder has a capital E in English, when it's actually lower case english) You are missing at least the admin/includes/languages/english/ccc.php file. When you place this file in the english admin language folder both errors will be gone. Regards, JF P.S. I'm not familiar with STS4, so it's possible that the language files have a different path, if so you would place the ccc9.3.1 contribution's admin/includes/languages/English/ccc.php file wherever the other language files are with the STS4 contribution.
  20. Hi Carbon, Would you be able to show me what to do to have the pictures show properly when clicking on [-edit-] in the shopping cart... Would be much appreciated! Thanks, JF
  21. Hi Jan, Thanks for taking the time to look at my issue. It's pretty much resolved now. Because I didn't want the fields to retain the original data if the content was deleted and left empty when updating, I had commented out the "Hidden parameters for cache old values". Uncommenting them, and using "<input disabled" for the insert values that did not really need to be updated, has left me with the correct updating status when updating values that do need to be updated. My oscommerce life would be much easier if I had a coding foundation! Thanks again! John
  22. It took me a moment to realize what you meant here, because I thought I had everything in the language file - then it dawned on me! Of course they must be giving your screen a good stretching! I tend to go overboard don't I, making them almost the same as their define! :blush: Sorry again! Thanks, I've had a lot of help. I have a friend who you helped a while ago, then she helped me! She suggested I come to this topic to see if you might know what's wrong with my modification as she couldn't tell. Anyways, I thought I'd post another file, with the same Quick Price Updates for SPPC base, that does update properly. And it doesn't use any checkboxes (tep_draw_checkbox_field). Oh yeah, I replaced the modified function, and briefed the BIG_CONSTANTS! Just in case you got curious again! :) <?php /* Core Code: Copyright (c) osCommerce - www.oscommerce.com Modified Code: based on the following: $Id: quick_updates.php for SPPC, v 1.1 2007/05/04 $ based on version 2.6 of quick_updates.php/Quick Update Prices with Gross Price Beta 1 of April 30, 2007 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Based on the original script contributed by Burt ([email protected]) and by Henri Bredehoeft ([email protected]) This version was contributed by Mathieu ([email protected]) Core & Modified Code released via GNU General Public License */ require('includes/application_top.php'); ($row_by_page) ? define('MAX_DISPLAY_ROW_BY_PAGE' , $row_by_page ) : $row_by_page = MAX_DISPLAY_SEARCH_RESULTS; define('MAX_DISPLAY_ROW_BY_PAGE' , MAX_DISPLAY_SEARCH_RESULTS ); ##// Update database switch ($HTTP_GET_VARS['action']) { case 'update' : $count_update=0; $item_updated = array(); if($HTTP_POST_VARS['product_new_free_shipping']){ foreach($HTTP_POST_VARS['product_new_free_shipping'] as $id => $new_free_shipping) { if ($HTTP_POST_VARS['product_new_free_shipping'][$id] != $HTTP_POST_VARS['product_old_free_shipping'][$id]) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_free_shipping='" . $new_free_shipping . "', products_last_modified=now() WHERE products_id='" . $id . "'"); } } } if($HTTP_POST_VARS['product_new_weight']){ foreach($HTTP_POST_VARS['product_new_weight'] as $id => $new_weight) { if ($HTTP_POST_VARS['product_new_weight'][$id] != $HTTP_POST_VARS['product_old_weight'][$id]) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_weight='" . $new_weight . "', products_last_modified=now() WHERE products_id='" . $id . "'"); } } } if($HTTP_POST_VARS['product_new_weight_wholesale']){ foreach($HTTP_POST_VARS['product_new_weight_wholesale'] as $id => $new_weight_wholesale) { if ($HTTP_POST_VARS['product_new_weight_wholesale'][$id] != $HTTP_POST_VARS['product_old_weight_wholesale'][$id]) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_weight_wholesale='" . $new_weight_wholesale . "', products_last_modified=now() WHERE products_id='" . $id . "'"); } } } if($HTTP_POST_VARS['product_new_weight_international']){ foreach($HTTP_POST_VARS['product_new_weight_international'] as $id => $new_weight_international) { if ($HTTP_POST_VARS['product_new_weight_international'][$id] != $HTTP_POST_VARS['product_old_weight_international'][$id]) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_weight_international='" . $new_weight_international . "', products_last_modified=now() WHERE products_id='" . $id . "'"); } } } $count_item = array_count_values($item_updated); if ($count_item['updated'] > 0) $messageStack->add($count_item['updated'].' '.PRODUCTS_UPDATED . " $count_update " . QTY_UPDATED, 'success'); break; } //// define the step for rollover lines per page $row_bypage_array = array(array()); for ($i = 20; $i <=100; $i=$i+20) { // for ($i = 2; $i <=10; $i=$i+2) { $row_bypage_array[] = array('id' => $i, 'text' => $i); } ##// Let's start displaying page with forms ?> <!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; ?>"> <meta http-equiv="imagetoolbar" content="no"> <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> <!-- positioning table Part 1 of 3 --> <table border="0" width="100%" cellspacing="0" cellpadding="0" width="100%" height="100%"> <tr><td align="center" valign="top"> <!-- /positioning table Part 1 of 3 --> <!-- header --> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- /header --> <!-- body --> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td valign="top"> <!-- left navigation --> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- /left navigation --> </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 height="50" class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> <tr><td align="center" class="main" colspan="2"><?php echo WARNING_MESSAGE; ?></td></tr> <tr><td height="17" colspan="2"></td></tr> </table> </td> </tr> <tr> <td align="center"> <table width="100%" cellspacing="0" cellpadding="0" border="0" height="100"> <tr> <td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <!-- SPPC mod: next tr changed for better HTML --> <tr align="center"> <td class="smallText"> <?php echo TEXT_MAXI_ROW_BY_PAGE; ?> </td> <td class="smallText" align="center"> <?php echo DISPLAY_CATEGORIES; ?> </td> </tr> <tr><td height="7" colspan="4"></td></tr> <tr align="center"> <?php echo tep_draw_form('row_by_page', FILENAME_FREE_SHIPPING, '', 'get'); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); echo tep_draw_hidden_field( 'cPath', $current_category_id); ?> <td class="smallText"> <?php echo tep_draw_pull_down_menu('row_by_page', $row_bypage_array, $row_by_page, 'onChange="this.form.submit();"'); ?> </form> </td> <?php echo tep_draw_form('categorie', FILENAME_FREE_SHIPPING, '', 'get'); echo tep_draw_hidden_field( 'row_by_page', $row_by_page); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); echo tep_draw_hidden_field('customers_group_id', $customers_group_id);?> <td class="smallText" align="center"> <?php echo tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); ?> </form> </td> </tr> </table> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr align="center"> <td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr align="center"> <form name="update" method="POST" action="<?php echo "$PHP_SELF?action=update&page=$page&sort_by=$sort_by&cPath=$current_category_id&row_by_page=$row_by_page&manufacturer=$manufacturer&customers_group_id=" . $customers_group_id .""; ?>"> <td width="100%"> <table cellspacing="0" cellpadding="0" border="0" width="40%"> <tr> <td align="center"> <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE, "action=update&cPath=$current_category_id&page=$page&sort_by=$sort_by&row_by_page=$row_by_page");?> </td> <td align="center"> <?php echo '<a href="' . tep_href_link(FILENAME_FREE_SHIPPING,"row_by_page=".$row_by_page."&customers_group_id=" . $customers_group_id . "") . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr><td height="17"></td></tr> </td> </tr> <br> <!-- BEGINNING OF DATA AREA --> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="center" valign="top"> <table border="0" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td width="25"></td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo " <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=pd.products_name ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_up.gif', TEXT_SORT_ALL . PRODUCTS . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=pd.products_name DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_down.gif', TEXT_SORT_ALL . PRODUCTS . ' ' . TEXT_DESCENDINGLY)."</a> <br>" .PRODUCTS . "</td>"; ?> </tr> </table> </td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo " <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=p.products_free_shipping ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_up.gif', TEXT_SORT_ALL . 'OFF ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=p.products_free_shipping DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_down.gif', TEXT_SORT_ALL . 'ON ' . TEXT_ASCENDINGLY)."</a> <br>" . FREE_SHIP . "</td>"; ?> </tr> </table> </td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo " <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=p.products_weight ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_up.gif', TEXT_SORT_ALL . WEIGHT . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=p.products_weight DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_down.gif', TEXT_SORT_ALL . WEIGHT . ' ' . TEXT_DESCENDINGLY)."</a> <br>" . WEIGHT . "</td>"; ?> </tr> </table> </td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo " <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=p.products_weight_wholesale ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_up.gif', TEXT_SORT_ALL . WEIGHT . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=p.products_weight_wholesale DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_down.gif', TEXT_SORT_ALL . WEIGHT . ' ' . TEXT_DESCENDINGLY)."</a> <br>" . WEIGHT_WHOLESALE . "</td>"; ?> </tr> </table> </td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo " <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=p.products_weight_international ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_up.gif', TEXT_SORT_ALL . WEIGHT . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_FREE_SHIPPING, 'cPath='. $current_category_id .'&sort_by=p.products_weight_international DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_down.gif', TEXT_SORT_ALL . WEIGHT . ' ' . TEXT_DESCENDINGLY)."</a> <br>" . WEIGHT_INTERNATIONAL . "</td>"; ?> </tr> </table> </td> </tr> <?php // <!-- GC_PAY Hidden --> $days = EXPIRE_NEW_PRODUCTS; //// control string sort page if ($sort_by && !ereg('order by',$sort_by)) $sort_by = 'order by '.$sort_by; //// define the string parameters for good back preview product $origin = FILENAME_FREE_SHIPPING."?info_back=$sort_by-$page-$current_category_id-$row_by_page-$manufacturer-$customers_group_id"; //// controle length (lines per page) $split_page = $page; if ($split_page > 1) $rows = $split_page * MAX_DISPLAY_ROW_BY_PAGE - MAX_DISPLAY_ROW_BY_PAGE; if (GC_PAY_INFO == 'true') { //// select categories if ($current_category_id == 0){ if($manufacturer){ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_free_shipping, p.products_weight, p.products_weight_wholesale, p.products_weight_international, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.manufacturers_id = " . $manufacturer . " $sort_by "; }else{ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_free_shipping, p.products_weight, p.products_weight_wholesale, p.products_weight_international, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '$languages_id' $sort_by "; } } // end if ($current_category_id == 0) else { if($manufacturer){ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_free_shipping, p.products_weight, p.products_weight_wholesale, p.products_weight_international, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' and p.manufacturers_id = " . $manufacturer . " $sort_by "; }else{ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_free_shipping, p.products_weight, p.products_weight_wholesale, p.products_weight_international, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' $sort_by "; } } } elseif (GC_PAY_INFO == 'false') { //// select categories if ($current_category_id == 0){ if($manufacturer){ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_free_shipping, p.products_weight, p.products_weight_wholesale, p.products_weight_international, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and products_date_added > SUBDATE( now( ) , INTERVAL " . $days . " DAY ) and pd.language_id = '$languages_id' and p.manufacturers_id = " . $manufacturer . " $sort_by "; }else{ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_free_shipping, p.products_weight, p.products_weight_wholesale, p.products_weight_international, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and products_date_added > SUBDATE( now( ) , INTERVAL " . $days . " DAY ) and pd.language_id = '$languages_id' $sort_by "; } } // end if ($current_category_id == 0) else { if($manufacturer){ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_free_shipping, p.products_weight, p.products_weight_wholesale, p.products_weight_international, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where p.products_id = pd.products_id and products_date_added > SUBDATE( now( ) , INTERVAL " . $days . " DAY ) and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' and p.manufacturers_id = " . $manufacturer . " $sort_by "; }else{ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_free_shipping, p.products_weight, p.products_weight_wholesale, p.products_weight_international, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where p.products_id = pd.products_id and products_date_added > SUBDATE( now( ) , INTERVAL " . $days . " DAY ) and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' $sort_by "; } } } // <!-- GC_PAY_INFO --> //// page splitter and display each products info $products_split = new splitPageResults($split_page, MAX_DISPLAY_ROW_BY_PAGE, $products_query_raw, $products_query_numrows); $products_query = tep_db_query($products_query_raw); while ($_products = tep_db_fetch_array($products_query)) { $products[] = $_products; $list_of_products_ids[] = $_products['products_id']; } // debug: echo '<pre>products array'; print_r($products); for ($x = 0; $x < count($list_of_products_ids); $x++) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } echo '<tr class="dataTableRow">'; echo "<td width=\"25\"></td>\n"; echo "<td class=\"smallText\" align=\"left\">".$products[$x]['products_name']."</td>\n"; $free_shipping_array = array(array('id' => '0', 'text' => TEXT_NO), array('id' => '1', 'text' => TEXT_YES)); echo "<td class=\"smallText\" align=\"center\">".tep_draw_pull_down_menu("product_new_free_shipping[".$products[$x]['products_id']."]", $free_shipping_array, $products[$x]['products_free_shipping'])."</td>\n"; echo "<td class=\"smallText\" align=\"center\"><input type=\"text\" size=\"5\" name=\"product_new_weight[".$products[$x]['products_id']."]\" value=\"".$products[$x]['products_weight']."\"></td>\n"; echo "<td class=\"smallText\" align=\"center\"><input type=\"text\" size=\"5\" name=\"product_new_weight_wholesale[".$products[$x]['products_id']."]\" value=\"".$products[$x]['products_weight_wholesale']."\"></td>\n"; echo "<td class=\"smallText\" align=\"center\"><input type=\"text\" size=\"5\" name=\"product_new_weight_international[".$products[$x]['products_id']."]\" value=\"".$products[$x]['products_weight_international']."\"></td>\n"; //// Hidden parameters for cache old values echo tep_draw_hidden_field('product_old_free_shipping['. $products[$x]['products_id'] .']',$products[$x]['products_free_shipping']); echo tep_draw_hidden_field('product_old_weight['. $products[$x]['products_id'] .']',$products[$x]['products_weight']); echo tep_draw_hidden_field('product_old_weight_wholesale['. $products[$x]['products_id'] .']',$products[$x]['products_weight_wholesale']); echo tep_draw_hidden_field('product_old_weight_international['. $products[$x]['products_id'] .']',$products[$x]['products_weight_international']); } // end for ($x = 0; $x < count($list_of_products_ids); $x++) echo "</table>\n"; ?> </td> </tr> </table> </td> </tr> <!-- END OF DATA AREA --> <tr> <td align="center"> <table cellspacing="0" cellpadding="0" border="0" width="40%"> <tr><td height="19" colspan="2"></td></tr> <tr> <td align="center"> <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE, "action=update&cPath=$current_category_id&page=$page&sort_by=$sort_by&row_by_page=$row_by_page");?> </td> <td align="center"> <?php echo '<a href="' . tep_href_link(FILENAME_FREE_SHIPPING,"row_by_page=".$row_by_page."&customers_group_id=" . $customers_group_id . "") . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?> </td> </tr> <tr><td height="3" colspan="2"></td></tr> </table> </td> </tr> <tr> <td align="center"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><td height="10" colspan="4"></td></tr> <tr> <td width="50"></td> <td class="smallText" valign="top"> <?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, $split_page, TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?> </td> <td class="smallText" align="right"> <?php echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, MAX_DISPLAY_PAGE_LINKS, $split_page, '&cPath='. $current_category_id .'&sort_by='.$sort_by . '&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer . '&customers_group_id=' . $customers_group_id); ?> </td> <td width="50"></td> </table> </td> </tr> </form> </table></td> </tr> </table></td> <!-- /body text --> </tr> </table> <!-- /body --> <!-- positioning table Part 2 of 3 --> </td></tr> <tr><td align="center" valign="bottom"> <!-- /positioning table Part 2 of 3 --> <!-- footer --> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- /footer --> <!-- positioning table Part 3 of 3 --> </td></tr> </table> <!-- /positioning table Part 3 of 3 --> </body></html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  23. Jan, I'm very sorry. It didn't even occur to me that you might look at the file in a browser. I should have cleaned it up, removing what didn't pertain to the issue. I more or less just am able to sometimes modify code that others have written. I can't code myself. Please excuse my thoughtlessness. That function is just a copy of the tep_draw_pull_down_menu, with a selected option "select" so that it wasn't blank. Thanks for looking at it again... this is more than I anticipated. I'll clean it up and post it. Maybe you'll be feeling forgiving! :) John
  24. Thanks for responding Jan! I had used the file as a base for another need awhile back, which involved products, and it didn't require a checkbox to update properly. Am guessing my issue now is associated with the fact that this present need does not involve products (I removed all code associated with products this time). It's such a great base code to use for a number of needs. I'll try messing with it some more, though I've been messing with it for days now. I don't think the checkbox by itself will solve it because it now is showing each value as an insert/item (showing 9 inserts/items & 9 values on any update - when there are only in total 3 inserts/items with 3 values each). Anyhow, I was just hoping that it might be something obvious to you that wasn't obvious to me. Thanks again, for taking a stab at it Jan! John
  25. Hi All! JanZ, when you have time, would you mind taking a look at the file below? I used the Quick Price Updates for SPPC as a base for what I needed, and evrything works fine except that instead of updating one value (when appropriate) it updates everything present (as indicated by the update status response in green on top of page after an update). So, as the not needed updated values don't get changed, technically it all works, but in time it will be updating a lot of values unnecessarily, therefore I would like to be able to resolve this. Example: When updating one value (when there are a total of three inserts, with three values each) the updated status indicates: "9 Gift Certificate(s) Updated! 9 Value(s) changed", when it should indicate 1 Gift Certificate(s) Updated! 1 Value(s) changed. Would very much appreciate any help with this! Thanks. John <?php /* Core Code: Copyright (c) osCommerce - www.oscommerce.com Modified Code: based on the following: $Id: quick_updates.php for SPPC, v 1.1 2007/05/04 $ based on version 2.6 of quick_updates.php/Quick Update Prices with Gross Price Beta 1 of April 30, 2007 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Based on the original script contributed by Burt ([email protected]) and by Henri Bredehoeft ([email protected]) This version was contributed by Mathieu ([email protected]) Core & Modified Code released via GNU General Public License */ require('includes/application_top.php'); ($row_by_page) ? define('MAX_DISPLAY_ROW_BY_PAGE' , $row_by_page ) : $row_by_page = MAX_DISPLAY_SEARCH_RESULTS; define('MAX_DISPLAY_ROW_BY_PAGE' , MAX_DISPLAY_SEARCH_RESULTS ); switch ($HTTP_GET_VARS['action']) { case 'update' : $count_update=0; $item_updated = array(); if($HTTP_POST_VARS['giftcertificate_new_id']){ foreach($HTTP_POST_VARS['giftcertificate_new_id'] as $id => $new_id) { if ($HTTP_POST_VARS['giftcertificate_new_id'][$id] != $HTTP_POST_VARS['giftcertificate_old_id'][$id]) { $count_update++; $item_updated[$id] = 'updated'; tep_db_query("update ".TABLE_COUPON_GV_BLOCK_TEMP." set coupon_id='" . $new_id . "'where coupon_id = '" . $id . "'"); } } } if($HTTP_POST_VARS['giftcertificate_new_code']){ foreach($HTTP_POST_VARS['giftcertificate_new_code'] as $code => $new_code) { if ($HTTP_POST_VARS['giftcertificate_new_code'][$code] != $HTTP_POST_VARS['giftcertificate_old_code'][$code]) { $count_update++; $item_updated[$code] = 'updated'; tep_db_query("update ".TABLE_COUPON_GV_BLOCK_TEMP." set coupon_code='" . $new_code . "'where coupon_code = '" . $code . "'"); } } } if($HTTP_POST_VARS['giftcertificate_new_time']){ foreach($HTTP_POST_VARS['giftcertificate_new_time'] as $time => $new_time) { if ($HTTP_POST_VARS['giftcertificate_new_time'][$time] != $HTTP_POST_VARS['giftcertificate_old_time'][$time]) { $count_update++; $item_updated[$time] = 'updated'; tep_db_query("update ".TABLE_COUPON_GV_BLOCK_TEMP." set access_time='" . $new_time . "'where access_time = '" . $time . "'"); } } } $count_item = array_count_values($item_updated); if ($count_item['updated'] > 0) $messageStack->add($count_item['updated'].' '.TEXT_GIFTCERTIFICATE_UPDATED . " $count_update " . TEXT_QTY_UPDATED, 'success'); break; } if (($_REQUEST['gc_id'] != '') && ($_REQUEST['gc_code'] != '')) { $_REQUEST['gc_id'] = $gc_id; $_REQUEST['gc_code'] = $gc_code; tep_db_query("insert into ".TABLE_COUPON_GV_BLOCK_TEMP." set coupon_id='".$gc_id."',coupon_code='".$gc_code."',access_time=now()"); } if ($HTTP_GET_VARS['action']=='delete' && isset($HTTP_GET_VARS['id'])) { tep_db_query("delete from " . TABLE_COUPON_GV_BLOCK_TEMP . " where coupon_id='".$HTTP_GET_VARS['id']."'"); } $row_bypage_array = array(array()); for ($i = 2; $i <=10; $i=$i+2) { // for ($i = 20; $i <=100; $i=$i+20) { $row_bypage_array[] = array('id' => $i, 'text' => ' ' . $i); } // <!-- blocked time amount --> if (MODULE_PAYMENT_GOOGLECHECKOUT_GIFTCERTIFICATE_BLOCK_TIME == 'one') { $hrdiff = '<b><font color="#ff0000">'. 1 .'</font></b>'. TEXT_BLOCKED_TIME_LENGTH_HOUR; } elseif (MODULE_PAYMENT_GOOGLECHECKOUT_GIFTCERTIFICATE_BLOCK_TIME == 'two') { $hrdiff = '<b><font color="#ff0000">'. 2 .'</font></b>'. TEXT_BLOCKED_TIME_LENGTH_HOURS; } elseif (MODULE_PAYMENT_GOOGLECHECKOUT_GIFTCERTIFICATE_BLOCK_TIME == 'three') { $hrdiff = '<b><font color="#ff0000">'. 3 .'</font></b>'. TEXT_BLOCKED_TIME_LENGTH_HOURS; } elseif (MODULE_PAYMENT_GOOGLECHECKOUT_GIFTCERTIFICATE_BLOCK_TIME == 'six') { $hrdiff = '<b><font color="#ff0000">'. 6 .'</font></b>'. TEXT_BLOCKED_TIME_LENGTH_HOURS; } elseif (MODULE_PAYMENT_GOOGLECHECKOUT_GIFTCERTIFICATE_BLOCK_TIME == 'nine') { $hrdiff = '<b><font color="#ff0000">'. 9 .'</font></b>'. TEXT_BLOCKED_TIME_LENGTH_HOURS; } elseif (MODULE_PAYMENT_GOOGLECHECKOUT_GIFTCERTIFICATE_BLOCK_TIME == 'twelve') { $hrdiff = '<b><font color="#ff0000">'. 12 .'</font></b>'. TEXT_BLOCKED_TIME_LENGTH_HOURS; } elseif (MODULE_PAYMENT_GOOGLECHECKOUT_GIFTCERTIFICATE_BLOCK_TIME == 'eighteen') { $hrdiff = '<b><font color="#ff0000">'. 18 .'</font></b>'. TEXT_BLOCKED_TIME_LENGTH_HOURS; } elseif (MODULE_PAYMENT_GOOGLECHECKOUT_GIFTCERTIFICATE_BLOCK_TIME == 'twentyfour') { $hrdiff = '<b><font color="#ff0000">'. 24 .'</font></b>'. TEXT_BLOCKED_TIME_LENGTH_HOURS; } // <!-- /blocked time amount --> ?> <!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; ?>"> <meta http-equiv="imagetoolbar" content="no"> <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 <?php echo ONLOAD_3; ?>oncontextmenu="return false" ondragstart="return false"> <!-- positioning table Part 1 of 3 --> <table border="0" width="100%" cellspacing="0" cellpadding="0" width="100%" height="100%"> <tr><td align="center" valign="top"> <!-- /positioning table Part 1 of 3 --> <!-- header --> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- /header --> <!-- body --> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td valign="top"> <!-- left navigation --> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- /left navigation --> </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 height="50" class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table> </td> </tr> <tr> <td align="center"> <table width="100%" cellspacing="0" cellpadding="0" border="0" height="100"> <tr> <td align="center"> <table cellspacing="0" cellpadding="0" border="0"> <tr align="center"> <td align="right" class="smallText"> <?php echo TEXT_MAXI_ROW_BY_PAGE; ?>: </td> <?php echo tep_draw_form('row_by_page', FILENAME_GV_BLOCK_TEMP, '', 'get'); ?> <td class="smallText"> <?php echo tep_draw_pull_down_menu_select('row_by_page', $row_bypage_array, $row_by_page, 'onChange="this.form.submit();"'); ?> </form> </td> </tr> </table> </td> </tr> <tr><td height="17"></td></tr> <tr><td align="center" class="smallText"> <?php echo '<a href="' . tep_href_link(FILENAME_MODULES,"set=payment&module=googlecheckout&action=edit") . '">' . TEXT_BLOCKED_TIME_LENGTH_LINK . '</a><br>' . TEXT_BLOCKED_TIME_LENGTH . $hrdiff . ')'; ?> </td></tr> <tr><td height="17"></td></tr> <!-- data --> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="center" valign="top"> <table border="0" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td width="25"></td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo "<a href=\"" . tep_href_link( FILENAME_GV_BLOCK_TEMP, '&sort_by=coupon_id ASC&page=' . $page.'&row_by_page=' . $row_by_page)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_up.gif', TEXT_SORT_ALL . IMAGE_GIFT_CERT_IDS . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_GV_BLOCK_TEMP, '&sort_by=coupon_id DESC&page=' . $page.'&row_by_page=' . $row_by_page)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_down.gif', TEXT_SORT_ALL . IMAGE_GIFT_CERT_IDS . TEXT_DESCENDINGLY)."</a> <br>" . TABLE_HEADING_GIFT_CERT_IDS; ?> </td> </tr> </table> </td> <td width="10"></td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo "<a href=\"" . tep_href_link( FILENAME_GV_BLOCK_TEMP, '&sort_by=coupon_code ASC&page=' . $page.'&row_by_page=' . $row_by_page)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_up.gif', TEXT_SORT_ALL . IMAGE_GIFT_CERT_CODES . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_GV_BLOCK_TEMP, '&sort_by=coupon_code DESC&page=' . $page.'&row_by_page=' . $row_by_page)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_down.gif', TEXT_SORT_ALL . IMAGE_GIFT_CERT_CODES . TEXT_DESCENDINGLY)."</a> <br>" . TABLE_HEADING_GIFT_CERT_CODES; ?> </td> </tr> </table> </td> <td width="10"></td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <?php echo " <a href=\"" . tep_href_link( FILENAME_GV_BLOCK_TEMP, '&sort_by=access_time ASC&page=' . $page.'&row_by_page=' . $row_by_page)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_up.gif', TEXT_SORT_ALL . IMAGE_GIFT_ACCESS_TIMES . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_GV_BLOCK_TEMP, '&sort_by=access_time DESC&page=' . $page.'&row_by_page=' . $row_by_page)."\" >".tep_image(DIR_WS_IMAGES . 'arrow_down.gif', TEXT_SORT_ALL . IMAGE_GIFT_ACCESS_TIMES . TEXT_DESCENDINGLY)."</a> <br>" . TABLE_HEADING_GIFT_ACCESS_TIMES; ?> </td> </tr> </table> </td> <td width="10"></td> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr><td height="5"></td></tr> <tr> <td class="dataTableHeadingContent" align="center"> <?php echo TABLE_HEADING_INSERT; ?><br><?php echo TABLE_HEADING_DELETE; ?> </td> </tr> </table> </td> </tr> </table> </td> <td width="25"></td> </tr> <tr bgcolor="#ffff00"><td height="7" colspan="9"></td></tr> <?php echo tep_draw_form('insert', FILENAME_GV_BLOCK_TEMP, 'row_by_page=' . $row_by_page, 'post'); // echo tep_draw_form('insert', FILENAME_GV_BLOCK_TEMP, 'action=process&row_by_page=' . $row_by_page, 'NONSSL'); echo "<tr bgcolor=\"#ffff00\">"; echo "<td width=\"25\"></td>\n"; echo "<td align=\"center\"><input type=\"text\" size=\"7\" onfocus=\"this.select()\" name=\"gc_id\" style=\"text-align: center\"></td>\n"; echo "<td width=\"10\"></td>\n"; echo "<td align=\"center\"><input type=\"text\" size=\"14\" onfocus=\"this.select()\" name=\"gc_code\" style=\"text-align: center\"></td>\n"; echo "<td width=\"10\"></td>\n"; echo "<td align=\"center\" class=\"smallText\"><b>Present Time</b></td>\n"; echo "<td width=\"10\"></td>\n"; echo "<td align=\"center\">" . tep_image_submit('button_insert.gif', IMAGE_INSERT_GV_BALANCE_ACCOUNT) . "</td>\n"; echo "<td width=\"25\"></td>\n"; echo "</tr>\n"; echo "</form>"; ?> <tr bgcolor="#ffff00"><td height="5" colspan="9"></td></tr> <tr class="dataTableRow"><td height="10" colspan="9"></td></tr> <?php echo tep_draw_form('update', FILENAME_GV_BLOCK_TEMP, 'action=update&row_by_page=' . $row_by_page, 'post'); //// control string sort page if ($sort_by && !ereg('order by',$sort_by)) $sort_by = 'order by '.$sort_by; //// define the string parameters for good back preview product $origin = FILENAME_GV_BLOCK_TEMP."?info_back=$row_by_page"; //// controle length (lines per page) $split_page = $page; if ($split_page > 1) $rows = $split_page * MAX_DISPLAY_ROW_BY_PAGE - MAX_DISPLAY_ROW_BY_PAGE; $coupons_query_raw = "select coupon_id, coupon_code, access_time from ".TABLE_COUPON_GV_BLOCK_TEMP." $sort_by"; $coupons_split = new splitPageResults($split_page, MAX_DISPLAY_ROW_BY_PAGE, $coupons_query_raw, $coupons_query_numrows); $coupons_query = tep_db_query($coupons_query_raw); while ($coupons = tep_db_fetch_array($coupons_query)) { // debug: echo '<pre>coupons array'; print_r($coupons); $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } echo "<tr class=\"dataTableRow\">"; echo "<td width=\"25\"></td>\n"; echo "<td align=\"center\"><input type=\"text\" size=\"7\" onfocus=\"this.select()\" name=\"giftcertificate_new_id[".$coupons['coupon_id']."]\" value=\"".$coupons['coupon_id']."\" style=\"text-align: right; padding-right: 5\"></td>\n"; echo "<td width=\"10\"></td>\n"; echo "<td align=\"center\"><input type=\"text\" size=\"14\" onfocus=\"this.select()\" name=\"giftcertificate_new_code[".$coupons['coupon_code']."]\" value=\"".$coupons['coupon_code']."\" style=\"text-align: right; padding-right: 5\"></td>\n"; echo "<td width=\"10\"></td>\n"; echo "<td align=\"center\"><input type=\"text\" size=\"21\" onfocus=\"this.select()\" name=\"giftcertificate_new_time[".$coupons['access_time']."]\" value=\"".$coupons['access_time']."\" style=\"text-align: right; padding-right: 5\"></td>\n"; echo "<td width=\"10\"></td>\n"; echo "<td align=\"center\"><a href=\"" . tep_href_link(FILENAME_GV_BLOCK_TEMP,'action=delete&id=' . $coupons['coupon_id'] . '&row_by_page=' . $row_by_page,'NONSSL'). "\">" . tep_image_button('button_bin.gif', IMAGE_DELETE_GV_BALANCE_ACCOUNT) . "</a></td>\n"; echo "<td width=\"25\"></td>\n"; /* //// Hidden parameters for cache old values echo tep_draw_hidden_field('giftcertificate_old_id['.$coupons['coupon_id'] .']',$coupons['coupon_id']); echo tep_draw_hidden_field('giftcertificate_old_code['.$coupons['coupon_code'] .']',$coupons['coupon_code']); echo tep_draw_hidden_field('giftcertificate_old_time['.$coupons['access_time'] .']',$coupons['access_time']); */ } ?> </tr> <tr class="dataTableRow"><td height="10" colspan="9"></td></tr> </table> </td> </tr> </table> </td> </tr> <!-- /data --> <tr> <td align="center"> <table cellspacing="0" cellpadding="0" border="0" width="40%"> <tr><td height="19" colspan="2"></td></tr> <tr> <td align="center"> <?php echo '<a href="' . tep_href_link(FILENAME_GV_BLOCK_TEMP,"&row_by_page=$row_by_page") . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?> </td> <td align="center"> <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE, "action=update&row_by_page=$row_by_page");?> </td> </tr> <tr><td height="3" colspan="2"></td></tr> </table> </td> </tr> <tr> <td align="center"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><td height="10" colspan="4"></td></tr> <tr> <td width="50"></td> <td class="smallText" valign="top"> <?php echo $coupons_split->display_count($coupons_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, $split_page, TEXT_DISPLAY_NUMBER_OF_BLOCKED_GC); ?> </td> <td class="smallText" align="right"> <?php echo $coupons_split->display_links($coupons_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, MAX_DISPLAY_PAGE_LINKS, $split_page, '&sort_by='.$sort_by . '&row_by_page=' . $row_by_page); ?> </td> <td width="50"></td> </table> </td> </tr> </form> </table></td> </tr> </table></td> <!-- /body text --> </tr> </table> <!-- /body --> <!-- positioning table Part 2 of 3 --> </td></tr> <tr><td align="center" valign="bottom"> <!-- /positioning table Part 2 of 3 --> <!-- footer --> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- /footer --> <!-- positioning table Part 3 of 3 --> </td></tr> </table> <!-- /positioning table Part 3 of 3 --> </body></html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
×
×
  • Create New...