Jump to content

voided

Members
  • Content count

    314
  • Joined

  • Last visited

Everything posted by voided

  1. voided

    resize image on uploading

    You need to process them trough photoshop first (80% or 90% quality)... seriously those file sizes are humongous for jpg's. maybe your scanner just renames the files as jpg's but doesn't actually do anything with them. Unless you're on a dedicated server and you can change your php.ini setting (max_execution_time or max_input_time and upload_max_filesize) no script will help you since you're trying to upload a 4MB file and the webserver is giving you the middle finger ;)
  2. voided

    resize image on uploading

    are the pictures big because they are not in jpg or because they are really big in width/height? if its because they aren't in jpg its quite easy to process a whole folder of images in photoshop with 1 click... google for "photoshop batch processing" for more info
  3. voided

    [Contribution] SEO-G

    i'd like to report that seo-g works perfectly with manufacturers and sorting and any other extra pulldowns.... here's an example for the manufacturers in index.php $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo tep_draw_form('filter', FILENAME_DEFAULT, 'get') . '<b>show:</b> '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } echo tep_draw_hidden_field('sort', $_GET['sort']).(isset($_GET['list']) ? tep_draw_hidden_field('list', $_GET['list']) : '') . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : ''); ?> <select class="xdrop1" name="select2" onChange="if(options[selectedIndex].value) window.location.href=(options[selectedIndex].value)"> <option value="<? echo tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('filter_id','page', 'max', 'sort')) . ''); ?>">All Manufacturers</option> <? while ($filterlist = tep_db_fetch_array($filterlist_query)) { ?> <option value="<? echo tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('filter_id','page', 'max', 'sort')) . 'filter_id='.$filterlist['id']); ?>" <?php if($HTTP_GET_VARS['filter_id'] == $filterlist['id'] ) {echo 'SELECTED';}else{ echo '';} ?>><? echo $filterlist['name']; ?></option> <? } ?> </select> <? echo tep_hide_session_id() . '</form>' . "\n"; } and for the manufacturers infobox (includes/boxes/manufacturers.php) on the column_left.php i used this (you should be able to find out where this goes in the file): // Display a drop-down $manufacturers_array = array(); if (MAX_MANUFACTURERS_LIST < 2) { $manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); } echo tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'); ?> <select class="xdrop1" name="select3" onChange="if(options[selectedIndex].value) window.location.href=(options[selectedIndex].value)"> <option value="<? echo tep_href_link(FILENAME_DEFAULT); ?>">Please Select</option> <? while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { ?> <option value="<? echo tep_href_link(FILENAME_DEFAULT, 'manufacturers_id='.$manufacturers['manufacturers_id']); ?>" <?php if($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'] ) {echo 'SELECTED';}else{ echo '';} ?>><? echo $manufacturers['manufacturers_name']; ?></option> <? } ?> </select> <? } ?>
  4. voided

    resize image on uploading

    photoshop? :)
  5. voided

    Drop down sizes & prices

    http://addons.oscommerce.com/info/160
  6. voided

    Options as images

    you can see a working version here : http://www.velvetego.com/dior-sunglasses-s...r-2-s-p-767.htm I'm working on a new site and i think I'll try pete's popup window thing this time (too many attributes to list on the product page) btw, anyone knows of some other way to list a large number of attributes? (possibly on the product page itself this time) hmm.... is there a way to have categories of attributes or is that what attributes sets does? :)
  7. voided

    Solar Signin

    oh and btw this works good in firefox but not too much in IE... any ideas to fix it up for IE?
  8. voided

    Solar Signin

    i had the same problem, i fixed it by doing 2 things... i'm not sure which one did it but here it is anyways: 1)instead of using smoothbox.css i copied the content of smoothbox.css into my stylesheet.css 2) when i downloaded mootools.v1.11.js i named it mootools.js so this time i renamed it back to mootools.v1.11.js (i'm pretty sure this was the problem) and... it works now :)
  9. voided

    How do we grab cc numbers with Authorize.net?

    contribution: http://www.oscommerce.com/community/contributions,3074
  10. voided

    How do we grab cc numbers with Authorize.net?

    done... preview : building contrib, posting it as soon as its ready. next update : 1) add bank phone number input field to the checkout 2) add a copy button(javascript) next to the data (gpg encrypted text) box to copy the contents to the clipboard (no need to select text & copy). any better ideas here? 3) add a delete button to clear the data field (security reasons...)
  11. voided

    How do we grab cc numbers with Authorize.net?

    i managed to get the cc.php run the ccgpg.php code... now all i need is an authorize account so i can start on it... (in about a week or 2)
  12. voided

    How do we grab cc numbers with Authorize.net?

    btw.. i'm working on a contrib that would join ccgpg & authorize... don't know if i'll be able to but i'll try ;)
  13. voided

    How do we grab cc numbers with Authorize.net?

    an authorize support tech actually told me an option i have (we have big orders/ over 5k each) is to grab the numbers before we send it to the gateway so we can do aditional checks on the cards (ie call the bank)... so i don't see whats the problem here...
  14. my bad, that was another contrib (which wasn;t updated for ms2 :/ )
  15. uh.. wasn't there an " Order" field in an older version of option type feature? if i look at this osc shop i have, this one has the order field in the "Products Attributes" section... why has it been removed? actually let me go look at it and i'll try to re add it in ;)
  16. voided

    [contribution] "osC_GiftWrap_v1.0"

    duh... i guess i just have to put it has a product attribute :oops:
  17. voided

    [contribution] "osC_GiftWrap_v1.0"

    ok well... in my case i had to modify checkout_confirmation.php if (sizeof($order->info['tax_groups']) > 1) echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "n"; echo ' <td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "n" . ' </tr>' . "n"; } change to : if (sizeof($order->info['tax_groups']) > 1) echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "n"; echo '<td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], '', $order->products[$i]['qty']) . '</td></tr>'; } this removes the tax from the product price in the upper right section of checkout_confirmation. the sub-total and total was ok for in my case so no changes needed there... this is a dirty patch and we should try to fix it at the source of the problem.. i'll let someone else do this. IMPROVEMENTS: now i personally think it would be better if the giftwrap option could be applied to products separately. ex: i order 3 products and only want to giftwrap one !! (i'll try to work on this one...)
  18. voided

    [contribution] "osC_GiftWrap_v1.0"

    seems to show the product final price with tax whether its turned on or off... :shock:
  19. voided

    [contribution] "osC_GiftWrap_v1.0"

    definitely something weird going on with the prices here... trying to hunt down the cause of this :D
  20. fixed it.. i added this to checkout_success.php : if (!isset($HTTP_GET_VARS['order_id'])) { tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'SSL')); } $customer_number_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['order_id'])) . "'"); $customer_number = tep_db_fetch_array($customer_number_query); if ($customer_number['customers_id'] != $customer_id) { tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'SSL')); } right after : if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); }
  21. forgot to mention at checkout_success not account_history_info
  22. this isn't good at all... i still can see other orders if i change the order_id=xxx this should be fixed :/
  23. voided

    TD Bank module

    nevermind... moved to authorize.net. Problem solved heh
  24. voided

    TD Bank module

    hi , i need some help here :( I'm trying to integrate the TD Bank - direct payment solution to oscommerce. so far it works (i've taken the psigate module and modified it for TD) the only problem is that it goes to an external link instead of going back to checkout_success.php :/ (image at bottom) i would like to know how would osc know that the request was successful and redirect me to checkout_succes ? btw psigate are a real bunch of thieves ... image: my modified psigate file: <?php class psigate { var $code, $title, $description, $enabled; function psigate() { global $order; $this->code = 'psigate'; $this->title = MODULE_PAYMENT_PSIGATE_TEXT_TITLE; $this->description = MODULE_PAYMENT_PSIGATE_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_PSIGATE_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_PSIGATE_STATUS == 'True') ? true : false); if ((int)MODULE_PAYMENT_PSIGATE_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_PSIGATE_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); $this->form_action_url = 'https://testtranfe.bellxperttest.com/tms-ts/payService/merchant/paymentServiceM.cgi'; } function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PSIGATE_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PSIGATE_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } function javascript_validation() { if (MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') { $js = 'if (payment_value == "' . $this->code . '") {' . "n" . ' var psigate_cc_number = document.checkout_payment.psigate_cc_number.value;' . "n" . ' if (psigate_cc_number == "" || psigate_cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "n" . ' error_message = error_message + "' . MODULE_PAYMENT_PSIGATE_TEXT_JS_CC_NUMBER . '";' . "n" . ' error = 1;' . "n" . ' }' . "n" . '}' . "n"; return $js; } else { return false; } } function selection() { global $order; if (MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') { for ($i=1; $i<13; $i++) { $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000))); } $today = getdate(); for ($i=$today['year']; $i < $today['year']+10; $i++) { $expires_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i))); } $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_OWNER, 'field' => $order->billing['firstname'] . ' ' . $order->billing['lastname']), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('psigate_cc_number')), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('psigate_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('psigate_cc_expires_year', $expires_year)))); } else { $selection = array('id' => $this->code, 'module' => $this->title); } return $selection; } function pre_confirmation_check() { global $HTTP_POST_VARS; if (MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') { include(DIR_WS_CLASSES . 'cc_validation.php'); $cc_validation = new cc_validation(); $result = $cc_validation->validate($HTTP_POST_VARS['psigate_cc_number'], $HTTP_POST_VARS['psigate_cc_expires_month'], $HTTP_POST_VARS['psigate_cc_expires_year']); $error = ''; switch ($result) { case -1: $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4)); break; case -2: case -3: case -4: $error = TEXT_CCVAL_ERROR_INVALID_DATE; break; case false: $error = TEXT_CCVAL_ERROR_INVALID_NUMBER; break; } if ( ($result == false) || ($result < 1) ) { $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&psigate_cc_owner=' . urlencode($HTTP_POST_VARS['psigate_cc_owner']) . '&psigate_cc_expires_month=' . $HTTP_POST_VARS['psigate_cc_expires_month'] . '&psigate_cc_expires_year=' . $HTTP_POST_VARS['psigate_cc_expires_year']; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false)); } $this->cc_card_type = $cc_validation->cc_type; $this->cc_card_type_ab = $cc_validation->cc_type_ab; $this->cc_card_number = $cc_validation->cc_number; $this->cc_expiry_month = $cc_validation->cc_expiry_month; $this->cc_expiry_year = $cc_validation->cc_expiry_year; } else { return false; } } function confirmation() { global $HTTP_POST_VARS, $order; if (MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') { $confirmation = array('title' => $this->title . ': ' . $this->cc_card_type, 'fields' => array(array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_OWNER, 'field' => $order->billing['firstname'] . ' ' . $order->billing['lastname']), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_NUMBER, 'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_EXPIRES, 'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['psigate_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['psigate_cc_expires_year']))))); return $confirmation; } } function process_button() { global $HTTP_SERVER_VARS, $order, $currencies; switch (MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE) { case 'Always Good': $transaction_mode = '1'; break; case 'Always Duplicate': $transaction_mode = '2'; break; case 'Always Decline': $transaction_mode = '3'; break; case 'Production': default: $transaction_mode = '0'; break; } switch (MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE) { case 'Sale': $transaction_type = '0'; break; case 'PostAuth': $transaction_type = '2'; break; case 'PreAuth': default: $transaction_type = '1'; break; } $process_button_string = tep_draw_hidden_field('account', '402350'). tep_draw_hidden_field('merchantId', 'mtest402350'). tep_draw_hidden_field('merchantTxn', '620505'). tep_draw_hidden_field('merchantPwd', 'mtest759'). tep_draw_hidden_field('amount', $order->info['total'] * 100) . tep_draw_hidden_field('custName1', $order->billing['firstname'] . ' ' . $order->billing['lastname']) . tep_draw_hidden_field('streetAddr', $order->billing['street_address']) . tep_draw_hidden_field('city', $order->billing['city']); if ($order->billing['country']['iso_code_2'] == 'US') { $billing_state_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_id = '" . (int)$order->billing['zone_id'] . "'"); $billing_state = tep_db_fetch_array($billing_state_query); $process_button_string .= tep_draw_hidden_field('province', $billing_state['zone_code']); } else { $process_button_string .= tep_draw_hidden_field('province', $order->billing['state']); } $process_button_string .= tep_draw_hidden_field('zip', $order->billing['postcode']) . tep_draw_hidden_field('country', $order->billing['country']['iso_code_2']) . tep_draw_hidden_field('Phone', $order->customer['telephone']) . tep_draw_hidden_field('email', $order->customer['email_address']) . tep_draw_hidden_field('operation', 'P') . tep_draw_hidden_field('clientVersion', '1.03') . tep_draw_hidden_field('cardNumber', $this->cc_card_number). tep_draw_hidden_field('cardType', 'VI'). tep_draw_hidden_field('redirect_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true)) . tep_draw_hidden_field('cardExp', $this->cc_expiry_month."/".substr($this->cc_expiry_year, -2)); return $process_button_string; } function before_process() { return false; } function after_process() { return false; } function get_error() { global $HTTP_GET_VARS; if (isset($HTTP_GET_VARS['ErrMsg']) && (strlen($HTTP_GET_VARS['ErrMsg']) > 0)) { $error = stripslashes(urldecode($HTTP_GET_VARS['ErrMsg'])); } elseif (isset($HTTP_GET_VARS['error']) && (strlen($HTTP_GET_VARS['error']) > 0)) { $error = stripslashes(urldecode($HTTP_GET_VARS['error'])); } else { $error = MODULE_PAYMENT_PSIGATE_TEXT_ERROR_MESSAGE; } return array('title' => MODULE_PAYMENT_PSIGATE_TEXT_ERROR, 'error' => $error); } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_PSIGATE_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable PSiGate Module', 'MODULE_PAYMENT_PSIGATE_STATUS', 'True', 'Do you want to accept PSiGate payments?', '6', '1', 'tep_cfg_select_option(array('True', 'False'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_PSIGATE_MERCHANT_ID', 'teststorewithcard', 'Merchant ID used for the PSiGate service', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE', 'Always Good', 'Transaction mode to use for the PSiGate service', '6', '3', 'tep_cfg_select_option(array('Production', 'Always Good', 'Always Duplicate', 'Always Decline'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Type', 'MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE', 'PreAuth', 'Transaction type to use for the PSiGate service', '6', '4', 'tep_cfg_select_option(array('Sale', 'PreAuth', 'PostAuth'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Credit Card Collection', 'MODULE_PAYMENT_PSIGATE_INPUT_MODE', 'Local', 'Should the credit card details be collected locally or remotely at PSiGate?', '6', '5', 'tep_cfg_select_option(array('Local', 'Remote'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PSIGATE_CURRENCY', 'USD', 'The currency to use for credit card transactions', '6', '6', 'tep_cfg_select_option(array('CAD', 'USD'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_PSIGATE_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_PSIGATE_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_PSIGATE_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_PAYMENT_PSIGATE_STATUS', 'MODULE_PAYMENT_PSIGATE_MERCHANT_ID', 'MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE', 'MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE', 'MODULE_PAYMENT_PSIGATE_INPUT_MODE', 'MODULE_PAYMENT_PSIGATE_CURRENCY', 'MODULE_PAYMENT_PSIGATE_ZONE', 'MODULE_PAYMENT_PSIGATE_ORDER_STATUS_ID', 'MODULE_PAYMENT_PSIGATE_SORT_ORDER'); } } ?>
×