Jump to content

solosc

Members
  • Content count

    10
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Sebastiaan
  1. Thanks Ken. I did what you said. I put the "add the category parent name to the beginning of the category URLs" to false and then did a reset. It worked. So, by setting it to false it did show the correct SEO url for categories ...com/dvd-c1.html Very strange, because I would expect that if set to false it doesn't do that and it will show the standard url. So in the original shop I have to set it to true (always has been) and now in the new shop it should be set to false. Anyway thanks for the quick suggestion!
  2. Hi there, I've been using this Ultimate SEO for several years now on oscommerce 2.2 and worked EXCELLENT. Currently, I'm in progress to upgrade the shop from MS2.2 to RC2a and thus also from php 4 and sql 4 to php 5 and mysql 5. On this new server also the SEO seems to work fine except for the categories. Just to provide some background details - created shop on new server (copy files and upgrade them accordingly) - imported the original database from Live shop to the new RC2a shop. - checked SEO (I did some things around turning SEO off and on and also the reset option). It seemed to work because the products are shown as ....com/product-name-1.html (instead the dynamic php) and also the manufacturers look fine. - In admin all the cache options are set to true. Only the "add cpath..", "remove non-alpha..." and "reset SEO cache" are set to false just like in original shop. However, the categories are shown as ....com/-c-1.html and as ....com/-c-2.html for example instead of ....com/categoryname-c-1.html Could someone tell me what are the correct steps to follow when you want to enable SEO on a "new" shop as described above please? e.g. Do I actually need to turn SEO off and on or use the reset? Or is there another reason why only the categories-part is not working.
  3. Just to let you know that I managed to fix the issue. I went through the process of comparing my RC2a files (checkout_payment, confirmation, process and success) with the official RC2a download package. I could not really find big differences except for a custom payment module that I have implemented some years ago. I got the feeling that this must cause the difference between working well in other environments except mine. So, I deleted everything and put back original code and now it works !!!! I have also found a more recent contrib for that payment module so now everything works! So nothing wrong with the upgrade or ot_fixed_payment_chg.php, it was just a custom payment module which got outdated with this RC2a release. :rolleyes:
  4. I've tried to compare but it seems the original file of this contrib and the file I've got in my Live shop differs a lot. I have no clue what to change because the two functions you mentioned earlier to modify are different or doesn't exist in my file used in Live shop. I've checked many other contribs but none of them are suitable or do not work either. Guess I have to stick with the ot_fixed_payment_chg.php file I have in my live shop. I would therefore very much appreciate if you could have another look at this file (below) and come up with any suggestions. Hope you can simulate this in your test environment to see what code is not good for 2.2 RC2a. <?php /* $Id: ot_fixed_payment_chg.php,v 1.6 2006/04/12 13:47:12 wilt Exp $ ----- Update by Carsten Thinius, thinius@gmx.de Description: - new configuration field with opportunity to set the fee-description in dependence of chosen payment method (shown in checkout_confirmation.php and Admin/Orders/Details) - bugfix: tax is now calculated & displayed correctly in checkout_confirmation.php and Admin/Orders/Details ----- osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ class ot_fixed_payment_chg { var $title, $output; function ot_fixed_payment_chg() { global $payment; $this->code = 'ot_fixed_payment_chg'; $this->title = MODULE_FIXED_PAYMENT_CHG_TITLE; $this->description = MODULE_FIXED_PAYMENT_CHG_DESCRIPTION; // bol ct: dynamic title/description of fee if (isset($payment)) { $table = split("[:,]" , MODULE_FIXED_PAYMENT_CHG_TYPE_DESCRIPTION); for ($i = 0; $i < count($table); $i+=2) { if ($payment == $table[$i]) { $this->title = $table[$i+1]; $this->description = $table[$i+1]; } } } // eol ct: dynamic title/description of fee $this->enabled = MODULE_FIXED_PAYMENT_CHG_STATUS; $this->sort_order = MODULE_FIXED_PAYMENT_CHG_SORT_ORDER; $this->type = MODULE_FIXED_PAYMENT_CHG_TYPE; $this->tax_class = MODULE_FIXED_PAYMENT_CHG_TAX_CLASS; $this->output = array(); } function process() { global $order, $ot_subtotal, $currencies; $od_amount = $this->calculate_charge($this->get_order_total()); if ($od_amount != 0) { $this->deduction = $od_amount; $this->output[] = array('title' => $this->title . ':', 'text' => $currencies->format($od_amount), 'value' => $od_amount); $order->info['total'] = $order->info['total'] + $od_amount; if ($this->sort_order < $ot_subtotal->sort_order) { $order->info['subtotal'] = $order->info['subtotal'] - $od_amount; } } } function calculate_charge($amount) { global $order, $customer_id, $payment; $od_amount=0; $table = split("[:,]" , MODULE_FIXED_PAYMENT_CHG_TYPE); for ($i = 0; $i < count($table); $i+=3) { if ($payment == $table[$i]) { $od_am_fixed=$table[$i+1]; $od_am_percentage=$table[$i+2]; // use either a fixed amount or percentage of total incl. shipping if (substr($od_am_percentage,0,1) == '%') { $od_am_percentage=substr($od_am_percentage, 1); $od_am_percentage=round($amount/100*$od_am_percentage,2); // choose the decimal position for rounding $table[$i+2]=$od_am_percentage; } if (MODULE_FIXED_PAYMENT_CHG_TAX_CLASS > 0) { $tod_rate = tep_get_tax_rate(MODULE_FIXED_PAYMENT_CHG_TAX_CLASS); $tod_description = tep_get_tax_description(MODULE_FIXED_PAYMENT_CHG_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']); $tod_amount = tep_calculate_tax($od_am_fixed + $od_am_percentage, $tod_rate); $order->info['tax'] += $tod_amount; $order->info['tax_groups'][$tod_description] += tep_calculate_tax($table[$i+1] + $table[$i+2], $tod_rate); } if (DISPLAY_PRICE_WITH_TAX) { $od_amount = $od_am_fixed + $od_am_percentage + $tod_amount; } else { $od_amount = $od_am_fixed + $od_am_percentage; $order->info['total'] += $tod_amount; } } } return $od_amount; } function get_order_total() { global $order, $cart; $order_total = $order->info['total']; // Check if gift voucher is in cart and adjust total $products = $cart->get_products(); for ($i=0; $i<sizeof($products); $i++) { $t_prid = tep_get_prid($products[$i]['id']); $gv_query = tep_db_query("select products_price, products_tax_class_id, products_model from " . TABLE_PRODUCTS . " where products_id = '" . $t_prid . "'"); $gv_result = tep_db_fetch_array($gv_query); if (ereg('^GIFT', addslashes($gv_result['products_model']))) { $qty = $cart->get_quantity($t_prid); $products_tax = tep_get_tax_rate($gv_result['products_tax_class_id']); if ($this->include_tax =='false') { $gv_amount = $gv_result['products_price'] * $qty; } else { $gv_amount = ($gv_result['products_price'] + tep_calculate_tax($gv_result['products_price'],$products_tax)) * $qty; } $order_total=$order_total - $gv_amount; } } 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_FIXED_PAYMENT_CHG_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function keys() { return array('MODULE_FIXED_PAYMENT_CHG_STATUS', 'MODULE_FIXED_PAYMENT_CHG_SORT_ORDER', 'MODULE_FIXED_PAYMENT_CHG_TYPE', 'MODULE_FIXED_PAYMENT_CHG_TYPE_DESCRIPTION', 'MODULE_FIXED_PAYMENT_CHG_TAX_CLASS'); } 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 ('Toon betaalmethode toeslag', 'MODULE_FIXED_PAYMENT_CHG_STATUS', 'true', 'Wilt u de betaalmethode toeslag laten zien?', '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 ('Sorteervolgorde', 'MODULE_FIXED_PAYMENT_CHG_SORT_ORDER', '10', 'Sorteervolgorde', '6', '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 ('Kortingspercentage', 'MODULE_FIXED_PAYMENT_CHG_AMOUNT', '2', 'Kortingsbedrag', '6', '7', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Betaalmethode', 'MODULE_FIXED_PAYMENT_CHG_TYPE', 'moneyorder:5:%0,cod:50:%10', 'Betaalmethoden waar u een toeslag over wilt heffen', '6', '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 ('Betaalmethode toeslag beschrijving', 'MODULE_FIXED_PAYMENT_CHG_TYPE_DESCRIPTION', 'moneyorder:Overboeking Transactiekosten,cod:Rembours Transactiekosten', 'Beschrijving voor elke betalingsmethode', '6', '3', 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 ('Belasting', 'MODULE_FIXED_PAYMENT_CHG_TAX_CLASS', '0', 'Hef de volgende belasting klasse over de betaalmethode toeslag', '6', '6', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', 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 . ")"); } } ?> Just to clarify that this file works without problems in oscommerce 2.2 and allows me based on payment method to add fixed fee (and/or % which I'm not using) to the order total page. In RC2a the fee is doubled (refer to my original posting). many thanks in advance!
  5. Hi Jan, yes I found the two missing curly braces. I even added the entry to the db (order_total_installed) but still doesn't work. However, it seems that this version is really different from the file I have in my Live shop. Because in my Live shop the entry only appears if particular payment module is selected (currently the line is displayed on checkout page for every payment method which is wrong) and also I'm able to put a fixed amount instead of a percentage while now I can only enter percentage. The configuration variables in admin are different as well. So for some reason I've got a different ot_fixed_payment_chg.php despite that the file names is called the same (also header). I think I have to compare the files or find the REAL contrib that covers my module that I have in my Live shop. Thanks for you help. I'll let you know once I've got it working or if I get stuck there as well. Will come back to you. Give me a few days.
  6. Hope you can help ánd it's easy to resolve...
  7. I noticed that the ot_fixed_payment_chg.php file I have been using is different, so just to be sure I downloaded the contrib again and first followed the instructions. Installed ok, but not displayed on checkout_confirmation. Once I complete your steps (especially the proposed change in ot_fixed_payment_chg.php) I get error in admin: Parse error: syntax error, unexpected $end in /home/id03648/domains/wuite.net/public_html/includes/modules/order_total/ot_fixed_payment_chg.php on line 164 in the order total overview page. One step I didn't do yet and that is "added to the configuration value for MODULE_ORDER_TOTAL_INSTALLED". Could you tell me how this entry should look like exactly please? Not sure if this is the cause for the above error. My ot_fixed_payment_chg.php looks like this now: <?php /* $Id: ot_fixed_payment_chg.php,v 2.1 2006 xaglo Exp $ * Order total module that displays the fee related to the payment type. * A method exists to allow the display of the fee from the payment type page osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2004 osCommerce Released under the GNU General Public License * Modified by rigadin@osc-help.net to get it working with tax class * Modified by Giovanni Putignano (gputignano@tiscali.it), now display taxes correctly. */ class ot_fixed_payment_chg { var $title, $output; function ot_fixed_payment_chg() { $this->code = 'ot_fixed_payment_chg'; $this->title = MODULE_FIXED_PAYMENT_CHG_TITLE; $this->description = MODULE_FIXED_PAYMENT_CHG_DESCRIPTION; $this->enabled = MODULE_FIXED_PAYMENT_CHG_STATUS; $this->sort_order = MODULE_FIXED_PAYMENT_CHG_SORT_ORDER; $this->type = MODULE_FIXED_PAYMENT_CHG_TYPE; $this->tax_class = MODULE_FIXED_PAYMENT_CHG_TAX_CLASS; $this->output = array(); } function process() { global $order, $ot_subtotal, $currencies; $od_amount = $this->calculate_credit(); if ($od_amount != 0) { $this->deduction = $od_amount; $this->output[] = array('title' => $this->title . ':', 'text' => $currencies->format($od_amount), 'value' => $od_amount); $order->info['total'] = $order->info['total'] + $od_amount; } } function calculate_credit() { global $order, $customer_id, $payment; $od_amount=0; $table = split("[:,]" , MODULE_FIXED_PAYMENT_CHG_TYPE); for ($i = 0; $i < count($table); $i+=3) { if ($payment == $table[$i]) { $od_min_fee=$table[$i+1]; $od_fee = $table[$i+2] * $order->info['subtotal']; if ($od_min_fee < $od_fee) { $od_am = $od_fee; } else { $od_am = $od_min_fee; } if (MODULE_FIXED_PAYMENT_CHG_TAX_CLASS > 0) { // If tax class is defined, get the tax rate according to delivery country and zone // $tod_rate = tep_get_tax_rate(MODULE_FIXED_PAYMENT_CHG_TAX_CLASS); // Amended for tax calculation fix $tod_rate = tep_get_tax_rate(MODULE_FIXED_PAYMENT_CHG_TAX_CLASS,$order->delivery['country']['id'], $order->delivery['zone_id']); // Added for tax fix $tax_description = tep_get_tax_description(MODULE_FIXED_PAYMENT_CHG_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']); if ($od_min_fee < $od_fee) { if (DISPLAY_PRICE_WITH_TAX=="true") { $tod_amount = tep_calculate_tax($od_am / (1 + ($tod_rate / 100)), $tod_rate); $order->info['tax_groups']["$tax_description"] += tep_calculate_tax($od_am / (1 + ($tod_rate / 100)), $tod_rate); } else { $tod_amount = tep_calculate_tax($od_am, $tod_rate); $order->info['tax_groups']["$tax_description"] += tep_calculate_tax($od_am, $tod_rate); $order->info['total'] += $tod_amount; } $od_amount = $od_am; } else { $tod_amount = tep_calculate_tax($od_am, $tod_rate); $order->info['tax_groups']["$tax_description"] += tep_calculate_tax($od_am, $tod_rate); if (DISPLAY_PRICE_WITH_TAX=="true") { $od_amount = $od_am + $tod_amount; } else { $od_amount = $od_am; } } } return $od_amount; } function get_payment_cost($pay_type) { global $order; $od_amount=0; $table = split("[:,]" , MODULE_FIXED_PAYMENT_CHG_TYPE); for ($i = 0; $i < count($table); $i+=3) { if ($pay_type == $table[$i]) { $od_min_fee=$table[$i+1]; $od_fee = $table[$i+2] * $order->info['subtotal']; if ($od_min_fee < $od_fee) { $od_am = $od_fee; } else { $od_am = $od_min_fee; } if (MODULE_FIXED_PAYMENT_CHG_TAX_CLASS > 0) { $tod_rate = tep_get_tax_rate(MODULE_FIXED_PAYMENT_CHG_TAX_CLASS,$order->delivery['country']['id'], $order->delivery['zone_id']); if ($od_min_fee < $od_fee) { if (DISPLAY_PRICE_WITH_TAX=="true") { $tod_amount = tep_calculate_tax($od_am / (1 + ($tod_rate / 100)), $tod_rate); } else { $tod_amount = tep_calculate_tax($od_am, $tod_rate); } $od_amount = $od_am; } else { $tod_amount = tep_calculate_tax($od_am, $tod_rate); if (DISPLAY_PRICE_WITH_TAX=="true") { $od_amount = $od_am + $tod_amount; } else { $od_amount = $od_am; } } } return $od_amount; } function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_FIXED_PAYMENT_CHG_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function keys() { return array('MODULE_FIXED_PAYMENT_CHG_STATUS', 'MODULE_FIXED_PAYMENT_CHG_SORT_ORDER', 'MODULE_FIXED_PAYMENT_CHG_TYPE', 'MODULE_FIXED_PAYMENT_CHG_TAX_CLASS'); } 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 fee', 'MODULE_FIXED_PAYMENT_CHG_STATUS', 'true', 'Display fee related to the payment type', '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_FIXED_PAYMENT_CHG_SORT_ORDER', '3', 'Display sort order.', '6', '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 ('Fee for payment type', 'MODULE_FIXED_PAYMENT_CHG_TYPE', 'cod:2.70:0.035,paypal_ipn:0:0.03', 'Payment methods with minimal fee (any) and normal fee (0 to 1, 1 is 100%) all splitted by colons, enter like this: [cod:xx:0.yy,paypal_ipn:xx:0.yy] ', '6', '2', 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 ('Tax', 'MODULE_FIXED_PAYMENT_CHG_TAX_CLASS', '0', 'Use the following tax class:', '6', '6', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())"); } /* Si vous désirez installer ce module en francais, remplacer la function "install" par celle-ci: 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 ('Afficher les frais', 'MODULE_FIXED_PAYMENT_CHG_STATUS', 'true', 'Afficher les frais en fonction du type de mode de paiement', '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 ('Ordre', 'MODULE_FIXED_PAYMENT_CHG_SORT_ORDER', '3', 'Ordre d\'affichage.', '6', '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 ('Frais du type de paiement', 'MODULE_FIXED_PAYMENT_CHG_TYPE', 'contremb:9:0.05', 'Frais à ajouter au paiement, de la forme [cod:xx:0.yy,moneyorder:xx:0.yy] ', '6', '2', 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 ('Taxes', 'MODULE_FIXED_PAYMENT_CHG_TAX_CLASS', '0', 'Utiliser la classe de taxe suivante.', '6', '6', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', 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 . ")"); } } ?>
  8. I tried several other contribs. Some of them didn't allow to enter a fixed amount/fee only (just a percentage). The only other contrib that seems to allow this is: http://addons.oscommerce.com/info/801 However, after having it installed I have exactly the same problem. Seems to be R2a issue. Just suprised that this hasn't been fixed in meantime. It's quite annoying because I can't continue the upgrade if I can't use an order total module that allows to add a fixed fee. I'll try to reverse the R2a upgrade steps of the checkout_confirmation page only and leave others as they are. Alternatively someone could check the code. Unfortunately I'm not a programmer. Any help is appreciated of course! Should this issue be logged as a bug of R2a?
  9. thanks anyway. I noticed the comments in that support thread and it's suggested to use an alternative contrib. I'll try this. At least the issue can be marked as related to the contrib and not to the upgrade I've done.
  10. Hi, I have managed to follow your instructions and completed all the steps. Thank you very much for putting this together! Everything works, except for one thing. On the checkout_confirmation page the amount for a fixed payment charge (module: http://www.oscommerce.com/community/contributions,4125) is doubled. This is an Order Total module contrib. If I choose any shipping or payment combination it does work as expected. However, as soon as I choose the payment option which triggers this order total module it duplicates the amount. Example: shopping cart (free payment method chosen) item 1: 50.00 item 2: 50.00 subtotal: 100.00 shipping: 5.00 total: 105.00 Now I choose a payment method that adds a fee of 7.50 (setup in admin as order total): shopping cart item 1: 50.00 item 2: 50.00 subtotal: 100.00 shipping: 5.00 payment fee: 7.50 total: 120.00 You see, although the payment fee shows as 7.50 (as maintained in admin, order total module) the total is increased by twice this fee (7.50x2=15.00). This only happens in my new upgraded store after I completed all the steps. I'm just wondering if you or any one has any idea? Is it something that is changed in checkout_confirmation.php, order.php or shoppingcart.php ? Or do I need to change coding of this order total module contrib (not desired) and besides it only occurs now after I upgraded. I do hope someone can just tell me where the cause for this issue occurs, so that I can reverse that part (if possible) or check whether I indeed followed exactly the instructions. Thanks!
×