Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

unixace

Archived
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Real Name
    Scott Hartsell

unixace's Achievements

  1. For those looking to add an upload progress window to the upload mod you can try the following. It seems to work and is simple to install. Create a new file: progress_upload.php and save in your osCommerce root directory <html> <head> <title><?php echo _("Uploading File...") ?></title> </head> <body> <center> <span style="font-size:8pt;font-family:arial,helvetica,sans-serif;font-weight:bold;color:#ffffff;background-color:#009900;padding:3px;"><?php echo _(" File upload in progress! ") ?></span> <p> <span style="font-size:8pt;font-family:arial,helvetica,sans-serif;"> <?php echo _("This page will go away automatically when the upload is complete. Please be patient!") ?> <p> <table border=0 cellpadding=0 cellspacing=0> <tr> <td> <img src="images/computer.gif"></td> <td> <img src="images/uploading.gif"></td> <td> <img src="images/computer.gif"></td> </tr> </table> </center> </span> </body> </html> Create a new file: uploading.js and save in your osCommerce root directory (usually catalog) <script type="text/javascript"> <!-- var win = null; function showProgress() { win = window.open("progress_upload.php","status",'width=350,height=150,scrollbars=no,statusbar=no,toolbars=no'); } --> </script> Edit catalog/product_info.php Right before </head> Add <?php require('uploading.js'); ?> Find <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> Change to <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onUnLoad="win.close()"> You are adding the onUnload option. Around line 323 Find: <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,''); ?> Change to: <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'onClick="showProgress()"'); ?> You are adding the onClick option The graphics used in the box are: The two image files that I used are from the "Menalto Gallery" project. Right click and save from here or download the graphics from www.imijit.net/downloads/uploading.gif and www.imijit.net/downloads/computer.gif. When you start your upload the popup box will appear. When the upload is finished and the product_info page is refreshed the box will close. This is only tested when you do not show the shopping cart after adding the item. The window should close when the program closes but I have not tested it that way yet. I hope that someone finds this useful. Scott
  2. Has anyone yet figured out how to get qty breaks to calculate properly when the same item is added to an order more than once with different attributes? I have spent over 8 hrs looking over the PriceFormatter.php code and I still can't figure out the logic to get it to read the order's product id's properly. And I know I have the mod installed correctly as all else works great. Thanks in advance for any help. This one has me stumped. Unixace
  3. Ian, I have found that when you only have one CC payment method available that you can not redeem a gift voucher greater than the invoice amount. I have a site that only accepts Authorize.net and you can't redeem a voucher. If I add Check/MO for example redemption works fine. It seems to be because with only one CC option the code in order_total.php sets the default payment method to the only available payment method by default, which means checkout_confirmation.php needs a CC number to continue. Code snippet from order_total.php // if there is only one payment method, select it as default because in // checkout_confirmation.php the $payment variable is being assigned the // $HTTP_POST_VARS['payment'] value which will be empty (no radio button selection possible) if ( (sizeof($this->modules) == 1) && (!is_object($GLOBALS[$payment])) ) { $payment = $include_modules[0]['class']; } I know there needs to be a test but I am not familiar enough with OSC yet to know where to place it. Thanks, Scott
×
×
  • Create New...