Jump to content

Joahim2509

Members
  • Content count

    41
  • Joined

  • Last visited

Everything posted by Joahim2509

  1. Hi. I am trying to configure a "Customer Discount" add-on . This add-on make take the value from database that is seated for user as % discount. After that apply this discount to "Cart" in the checkout_confirmation. The problem is that he shows the value of the % discount and not the sum that must to be payed. Ex: user discount 5% , amount is 304.50 and he shows 15.23- this is the value that must to be minus amount and after that show to client total price. You can show the image attached . What I need to change to obtain the correct result or how I can add a new line after the Discount line (Rabatt Summe) to show the amount that must to be payed. Wher I need to insert for example some thing like echo "Amount after Discount Applied:" There is the code of the add-on <?php /* $Id: ot_customer_discount.php,v 1.2.1 2003/08/15 07:36:01 celiawessen Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ class ot_customer_discount { var $title, $output; function ot_customer_discount() { $this->code = 'ot_customer_discount'; $this->title = MODULE_CUSTOMER_DISCOUNT_TITLE; $this->description = MODULE_CUSTOMER_DISCOUNT_DESCRIPTION; $this->enabled = MODULE_CUSTOMER_DISCOUNT_STATUS; $this->sort_order = MODULE_CUSTOMER_DISCOUNT_SORT_ORDER; $this->include_shipping = MODULE_CUSTOMER_DISCOUNT_INC_SHIPPING; $this->include_tax = MODULE_CUSTOMER_DISCOUNT_INC_TAX; $this->calculate_tax = MODULE_CUSTOMER_DISCOUNT_CALC_TAX; $this->output = array(); } function process(){ global $order, $currencies; $od_amount = $this->calculate_discount($this->get_order_total()); if ($od_amount>0){ $this->deduction = $od_amount; $this->output[] = array('title' => $this->title . ':', 'text' => '<b>' . $currencies->format($od_amount) . '</b>', 'value' => $od_amount); $order->info['total'] = $order->info['total'] - $od_amount; $order->info['subtotal'] -= $od_amount; } } function calculate_discount($amount) { global $order, $customer_id; $od_amount=0; $query = tep_db_query("select customers_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); $od_pc = $query_result['customers_discount']; if ($query_result['customers_discount'] > 0) { // Calculate tax reduction if necessary if ($this->calculate_tax == 'true') { // Calculate main tax reduction $tod_amount = round($order->info['tax']*10)/10*$od_pc/100; $order->info['tax'] = $order->info['tax'] - $tod_amount; // Calculate tax group deductions reset($order->info['tax_groups']); while (list($key, $value) = each($order->info['tax_groups'])) { $god_amount = round($value*10)/10*$od_pc/100; $order->info['tax_groups'][$key] = $order->info['tax_groups'][$key] - $god_amount; } } $od_amount = (round($amount*10)/10)*$od_pc/100; // $od_amount = $od_amount + $tod_amount; } return $od_amount; } function get_order_total() { global $order, $cart; $order_total = $order->info['total']; if ($this->include_tax == 'false') $order_total=$order_total-$order->info['tax']; if ($this->include_shipping == 'false') $order_total=$order_total-$order->info['shipping_cost']; return $order_total; } function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_CUSTOMER_DISCOUNT_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function keys() { return array('MODULE_CUSTOMER_DISCOUNT_STATUS', 'MODULE_CUSTOMER_DISCOUNT_SORT_ORDER', 'MODULE_CUSTOMER_DISCOUNT_INC_SHIPPING', 'MODULE_CUSTOMER_DISCOUNT_INC_TAX', 'MODULE_CUSTOMER_DISCOUNT_CALC_TAX'); } 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 ('Display Total', 'MODULE_CUSTOMER_DISCOUNT_STATUS', 'true', 'Do you want to enable the Customer specific order discount module?', '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 ('Sort Order', 'MODULE_CUSTOMER_DISCOUNT_SORT_ORDER', '999', 'Sort order of display.', '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 ('Include Shipping', 'MODULE_CUSTOMER_DISCOUNT_INC_SHIPPING', 'true', 'Include Shipping in calculation', '6', '5', '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, set_function ,date_added) values ('Include Tax', 'MODULE_CUSTOMER_DISCOUNT_INC_TAX', 'true', 'Include Tax in calculation.', '6', '6','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, set_function ,date_added) values ('Calculate Tax', 'MODULE_CUSTOMER_DISCOUNT_CALC_TAX', 'false', 'Re-calculate Tax on discounted amount.', '6', '5','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } } ?>
  2. Joahim2509

    Customer Review

    Hallo. Can somebody point me to a Costumer Review add=on or script that I can integrate to my shop. I need a script that have a user form like name, pseudo-name, text for review. After user write all this dated the form write all in database and site admin get an email that the shop have a new review and it have possibility to moderate it (set the status for it, to appear online or not)
  3. Joahim2509

    Customer Review

    I dont need a review for a product but the review from the customer that have bout on my site
  4. Joahim2509

    Customer Review

    I have this code but it doset work for me. It make no inserts to database. <?php define ("ADMIN_MAIL", "roma@[member='some']_domain.de"); define ("ADMIN_MAIL_SUBJECT", "!!! Neue Bewertung im Shop !!! "); define ("ADMIN_MAIL_FROM", "noreply@[member='some']_domain.de"); /* $Id: minen.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . "bewertung-abgeben.php"); $breadcrumb->add("Bewertung abgeben", tep_href_link("bewertung-abgeben.php")); ?> <!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; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo "Bewertung abgeben"; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php if($action=="abgeben") { if($ueberschrift && $bewertung) { tep_db_query("INSERT INTO bewertungen SET bewertungen_pseudonym='".$pseudonym."', bewertungen_ueberschrift='".$ueberschrift."', bewertungen_text='".$bewertung."', bewertungen_datum=NOW();"); $id = tep_db_insert_id(); $mailtext = $pseudonym.":\n\n".$ueberschrift."\n\n".$bewertung."\n\n"; $mailtext .= "Bewertung aktivieren: \nhttp://www.some_domain.de/bewertung-abgeben.php?action=status&p=ej2k34jfkdfjr4545fsdfxvbffwku&id=".$id."\n\n"; mail(ADMIN_MAIL, ADMIN_MAIL_SUBJECT.date("H:i:s"), $mailtext, "From: ".ADMIN_MAIL_FROM." Content-Type: text"); } ?> Wir haben Ihre Bewertung in unserer Datenbank aufgenommen. <?php } else if($action=="status" && $p=="ej2k34jfkdfjr4545fsdfxvbffwku") { tep_db_query("UPDATE bewertungen SET bewertungen_status='1' WHERE bewertungen_id='".$id."';"); echo "Bewertung aktiviert!"; } else if($action=="statusx" && $p=="ej2k34jfkdfjr4545fsdfxvbffwku") { tep_db_query("UPDATE bewertungen SET bewertungen_status='0' WHERE bewertungen_id='".$id."';"); echo "Bewertung aktiviert!"; } else { ?> Hier k�nnen Sie Ihre Bewertung f�r unseren Shop abgeben. <form action="bewertung-abgeben.php" method="post"> <input type="hidden" name="action" value="abgeben"> <table> <tr><td>Name/Psoydonym</td><td><input type="text" name="pseudonym"></td></tr> <tr><td>�berschrift</td><td><input type="text" name="ueberschrift"></td></tr> <tr><td valign="top">Ihre Bewertung:</td><td><textarea cols=30 rows=8 name="bewertung"></textarea></td></tr> </table> <input type="submit" value="Bewertung jetzt senden"> </form> <?php } ?> </td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html>
  5. Joahim2509

    customer discount dont sho corect

    the problem is that I have not changed any thing in code. if you want and help for my roblem i can send you my discound code page sorce doc. <?php /* $Id: ot_customer_discount.php,v 1.2.1 2003/08/15 07:36:01 celiawessen Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ class ot_customer_discount { var $title, $output; function ot_customer_discount() { $this->code = 'ot_customer_discount'; $this->title = MODULE_CUSTOMER_DISCOUNT_TITLE; $this->description = MODULE_CUSTOMER_DISCOUNT_DESCRIPTION; $this->enabled = MODULE_CUSTOMER_DISCOUNT_STATUS; $this->sort_order = MODULE_CUSTOMER_DISCOUNT_SORT_ORDER; $this->include_shipping = MODULE_CUSTOMER_DISCOUNT_INC_SHIPPING; $this->include_tax = MODULE_CUSTOMER_DISCOUNT_INC_TAX; $this->calculate_tax = MODULE_CUSTOMER_DISCOUNT_CALC_TAX; $this->output = array(); } function process(){ global $order, $currencies; $od_amount = $this->calculate_discount($this->get_order_total()); if ($od_amount>0){ $this->deduction = $od_amount; $this->output[] = array('title' => $this->title . ':', 'text' => '<b>' . $currencies->format($od_amount) . '</b>', 'value' => $od_amount); $order->info['total'] = $order->info['total'] - $od_amount; $order->info['subtotal'] -= $od_amount; } } function calculate_discount($amount) { global $order, $customer_id; $od_amount=0; $query = tep_db_query("select customers_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); $od_pc = $query_result['customers_discount']; if ($query_result['customers_discount'] > 0) { // Calculate tax reduction if necessary if ($this->calculate_tax == 'true') { // Calculate main tax reduction $tod_amount = round($order->info['tax']*10)/10*$od_pc/100; $order->info['tax'] = $order->info['tax'] - $tod_amount; // Calculate tax group deductions reset($order->info['tax_groups']); while (list($key, $value) = each($order->info['tax_groups'])) { $god_amount = round($value*10)/10*$od_pc/100; $order->info['tax_groups'][$key] = $order->info['tax_groups'][$key] - $god_amount; } } $od_amount = (round($amount*10)/10)*$od_pc/100; // $od_amount = $od_amount + $tod_amount; } return $od_amount; } function get_order_total() { global $order, $cart; $order_total = $order->info['total']; if ($this->include_tax == 'false') $order_total=$order_total-$order->info['tax']; if ($this->include_shipping == 'false') $order_total=$order_total-$order->info['shipping_cost']; return $order_total; } function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_CUSTOMER_DISCOUNT_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function keys() { return array('MODULE_CUSTOMER_DISCOUNT_STATUS', 'MODULE_CUSTOMER_DISCOUNT_SORT_ORDER', 'MODULE_CUSTOMER_DISCOUNT_INC_SHIPPING', 'MODULE_CUSTOMER_DISCOUNT_INC_TAX', 'MODULE_CUSTOMER_DISCOUNT_CALC_TAX'); } 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 ('Display Total', 'MODULE_CUSTOMER_DISCOUNT_STATUS', 'true', 'Do you want to enable the Customer specific order discount module?', '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 ('Sort Order', 'MODULE_CUSTOMER_DISCOUNT_SORT_ORDER', '999', 'Sort order of display.', '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 ('Include Shipping', 'MODULE_CUSTOMER_DISCOUNT_INC_SHIPPING', 'true', 'Include Shipping in calculation', '6', '5', '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, set_function ,date_added) values ('Include Tax', 'MODULE_CUSTOMER_DISCOUNT_INC_TAX', 'true', 'Include Tax in calculation.', '6', '6','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, set_function ,date_added) values ('Calculate Tax', 'MODULE_CUSTOMER_DISCOUNT_CALC_TAX', 'false', 'Re-calculate Tax on discounted amount.', '6', '5','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } } ?>
  6. Joahim2509

    customer discount dont sho corect

    Rabatt Summe : 90.00EUR Zwischensumme: 10.00EUR Freier Versand: 0.00EUR MwSt. 19.0%: 1.57EUR Gesamtsumme: -4.40EUR
  7. Joahim2509

    customer discount dont sho corect

    1.Zwischensumme (subtotal): 100.00EUR 2.Freier Versand(shipping): 0.00EUR Rabatt Summe ohne MwSt.(DIscount): 90.00EUR MwSt. 19.0%(VAT): 1.57EUR Gesamtsumme(Total): -4.40EUR
  8. Joahim2509

    customer discount dont sho corect

    I changed it but still is not correct. The Tax is deduced from the total order until it makes the minus of costumer discount
  9. Joahim2509

    Paypal Order Emails Not Being Sent

    My Orders thru paypal are showing up in the Admin Panel. But I do not get an email.Does anyone have ideas or that can give me a link to a thread. Ive searched and searched this forum, I know its right under my nose. After user make a order it is not correct redirected to my site, is s redirected to shopping cart but mast to be to checkout_process.php P.S. PayPal Standard Debug E-Mail $HTTP_GET_VARS: Array ( [osCsid] => n9jnblqfjv6q8hql8n30ofgm51 [tx] => 8J724338S12081744 [st] => Completed [amt] => 1.00 [cc] => EUR [cm] => 2974 [item_number] => )
  10. Joahim2509

    customer discount dont sho corect

    1.cost of product 2.shipping: 3.costumer discount 4.TAX 19.0%: 5.Total:
  11. Joahim2509

    customer discount dont sho corect

    Thanks but I made this, the problem is that the total amount is now not correct, in my case is minus. cost of product is 79 euro, shipping: 7.50, costumer discount:77.85EUR, TAX 19.0%: 1.27EUR, Total: -2.69EUR. All this is by 90% discount for client
  12. Joahim2509

    customer discount dont sho corect

    but how can I exclude tax correct? because it exclude tax from the amount without the costumer discount?
  13. Joahim2509

    customer discount dont sho corect

    Thank you @@Dan Cole and @@allaboutwicker . Was my error :)
  14. Hi. I want to add a method in my shop for customers when they have an amount bigger than 100 euro in shopping cart than they have only the free delivery method. In my shop are 2 methods, 1 is the DHL delivery and 2 is Tabelare shipping. Now I what to disable the DHL method from checkout_shipping.php when the amount of cart is >100. I find this Add-on http://addons.oscommerce.com/info/5431but I dont understand where I need to make this small modification in my file for DHL (dp.php). I attached the nstruction for this add-on and my code for DHL method is: <?php /* $Id: dp.php,v 1.36 2003/03/09 02:14:35 harley_vb Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 - 2003 osCommerce Released under the GNU General Public License */ class dp { var $code, $title, $description, $enabled, $num_dp; // class constructor function dp() { global $order; $this->code = 'dp'; $this->title = MODULE_SHIPPING_DP_TEXT_TITLE; $this->description = MODULE_SHIPPING_DP_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_DP_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'shipping_dp.gif'; $this->tax_class = MODULE_SHIPPING_DP_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_DP_STATUS == 'true') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_DP_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_DP_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; } } // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED $this->num_dp = 5; } // class methods function quote($method = '') { global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes; $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; for ($i=1; $i<=$this->num_dp; $i++) { $countries_table = constant('MODULE_SHIPPING_DP_COUNTRIES_' . $i); $country_zones = preg_split("/[,]/", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; } } if ($dest_zone == 0) { $error = true; } else { $shipping = -1; $dp_cost = constant('MODULE_SHIPPING_DP_COST_' . $i); $dp_table = preg_split("/[:,]/" , $dp_cost); for ($i=0; $i<sizeof($dp_table); $i+=2) { if ($shipping_weight <= $dp_table[$i]) { $shipping = $dp_table[$i+1]; $shipping_method = MODULE_SHIPPING_DP_TEXT_WAY . ' [ ' . $dest_country . ' ]'; break; } } if ($shipping == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_DP_UNDEFINED_RATE; } else { $shipping_cost = ($shipping + MODULE_SHIPPING_DP_HANDLING); } } $this->quotes = array('id' => $this->code, 'module' => '', 'methods' => array(array('id' => $this->code, //'title' => $shipping_method . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . ' ' . MODULE_SHIPPING_DP_TEXT_UNITS .')', 'title' => $shipping_method, 'cost' => $shipping_cost * $shipping_num_boxes))); 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); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_DP_INVALID_ZONE; 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_DP_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 ('Deutsche Post WorldNet', 'MODULE_SHIPPING_DP_STATUS', 'true', 'Wollen Sie den Versand �ber die deutsche Post anbieten?', '6', '0', '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 ('Handling Fee', 'MODULE_SHIPPING_DP_HANDLING', '0', 'Bearbeitungsgeb�hr f�r diese Versandart in Euro', '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 ('Steuersatz', 'MODULE_SHIPPING_DP_TAX_CLASS', '0', 'W�hlen Sie den MwSt.-Satz f�r diese Versandart aus.', '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 ('Versand Zone', 'MODULE_SHIPPING_DP_ZONE', '0', 'Wenn Sie eine Zone ausw�hlen, wird diese Versandart nur in dieser Zone angeboten.', '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 ('Reihenfolge der Anzeige', 'MODULE_SHIPPING_DP_SORT_ORDER', '0', 'Niedrigste wird zuerst angezeigt.', '6', '0', now())"); for ($i = 1; $i <= $this->num_dp; $i++) { $default_countries = ''; if ($i == 1) { $default_countries = 'DE'; } //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 1 Countries', 'MODULE_SHIPPING_DP_COUNTRIES_1', 'AD,AT,BE,CZ,DK,FO,FI,FR,GR,GL,IE,IT,LI,LU,MC,NL,PL,PT,SM,SK,SE,CH,VA,GB,SP', 'Comma separated list of two character ISO country codes that are part of Zone 1', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 1 Shipping Table', 'MODULE_SHIPPING_DP_COST_1', '5:16.50,10:20.50,20:28.50', 'Shipping rates to Zone 1 destinations based on a range of order weights. Example: 0-3:8.50,3-7:10.50,... Weights greater than 0 and less than or equal to 3 would cost 14.57 for Zone 1 destinations.', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 2 Countries', 'MODULE_SHIPPING_DP_COUNTRIES_2', 'AL,AM,AZ,BY,BA,BG,HR,CY,GE,GI,HU,IS,KZ,LT,MK,MT,MD,NO,SI,UA,TR,YU,RU,RO,LV,EE', 'Comma separated list of two character ISO country codes that are part of Zone 2', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 2 Shipping Table', 'MODULE_SHIPPING_DP_COST_2', '5:25.00,10:35.00,20:45.00', 'Shipping rates to Zone 2 destinations based on a range of order weights. Example: 0-3:8.50,3-7:10.50,... Weights greater than 0 and less than or equal to 3 would cost 23.78 for Zone 2 destinations.', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 3 Countries', 'MODULE_SHIPPING_DP_COUNTRIES_3', 'DZ,BH,CA,EG,IR,IQ,IL,JO,KW,LB,LY,OM,SA,SY,US,AE,YE,MA,QA,TN,PM', 'Comma separated list of two character ISO country codes that are part of Zone 3', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 3 Shipping Table', 'MODULE_SHIPPING_DP_COST_3', '5:29.00,10:39.00,20:59.00', 'Shipping rates to Zone 3 destinations based on a range of order weights. Example: 0-3:8.50,3-7:10.50,... Weights greater than 0 and less than or equal to 3 would cost 26.84 for Zone 3 destinations.', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 4 Countries', 'MODULE_SHIPPING_DP_COUNTRIES_4', 'AF,AS,AO,AI,AG,AR,AW,AU,BS,BD,BB,BZ,BJ,BM,BT,BO,BW,BR,IO,BN,BF,BI,KH,CM,CV,KY,CF,TD,CL,CN,CC,CO,KM,CG,CR,CI,CU,DM,DO,EC,SV,ER,ET,FK,FJ,GF,PF,GA,GM,GH,GD,GP,GT,GN,GW,GY,HT,HN,HK,IN,ID,JM,JP,KE,KI,KG,KP,KR,LA,LS', 'Comma separated list of two character ISO country codes that are part of Zone 4', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 4 Shipping Table', 'MODULE_SHIPPING_DP_COST_4', '5:35.00,10:50.00,20:80.00', 'Shipping rates to Zone 4 destinations based on a range of order weights. Example: 0-3:8.50,3-7:10.50,... Weights greater than 0 and less than or equal to 3 would cost 32.98 for Zone 4 destinations.', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 5 Countries', 'MODULE_SHIPPING_DP_COUNTRIES_5', 'MO,MG,MW,MY,MV,ML,MQ,MR,MU,MX,MN,MS,MZ,MM,NA,NR,NP,AN,NC,NZ,NI,NE,NG,PK,PA,PG,PY,PE,PH,PN,RE,KN,LC,VC,SN,SC,SL,SO,LK,SR,SZ,ZA,SG,TG,TH,TZ,TT,TO,TM,TV,VN,WF,VE,UG,UZ,UY,ST,SH,SD,TW,GQ,LR,DJ,CG,RW,ZM,ZW', 'Comma separated list of two character ISO country codes that are part of Zone 5', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 5 Shipping Table', 'MODULE_SHIPPING_DP_COST_5', '5:35.00,10:50.00,20:80.00', 'Shipping rates to Zone 5 destinations based on a range of order weights. Example: 0-3:8.50,3-7:10.50,... Weights greater than 0 and less than or equal to 3 would cost 32.98 for Zone 5 destinations.', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 6 Countries', 'MODULE_SHIPPING_DP_COUNTRIES_6', 'DE', 'Comma separated list of two character ISO country codes that are part of Zone 6', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('DP Zone 6 Shipping Table', 'MODULE_SHIPPING_DP_COST_6', '5:6.70,10:9.70,20:13.00', 'Shipping rates to Zone 6 destinations based on a range of order weights. Example: 0-3:8.50,3-7:10.50,... Weights greater than 0 and less than or equal to 3 would cost 5.62 for Zone 6 destinations.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Countries', 'MODULE_SHIPPING_DP_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are part of Zone " . $i . ".', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Shipping Table', 'MODULE_SHIPPING_DP_COST_" . $i ."', '5:6.70,10:9.70,20:13.00', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.', '6', '0', now())"); //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Handling Fee', 'MODULE_SHIPPING_DP_HANDLING_" . $i."', '0', 'Bearbeitungsgeb�hr f�r diese Versandart in Euro', '6', '0', now())"); } } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { $keys = array('MODULE_SHIPPING_DP_STATUS', 'MODULE_SHIPPING_DP_HANDLING', 'MODULE_SHIPPING_DP_TAX_CLASS', 'MODULE_SHIPPING_DP_ZONE', 'MODULE_SHIPPING_DP_SORT_ORDER'); for ($i = 1; $i <= $this->num_dp; $i ++) { $keys[count($keys)] = 'MODULE_SHIPPING_DP_COUNTRIES_' . $i; $keys[count($keys)] = 'MODULE_SHIPPING_DP_COST_' . $i; } return $keys; } } ?> Disable shipping option.doc
  15. Joahim2509

    German sepabanktransfer Add-ons

    Hallo. I am trying to configure the sepabanktransfer Add-on from http://addons.oscommerce.com/info/7597. This is a module users who want to offer SEPA-Bank transfer as a payment method. I made all steps from the atachment file but when I whant to activate it I get an error regarding database : 1062 - Duplicate entry '' for key 'PRIMARY' insert into sepabanktransfer_bic (country, name, addresse, ort, bic, gueltig_ab) values ('AUSTRIA|ALIZEE BANK AG|RENNGASSE 6-8|VIENNA|ALBWATWWXXX|2010-11-01|\r', '', '', '', '', '') I cleared this table (sepabanktransfer_bic) but I get this error anyway. Plese giv me some advice to solve this error. Thank you
  16. Joahim2509

    German sepabanktransfer Add-ons

    Hi. I need some help. When user insert the Swift code it obtains erorr "Diese SWIFT-Nummer in lokaler DB nicht gefunden." untill it not write "XXX" after the swift code. For example the swift code is "PBNKDEFF" and user must to write "PBNKDEFFXXX". How to fix that?
  17. Joahim2509

    customer discount dont sho corect

    The problem is not in sorting but in that it dont make any exclusion from total order, it shows only the amount of %
  18. I what to integrate a gallery from wordpres in to oscommerce. Now I am trying to make first, one menu with a list of posts names from data base that a "gallery type". The selection work fine and return the result. Now I try to integrate it in other php file from oscommerce but my result return only errors. Plese help my to integrate my code into other code. This is the selection from data base and the returns from it. <?php //db parameters $localhost = '####'; $db_username = '######'; $db_password = '#######'; $db_database = '1131496_class'; //connect to the database mysql_connect($localhost, $db_username, $db_password); @mysql_select_db($db_database) or die("Unable to select database"); //get data from database -- ! $query = "Select * FROM gall_posts WHERE post_type='bw_gallery' AND post_status='publish' ORDER BY id DESC"; $query_result = mysql_query($query); $num_rows = mysql_numrows($query_result); //close database connection mysql_close(); ?> <?php //start a loop for($i=0; $i< $num_rows; $i++){ //assign data to variables, $i is the row number, which increases with each run of the loop $blog_title = mysql_result($query_result, $i, "post_title"); echo '<li><a href="#">' .$blog_title. '</a></li>'; } //end the for loop ?> and the code where I what to integrate in it is from includes/modules/boxe. I use a file with some modification on it and I want to add a meniu list to it from database where is located the database for wordpress. After That I want to make a selection from database that correspond to specific category on a specific page. But that is other point <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2013 osCommerce Released under the GNU General Public License */ class bm_gallery { var $code = 'bm_gallery'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_gallery() { $this->title = MODULE_BOXES_GALLERY_TITLE; $this->description = MODULE_BOXES_GALLERY_DESCRIPTION; if ( defined('MODULE_BOXES_GALLERY_STATUS') ) { $this->sort_order = MODULE_BOXES_GALLERY_SORT_ORDER; $this->enabled = (MODULE_BOXES_GALLERY_STATUS == 'True'); $this->group = ((MODULE_BOXES_GALLERY_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $oscTemplate; $data = '<div class="ui-widget infoBoxContainer mj-information">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_GALLERY_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <p>Lesen Sie hier was unsere Kunden über uns sagen: </p>' . ' <a href="bewertungen.php">' . 'Alle Kundenmeinungen' . '</a><br />' . ' </div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_GALLERY_STATUS'); } 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 Information Module', 'MODULE_BOXES_GALLERY_STATUS', 'True', 'Do you want to add the module to your shop?', '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, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_GALLERY_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', 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', 'MODULE_BOXES_GALLERY_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_GALLERY_STATUS', 'MODULE_BOXES_GALLERY_CONTENT_PLACEMENT', 'MODULE_BOXES_GALLERY_SORT_ORDER'); } } ?> I know that my selection and for loop function must be somewhere hear function execute() { global $oscTemplate; $data = '<div class="ui-widget infoBoxContainer mj-information">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_GALLERY_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <p>Lesen Sie hier was unsere Kunden über uns sagen: </p>' . ' <a href="bewertungen.php">' . 'Alle Kundenmeinungen' . '</a><br />' . ' </div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); }
  19. Joahim2509

    German sepabanktransfer Add-ons

    Hi, can you please help me with this function split("[:,]" , $dp_cost) to transfor it to EXPLODE function. I try but something go worig the result is not correct.
  20. Joahim2509

    German sepabanktransfer Add-ons

    ok, thenk you for your help. I will look maybe I will find other solution
  21. Joahim2509

    German sepabanktransfer Add-ons

    Thanks this lines appear to be the right one. The Warnings disappeared but the scipt dont do what its need to do :). Probably it not make a selection from database for front end, the dropdown list that need to be populated from from DB are empty in front-end. May advice me where I need to check and how if it makes an selection from DB. I think in this code go the proces but i am not sure: else { $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_SEPABT_TEXT_NOTE, 'field' => MODULE_PAYMENT_SEPABT_TEXT_BANK_INFO), array('title' => MODULE_PAYMENT_SEPABT_TEXT_BANK_OWNER, 'field' => tep_draw_input_field('sepabanktransfer_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_SEPABT_TEXT_BANK_COUNTRY, 'field' => tep_get_country_swift_list('sepabanktransfer_swift_id', $aEbtVarSet["ebt_swift_id"])), array('title' => MODULE_PAYMENT_SEPABT_TEXT_BANK_SWIFT, 'field' => tep_draw_input_field('sepabanktransfer_swift', $aEbtVarSet["ebt_swift"], 'size="36" maxlength="36"')), array('title' => MODULE_PAYMENT_SEPABT_TEXT_BANK_IBAN, 'field' => tep_draw_input_field('sepabanktransfer_iban', $aEbtVarSet["ebt_iban"], 'size="36" maxlength="36"')), array('title' => MODULE_PAYMENT_SEPABT_TEXT_BANK_NAME, //'field' => tep_draw_input_field('sepabanktransfer_name',$aEbtVarSet["ebt_name"])) 'field' => $aEbtVarSet["bt_bankname"] . tep_draw_hidden_field('customers_sepabanktransfer_name')) )); } Thenk you for your help image of fron-end https://goo.gl/photos/jskDCBYYp7EQzYJ3A
  22. Joahim2509

    German sepabanktransfer Add-ons

    Thank you for your answer. Unfortunately author dont respond to my questions, I think he dont suppor any more this Add-on. If you dont mind and can help me, I will be very thankful. This is the cod from this lines: must_alter_table = true; $fields = mysql_list_fields(DB_DATABASE, TABLE_CUSTOMERS); $columns = mysql_num_fields($fields); for ($i = 0; $i < $columns; $i++) { $field = mysql_field_name($fields, $i); if ($field == 'customers_sepabanktransfer_iban') { $must_alter_table = false; } }
  23. Joahim2509

    German sepabanktransfer Add-ons

    This error I resolved but I get other one Warning: mysql_list_fields() [function.mysql-list-fields]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /srv/disk12/1131496/www/opall.famelymoments.ro/includes/modules/payment/sepabanktransfer.php on line 450 Warning: mysql_list_fields() [function.mysql-list-fields]: A link to the server could not be established in /srv/disk12/1131496/www/opall.famelymoments.ro/includes/modules/payment/sepabanktransfer.php on line 450 Warning: mysql_num_fields() expects parameter 1 to be resource, boolean given in /srv/disk12/1131496/www/opall.famelymoments.ro/includes/modules/payment/sepabanktransfer.php on line 451 Warning: Cannot modify header information - headers already sent by (output started at /srv/disk12/1131496/www/opall.famelymoments.ro/includes/modules/payment/sepabanktransfer.php:1) in /srv/disk12/1131496/www/opall.famelymoments.ro/admin/includes/functions/general.php on line 36
  24. Joahim2509

    German sepabanktransfer Add-ons

    Now I get other error but in frontend "Call to undefined function tep_get_country_swift_list() in /srv/disk12/1131496/www/sitename/includes/modules/payment/sepabanktransfer.php on line 172"
  25. Hi. I want to configure my new Shop and I am trying to find something to give User the possibility to check how match products per page he wants to display (10/per or 50/per). Something like here http://www.modernmobel.de/buromobel/besucher-und-konferenzstuhle.html. But I can not find anything. Any help with this staff is wellkome. Thank you in advance
×