Jump to content

werkzeugladen.de

Members
  • Content count

    4
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    E. Banjanovic
  1. werkzeugladen.de

    KissIT Image Thumnailer

    Okay, i fixed it. A img { border: none; } was missing in my stylesheet.css
  2. werkzeugladen.de

    KissIT Image Thumnailer

    Hi Robert, nice Work! I like this contrib. I have a Problem with Internet Explorer. There is a black border around the thumb: Firefox does it well: Can you help me please?
  3. werkzeugladen.de

    NEW! Complete Order Editing Tool!

    Hello, i have installed this great contrib (v5.0.5 with updated installation instructions) a couple of days ago and it works fine. Thank you. I just have one problem with my discount module (http://www.oscommerce.com/community/contributions,248/ v1.1) and with the shipping quote in the order totals table. For example i change sub total from 150 to 100: Sub Total: 100.00 Shipping: 3.45 Discount 2%: -3.07 <- the discount never changes - this is 2% of 153,45 Net Amount: 103.45 <- the discount is not deducted (this is http://www.oscommerce.com/community/contributions,1926/) Tax 19%: 19.65 <- this is 19% of 103,45 Total: 123,10 <- 103,45 + 19,65 The correct values should be: Sub Total 100.00 Shipping 3.45 Discount -2.07 Net Amount 101.38 Tax 19.26 Total 120.64 I have read that there is a fix for ot_payment for older versions of order editor but i didnt manage to apply this fix to this version. The other problem is that with every change (price, quantity, add a product, delete a product) the shipping amount is reduced by 19%. 3,45 -> 2,90 -> 2,44 -> 2,05 -> 1,72 ... This is a minor problem. When i choose the shipping qoute via radio button the correct value is restored. I hope you can help me. Thank you.
  4. werkzeugladen.de

    [Contribution] Ship In Cart

    There is a Solution for Ship & Payment in Cart in the german forum http://forums.oscommerce.de/index.php?show...c=52054&hl= I'm using it by myself and it works very well. <!-- shipping_estimator //--> <table align="center"><tr valign="top"><td> <?php /* $Id: shipping_estimator.php,v Alpha 1.0 2004/12/30 13:06:45 eml Exp $ Alpha 1.0 by Nightwalker/mountain (see Install.txt for partial version history) Copyright (c) 2004 Released under the GNU General Public License */ require(DIR_WS_LANGUAGES . $language . '/modules/' . FILENAME_SHIPPING_ESTIMATOR); // Only do when something is in the cart if ($cart->count_contents() > 0) { // shipping cost require('includes/classes/http_client.php'); // shipping in basket if (isset($HTTP_GET_VARS['sid'])) { $cart_sid = $HTTP_GET_VARS['sid']; } else { $cart_sid = ''; tep_session_register('cart_sid'); } if (isset($HTTP_GET_VARS['pid'])) { $cart_pid = $HTTP_GET_VARS['pid']; } if (tep_session_is_registered('customer_id')) { // user is logged in if (isset($HTTP_POST_VARS['address_id'])) { // user changed address $sendto = $HTTP_POST_VARS['address_id']; $billto = $HTTP_POST_VARS['address_id']; } elseif (tep_session_is_registered('cart_address_id')) { // user once changed address $sendto = $cart_address_id; $billto = $cart_address_id; } else { // first timer $sendto = $customer_default_address_id; $billto = $customer_default_address_id; } // set session now $cart_address_id = $sendto; tep_session_register('cart_address_id'); // set shipping to null ! multipickup changes address to store address... $shipping=''; // include the order class (uses the sendto !) require(DIR_WS_CLASSES . 'order.php'); $order = new order; } else { // user not logged in ! if (isset($HTTP_POST_VARS['country_id'])) { // country is selected $country_info = tep_get_countries($HTTP_POST_VARS['country_id'],true); $order->delivery = array('postcode' => $HTTP_POST_VARS['zip_code'], 'country' => array('id' => $HTTP_POST_VARS['country_id'], 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => $HTTP_POST_VARS['country_id'], 'zone_id' => $HTTP_POST_VARS['state'], 'format_id' => tep_get_address_format_id($HTTP_POST_VARS['country_id'])); $cart_country_id = $HTTP_POST_VARS['country_id']; tep_session_register('cart_country_id'); $cart_zone = $HTTP_POST_VARS['zone_id']; tep_session_register('cart_zone'); $cart_zip_code = $HTTP_POST_VARS['zip_code']; tep_session_register('cart_zip_code'); } elseif (tep_session_is_registered('cart_country_id')) { // session is available $country_info = tep_get_countries($cart_country_id,true); $order->delivery = array('postcode' => $cart_zip_code, 'country' => array('id' => $cart_country_id, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => $cart_country_id, 'format_id' => tep_get_address_format_id($cart_country_id)); $order->billing = array('postcode' => $cart_zip_code, 'country' => array('id' => $cart_country_id, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => $cart_country_id, 'format_id' => tep_get_address_format_id($cart_country_id)); } else { // first timer $cart_country_id = STORE_COUNTRY; tep_session_register('cart_country_id'); $country_info = tep_get_countries(STORE_COUNTRY,true); $cart_zip_code = STORE_ZIP_CODE; tep_session_register('cart_zip_code'); $order->delivery = array('postcode' => $cart_zip_code, 'country' => array('id' => STORE_COUNTRY, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => STORE_COUNTRY, 'format_id' => tep_get_address_format_id($HTTP_POST_VARS['country_id'])); $order->billing = array('postcode' => $cart_zip_code, 'country' => array('id' => STORE_COUNTRY, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => STORE_COUNTRY, 'format_id' => tep_get_address_format_id($HTTP_POST_VARS['country_id'])); } // set the cost to be able to calculate free shipping $order->info = array('total' => $cart->show_total(), // TAX ???? 'currency' => $currency, 'currency_value'=> $currencies->currencies[$currency]['value']); } // weight and count needed for shipping $total_weight = $cart->show_weight(); $total_count = $cart->count_contents(); require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping; $quotes = $shipping_modules->quote(); $order->info['subtotal'] = $cart->total; // set selections for displaying $selected_country = $order->delivery['country']['id']; $selected_address = $sendto; // check free shipping based on order total if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true')) { switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) { case 'national': if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break; case 'international': if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break; case 'both': $pass = true; break; default: $pass = false; break; } $free_shipping = false; if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) { $free_shipping = true; include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php'); } } else { $free_shipping = false; } // begin shipping cost if (!$free_shipping && $cart->get_content_type() !== 'virtual') { if (tep_not_null($HTTP_POST_VARS['sid'])) { list($module, $method) = explode('_', $HTTP_POST_VARS['sid']); $cart_sid = $HTTP_POST_VARS['sid']; tep_session_register('cart_sid'); } elseif (tep_session_is_registered('cart_sid')) { list($module, $method) = explode('_', $cart_sid); } else { $module=""; $method=""; } if (tep_not_null($module)) { $selected_quote = $shipping_modules->quote($method, $module); if (($selected_quote[0]['error'] || !tep_not_null($selected_quote[0]['methods'][0]['cost'])) && (empty($cart_sid) == 'true')) { $selected_shipping = $shipping_modules->cheapest(); $order->info['shipping_method'] = $selected_shipping['title']; $order->info['shipping_cost'] = $selected_shipping['cost']; $order->info['total']+= $selected_shipping['cost']; } else { $order->info['shipping_method'] = $selected_quote[0]['module'].' ('.$selected_quote[0]['methods'][0]['title'].')'; $order->info['shipping_cost'] = $selected_quote[0]['methods'][0]['cost']; $order->info['total']+= $selected_quote[0]['methods'][0]['cost']; $selected_shipping['title'] = $order->info['shipping_method']; $selected_shipping['cost'] = $order->info['shipping_cost']; $selected_shipping['id'] = $selected_quote[0]['id'].'_'.$selected_quote[0]['methods'][0]['id']; } } else { $selected_shipping = $shipping_modules->cheapest(); $order->info['shipping_method'] = $selected_shipping['title']; $order->info['shipping_cost'] = $selected_shipping['cost']; $order->info['total']+= $selected_shipping['cost']; } } // virtual products use free shipping if($cart->get_content_type() == 'virtual') { $order->info['shipping_method'] = CART_SHIPPING_METHOD_FREE_TEXT . ' ' . CART_SHIPPING_METHOD_ALL_DOWNLOADS; $order->info['shipping_cost'] = 0; } if($free_shipping) { $order->info['shipping_method'] = MODULE_ORDER_TOTAL_SHIPPING_TITLE; $order->info['shipping_cost'] = 0; } $shipping = $selected_shipping; // end free shipping based on order total $info_box_contents = array(); $info_box_contents[] = array('text' => CART_SHIPPING_OPTIONS); new infoBoxHeading($info_box_contents, false, false); $ShipTxt = tep_draw_form('estimator', tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'), 'post'); $ShipTxt .= tep_draw_hidden_field('sid', $selected_shipping['id']); $ShipTxt .= '<table>'; if (sizeof($quotes)) { if (tep_session_is_registered('customer_id')) { // logged in if (CARTSHIP_SHOWIC == 'true') { $ShipTxt .= '<tr><td class="main"><b>' . CART_SHIPPING_ITEM . '</b></td><td colspan="2" class="main">' . $total_count . '</td></tr>'; } if (CARTSHIP_SHOWWT == 'true') { $ShipTxt .= '<tr><td class="main"><b>' . CART_SHIPPING_WEIGHT . '</b></td><td colspan="2" class="main">' . $total_weight . ' ' . CARTSHIP_WTUNIT . '</td></tr>'; } $addresses_query = tep_db_query("select address_book_id, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'"); // only display addresses if more than 1 if (tep_db_num_rows($addresses_query) > 1) { while ($addresses = tep_db_fetch_array($addresses_query)) { $addresses_array[] = array('id' => $addresses['address_book_id'], 'text' => tep_address_format(tep_get_address_format_id($addresses['country_id']), $addresses, 0, ' ', ' ')); } $ShipTxt .= '<tr><td colspan="3" class="main" nowrap>' . CART_SHIPPING_METHOD_ADDRESS .' '. tep_draw_pull_down_menu('address_id', $addresses_array, $selected_address, 'onchange="java script:return shipincart_submit(\'\');"').'</td></tr>'; } $ShipTxt .= '<tr valign="top"><td class="main"><b>' . CART_SHIPPING_METHOD_TO .'</b> </td><td colspan="2" class="main">'. tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>') . '</td></tr>'; } else { // not logged in $ShipTxt .= '<hr><center><b>' . CART_SHIPPING_OPTIONS_LOGIN . '</b></center><hr>'; if (CARTSHIP_SHOWIC == 'true') { $ShipTxt .= '<tr><td class="main"><b>' . CART_SHIPPING_ITEM . '</b></td><td colspan="2" class="main">' . $total_count . '</td></tr>'; } if (CARTSHIP_SHOWWT == 'true') { $ShipTxt .= '<tr><td class="main"><b>' . CART_SHIPPING_WEIGHT . '</b></td><td colspan="2" class="main">' . $total_weight . ' ' . CARTSHIP_WTUNIT . '</td></tr>'; } if ($cart->get_content_type() != 'virtual') { if (CARTSHIP_SHOWCDD == 'true') { $ShipTxt .= '<tr><td class="main" nowrap><b>' . ENTRY_COUNTRY . '</b></td>' . '<td class="main" colspan="2">' . tep_get_country_list('country_id', $selected_country,'style="width=150"'); } //add state zone_id $state_array[] = array('id' => '', 'text' => CART_SHIPPING_SELECT); $state_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '$selected_country' order by zone_country_id DESC, zone_name"); while ($state_values = tep_db_fetch_array($state_query)) { $state_array[] = array('id' => $state_values['zone_id'], 'text' => $state_values['zone_name']); } if (CARTSHIP_SHOWSDD == 'true') { $ShipTxt .= ' ' .ENTRY_STATE .' '. tep_draw_pull_down_menu('state',$state_array); } if (CARTSHIP_SHOWZDD == 'true') { $ShipTxt .= ' '.ENTRY_POST_CODE .' '. tep_draw_input_field('zip_code', $cart_zip_code, 'size="5"'); } if (CARTSHIP_SHOWUB == 'true') { $ShipTxt .= ' '. tep_image_submit('button_update_cart.gif', CART_SHIPPING_UPDATE, ''); } $ShipTxt .= '</td></tr>'; } } if ($cart->get_content_type() == 'virtual') { // virtual product-download $ShipTxt .= '<tr><td class="main" colspan="3"> </td></tr><tr><td class="main" colspan="3"><i>' . CART_SHIPPING_METHOD_FREE_TEXT . ' ' . CART_SHIPPING_METHOD_ALL_DOWNLOADS . '</i></td></tr>'; } elseif ($free_shipping == 1) { // order $total is free $ShipTxt .= '<tr><td class="main" colspan="3"> </td></tr><tr><td class="main" colspan="3"><i>' . sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . '</i></td><td> </td></tr>'; } else { // shipping display $ShipTxt .= '<tr><td colspan="4" class="main"> </td></tr><tr><td class="main"><b>' . CART_SHIPPING_CARRIER_TEXT . '</b></td><td class="main" align="left"><b>' . CART_SHIPPING_METHOD_TEXT . '</b></td><td class="main" align="right"><b>' . CART_SHIPPING_METHOD_RATES . '</b></td></tr>'; $ShipTxt .= '<tr><td colspan="4" class="main">'.tep_draw_separator().'</td></tr>'; for ($i=0, $n=sizeof($quotes); $i<$n; $i++) { if (sizeof($quotes[$i]['methods'])==1) { // simple shipping method $thisquoteid = $quotes[$i]['id'] . '_' .$quotes[$i]['methods'][0]['id']; $ShipTxt .= '<tr><td class="main">'. $quotes[$i]['icon'].' </td>'; if ($quotes[$i]['error']) { $ShipTxt .= '<td colspan="2" class="main">' . $quotes[$i]['module'].' '; $ShipTxt .= '(' . $quotes[$i]['error'] . ')</td></tr>'; } else { if ($selected_shipping['id'] == $thisquoteid) { $ShipTxt .= '<td class="main"><b>' . $quotes[$i]['module'] . ' '; $ShipTxt .= '(' . $quotes[$i]['methods'][0]['title'] . ')</b> </td>'; $ShipTxt .= '<td align="right" class="main"><b>'.$currencies->format(tep_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])).'</b></td>'; $ShipTxt .= '<td class="main"><a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'sid=' . $thisquoteid . '&pid=' . $cart_pid, 'NONSSL') . '">' . tep_image(DIR_WS_ICONS . 'selected.gif', CART_SHIPPING_SELECT) . '</a></td>'; } else { $ShipTxt .= '<td class="main">' . $quotes[$i]['module'] . ' '; $ShipTxt .= '(' . $quotes[$i]['methods'][0]['title'] . ') </td>'; $ShipTxt .= '<td align="right" class="main">'.$currencies->format(tep_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])).'</td>'; $ShipTxt .= '<td class="main"><a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'sid=' . $thisquoteid . '&pid=' . $cart_pid, 'NONSSL') . '">' . tep_image(DIR_WS_ICONS . 'unselected.gif', CART_SHIPPING_SELECT) . '</a></td>'; } } } else { // shipping method with sub methods (multipickup) for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) { $thisquoteid = $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']; $ShipTxt .= '<tr><td class="main">' . $quotes[$i]['icon'] . ' </td>'; if ($quotes[$i]['error']) { $ShipTxt .= '<td colspan="2" class="main">' . $quotes[$i]['module'] . ' '; $ShipTxt .= '(' . $quotes[$i]['error'] . ')</td></tr>'; } else { if ($selected_shipping['id'] == $thisquoteid) { $ShipTxt .= '<td class="main"><b>' . $quotes[$i]['module'] . ' '; $ShipTxt .= '(' . $quotes[$i]['methods'][$j]['title'] . ')</b> </td>'; $ShipTxt .= '<td align="right" class="main"><b>'.$currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])).'</b></td>'; $ShipTxt .= '<td class="main"><a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'sid=' . $thisquoteid . '&pid=' . $cart_pid, 'NONSSL') . '">' . tep_image(DIR_WS_ICONS . 'selected.gif', CART_SHIPPING_SELECT) . '</a></td>'; } else { $ShipTxt .= '<td class="main">' . $quotes[$i]['module'] . ' '; $ShipTxt .= '(' . $quotes[$i]['methods'][$j]['title'] . ') </td>'; $ShipTxt .= '<td align="right" class="main">'.$currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])).'</td>'; $ShipTxt .= '<td class="main"><a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'sid=' . $thisquoteid . '&pid=' . $cart_pid, 'NONSSL') . '">' . tep_image(DIR_WS_ICONS . 'unselected.gif', CART_SHIPPING_SELECT) . '</a></td>'; } } } } } } require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment; $ShipTxt .= '<tr><td colspan="4" class="main">'.tep_draw_separator().'</td></tr>'; $selection = $payment_modules->selection(); for ($i=0, $n=sizeof($selection); $i<$n; $i++) { if (empty($cart_pid)) { $cart_pid = $selection[0]['id']; tep_session_register('cart_pid'); } if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) { $ShipTxt .= '<tr><td colspan="4" class="main">' . $selection[$i]['module'] . '</td></tr>'; } else { $ShipTxt .= '<tr><td colspan="3" class="main">' . $selection[$i]['module'] . '</td>'; if ($selection[$i]['id'] == $cart_pid) { $ShipTxt .= '<td class="main"><a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'sid=' . $cart_sid . '&pid=' . $cart_pid, 'NONSSL') . '">' . tep_image(DIR_WS_ICONS . 'selected.gif', CART_SHIPPING_SELECT) . '</a></td></tr>'; } else { $ShipTxt .= '<td class="main"><a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'sid=' . $cart_sid . '&pid=' . $selection[$i]['id'], 'NONSSL') . '">' . tep_image(DIR_WS_ICONS . 'unselected.gif', CART_SHIPPING_SELECT) . '</a></td></tr>'; } } } } $ShipTxt .= '</table></form>'; if (tep_session_is_registered('payment')) tep_session_unregister('payment'); $payment = $cart_pid; $info_box_contents = array(); $info_box_contents[] = array('text' => $ShipTxt); new infoBox($info_box_contents); if (CARTSHIP_SHOWOT == 'true') { if (!tep_session_is_registered('customer_id')) { $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$order->delivery['zone_id']); $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $order->delivery['zone_id']); if (DISPLAY_PRICE_WITH_TAX == 'true') { $tax_val = (($products[$i]['final_price']/100)*$products_tax)*$products[$i]['quantity']; } else { $tax_val = (($products[$i]['final_price']*$products_tax)/100)*$products[$i]['quantity']; } $order->info['tax'] += $tax_val; $order->info['tax_groups']["$products_tax_description"] += $tax_val; if (DISPLAY_PRICE_WITH_TAX == 'true') { $order->info['total']; } else { $order->info['total']+=$tax_val; } } } require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; $order_total_modules->process(); $info_box_contents = array(); $info_box_contents[] = array('text' => CART_SHIPPING_OT); new infoBoxHeading($info_box_contents, false, false); $otTxt = '<table align="right">'; $otTxt .= $order_total_modules->output().'</table>'; $info_box_contents = array(); $info_box_contents[] = array('text' => $otTxt); new infoBox($info_box_contents); } } else { echo '<table align="center"><tr><td class="main">' . CART_SHIPPING_CART_EMPTY . '</td></tr></table>'; } ?> </td></tr></table>
×