Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

boeikaas

Archived
  • Posts

    13
  • Joined

  • Last visited

Profile Information

  • Real Name
    bo

boeikaas's Achievements

  1. Sorry to hear that. Anyway, that fix worked for me with the PayPal IPN v2.3.3 contribution.
  2. This fixed it for me ------------------- This is a fix which updates the status always after receiving an IPN notification (for register_globals OFF or ON) . For all versions : Find in catalog/includes/modules/payment/paypal_ipn.php tep_session_register('cart_PayPal_IPN_ID'); // Terra register globals fix //$_SESSION['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id; Replace with // FS start $GLOBALS['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id; // FS stop tep_session_register('cart_PayPal_IPN_ID'); // FS start // Terra register globals fix //$_SESSION['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id; // FS stop The problem : $cart_PayPal_IPN_ID was not always a global (e.g. between functions confirmation and process_button. Only this text included !
  3. Hey, many of my customers get confused when they want to pay with credit cards and visa with Paypal IPN. Is there a way to get the creditcard form to show up instantly on the paypal page, without pressing "continue"? Thanks
  4. Thank you. It works! if ($order->delivery['country']['id'] == 240) $this->enabled = false;
  5. thank you so much. but where to put it? And should I remove some of the old zone code?
  6. Hey. I'm trying to code a new shipping module - Norwegian letter (to europe). I need a little help. This module must only be activated if another country than your store country is selected by the customer. I mananged to insert a code for this, but you can only select one country at once. Can someone help me please:=) ? Heres the code: <?php /* $Id: brevposteuropa.php,v 1.0 2006/02/02 00:00:00 Bjørn Olav Bøe Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2002 osCommerce Released under the GNU General Public License */ class brevposteuropa { var $code, $title, $description, $icon, $enabled; // class constructor function brevposteuropa() { global $order; $this->code = 'brevposteuropa'; $this->title = MODULE_SHIPPING_BREVPOSTEUROPA_TEXT_TITLE; $this->description = MODULE_SHIPPING_BREVPOSTEUROPA_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_BREVPOSTEUROPA_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'posten.png'; $this->tax_class = MODULE_SHIPPING_BREVPOSTEUROPA_TAX_CLASS; $this->enabled = MODULE_SHIPPING_BREVPOSTEUROPA_STATUS; if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_BREVPOSTEUROPA_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_BREVPOSTEUROPA_ZONE . "' and zone_country_id = '" . $order->delivery['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->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } // class methods function quote($method = '') { global $addressvalues, $shipping_weight, $order, $shipping_num_boxes; $vekt = $shipping_weight; $query = "select * from brevpost_satser_europa where $vekt<=vekt"; $result = tep_db_query($query); $row = tep_db_fetch_array($result); $totalpris=$row["sone"]; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_BREVPOSTEUROPA_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_BREVPOSTEUROPA_TEXT_WAY, 'cost' => MODULE_SHIPPING_BREVPOSTEUROPA_CODCOST + $totalpris))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); return $this->quotes; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_BREVPOSTEUROPA_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, date_added) values ('Tilby Brevpost sending til Europa', 'MODULE_SHIPPING_BREVPOSTEUROPA_STATUS', '1', 'Vil du tilby Brevpost sending?', '6', '0', now())"); if (!tep_db_fetch_array(tep_db_query ("select configuration_key from " . TABLE_CONFIGURATION . " where configuration_key='STORE_ORIGIN_ZIP'"))) tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Postnummer', 'STORE_ORIGIN_ZIP', '', 'Fyll inn postnummer til butikken som skal brukes i beregning av frakt.', '7', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Legg til gebyr', 'MODULE_SHIPPING_BREVPOSTEUROPA_CODCOST', '0', 'Gebyr for Brevpost, fylles inn eks. mva.', '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 ('Skatteklasse', 'MODULE_SHIPPING_BREVPOSTEUROPA_TAX_CLASS', '0', 'Bruk følgende skatteklasse på Brevpost.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', 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 ('Shipping Zone', 'MODULE_SHIPPING_BREVPOSTEUROPA_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', '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, date_added) values ('Rekkefølge', 'MODULE_SHIPPING_BREVPOSTEUROPA_SORT_ORDER', '0', 'Rekkefølge for visning på side for fraktvalg.', '6', '0', now())"); } function remove() { $keys = ''; $keys_array = $this->keys(); $keys_size = sizeof($keys_array); for ($i=0; $i<$keys_size; $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key ='MODULE_SHIPPING_BREVPOSTEUROPA_STATUS'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key ='MODULE_SHIPPING_BREVPOSTEUROPA_CODCOST'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key ='MODULE_SHIPPING_BREVPOSTEUROPA_TAX_CLASS'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key ='MODULE_SHIPPING_BREVPOSTEUROPA_SORT_ORDER'"); } function keys() { return array('MODULE_SHIPPING_BREVPOSTEUROPA_STATUS', 'STORE_ORIGIN_ZIP', 'MODULE_SHIPPING_BREVPOSTEUROPA_CODCOST', 'MODULE_SHIPPING_BREVPOSTEUROPA_TAX_CLASS','MODULE_SHIPPING_BREVPOSTEUROPA_ZONE', 'MODULE_SHIPPING_BREVPOSTEUROPA_SORT_ORDER'); } } ?>
  7. I want to implant gift_mod_v2.0 into invoice.php so it shows the gift under products. here is the code i want to insert: $freegift_query = tep_db_query("select products_name, products_model from orders_freegift where orders_id = '" .$HTTP_GET_VARS['oID'] . "'"); $freegift = tep_db_fetch_array($freegift_query); echo $freegift['products_model'] . " - " . $freegift['products_name']; I believe it must be inserted here someplace in the invoice: for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; echo ' <tr class="dataTableRow">' . "\n" . Hope some good coders can help me a little:) Thanks
  8. Hello. Is there a easy way to add a free gift if someone have a order over e.g. 50$? I just want it to show up in the checkout_confirmation.php and the invoice. I know there are some similars modules here, but its not exactly what I'm looking for.
  9. I'm also wondering how you can change the width and insert a border. Can anyone help me? I want a border similar to rest of my site: http://palmenorge.com thanks
×
×
  • Create New...