Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

tedbooks

Pioneers
  • Posts

    164
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by tedbooks

  1. hello thank you for the effort it is a very clean and easy to install contribution certainly ahead of the other two paypal ipn . but i need to have order emails to be sent when the payment is completed. i was wondering what file i have to change to do this rather than it being sent when the customer comes back because he might not. now i have managed to have the paypal redirect the customer back as soon as they clicks PAY. Customer gets redirected back without having to click continue. question is if i do this am i compromising anything? is it checked to see if the payment is completed before the order email is sent or is it just sent out when the order is updated in the db? and my last question is now that this auto redirect is available with paypal i just use that with standard paypal module and have the customer redirected to checkout_process.php when i tried that everything worked also since customer does not have to click continue but redirected by paypal to the site of couirse the problem is if someone doesn't wait to be redirected what are the other problems with this module? i want to automate the shipping process and do not want to check for failed payments. and i also want to minimize fraud so i know that using the ipn is probably the best solution but i still have my original problem.
  2. hi i am trying to make two contributions to work with each other restore order attributes option type there is a conflict between the two and when the cart is restored with the first contribution the attributes are not shown here is a part of the code that gets the attributes in my account_history_info.php with modification for option type and it is working for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { echo ' <tr>' . "\n" . ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="main" valign="top">' . $order->products[$i]['name']; if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>'; } } echo '</td>' . "\n"; and this is the part of the code that deals with attributes ib restore_order.php which gives me no value for attributes for ($i=0, $n=sizeof($restore_order->products); $i<$n; $i++) { $pID = $restore_order->products[$i]['id']; $qty = $restore_order->products[$i]['qty']; $attributes = array(); if ( (isset($restore_order->products[$i]['attributes'])) && (sizeof($restore_order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($restore_order->products[$i]['attributes']); $j<$n2; $j++) { $attribute_options_id_query = tep_db_query("select products_options_name, products_options_id from " . TABLE_PRODUCTS_OPTIONS . " where products_options_name = '" . $restore_order->products[$i]['attributes'][$j]['option'] . "'"); $attribute_options_id = tep_db_fetch_array($attribute_options_id_query); $attribute_options_values_id_query = tep_db_query("select products_options_values_id ,products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_name = '" . $restore_order->products[$i]['attributes'][$j]['value'] . "'"); $attribute_options_values_id = tep_db_fetch_array($attribute_options_values_id_query); $attributes[$attribute_options_id['products_options_name']] = '{' . $attribute_options_id['products_options_name'] . '}' . $attribute_options_values_id['products_options_values_name']; } } $cart->add_cart($pID, ($cart->get_quantity(tep_get_uprid($pID, $attributes))) + $qty, $attributes, false); i know it is a long shot since both are pretty old contribution but they are beautiful work and if i could get this to work it would be great thanks in advance for any help you can provide
  3. hi i want to make the moneyorder module available only for some customers and some affiliates. like if $buss_account=1 and if customers_buisness_account from TABLE_CUSTOMER =1 i am trying to learn how to do this if i add the by itself it makes the module not available but if i put it does not worki should be able to turn it on and off by changing the value but it just stays on at all time i am getting the $buss_account from application_top.php and i have the same conditional statment working in my right column so why wouldn't it work in the module is the question <?php /* $Id: moneyorder.php,v 1.10 2003/01/29 19:57:14 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class moneyorder { var $code, $title, $description, $enabled; // class constructor function moneyorder() { global $order; $this->code = 'moneyorder'; $this->title = MODULE_PAYMENT_MONEYORDER_TEXT_TITLE; $this->description = MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_MONEYORDER_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false); if ((int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); $this->email_footer = MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER; } // class methods function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_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_MONEYORDER_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; } } //// my adjustment if ($buss_account ==1) $this->enabled = false; //end of my adjustment } function javascript_validation() { return false; } function selection() { return array('id' => $this->code, 'module' => $this->title); } function pre_confirmation_check() { return false; } function confirmation() { return array('title' => MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION); } function process_button() { return false; } function before_process() { return false; } function after_process() { return false; } function get_error() { return false; }
×
×
  • Create New...