Jump to content

dzdz

Members
  • Content count

    65
  • Joined

  • Last visited

Profile Information

  • Real Name
    Danny Li
  1. dzdz

    Master Products - MS2

    Hi, Johnson PM has been sent to you, if somehow you don't receive it, please do let me know or PM me back. ------------------------------------- Again, guys, Johnson deosn't know us, deosn't owe us anything, why he should spend so much time for us for nothing. Let's donate something. To clarify, I have no relationship with him, I don't know him at all, I am not his brother to ask for donation for him, I am from Canada. here is my website: My Webpage Thanks
  2. dzdz

    Master Products - MS2

    You are genius, Johnson, both working like a charm
  3. dzdz

    Master Products - MS2

    Thank Johnson for the great work, I think this is the most import contribution so far. I have 2 questions for this add-on, if anyone knows, please advice. 1. on the slave product list, it only takes 20 produsts, more than 20, will go to the second page, where can I change the max limit of 20 per page? 2. Is it possible to click the slave product name and link to the product detail page of the slave product (just like when we click the regular product name on the product listing page then we go the the product info page)? Any help will be greatly appreciated. BTW, if I don't have a paypal account, how do I donate to the author of this contribution? Come on guys, let's all donate something to the author to express our thanks because of his great work and help for our business, $10-20 is not a big deal for anyone, if we all do together, it will be a big encourage for the author for more help to us.
  4. I have both ?Customer pickup? and ?shipping insurance? contributions installed, the ?customer pickup? is treated as a shipping method, so when ?customer pickup? is selected, the insurance is also added to the total which is not correct. I am not good at PHP coding, I need some help to modify the code a little bit, what I need is: When the shipping cost is 0 ( which means customer will pick up ), the shipping insurance is also 0. How and where to change the code? Any help is greatly appreciated. Here is the original code for insurance. <?php /* Shipping Insurance Module ot_insurance.php, v 1.0 2003/12/03 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ class ot_insurance { var $title, $output; function ot_insurance() { $this->code = 'ot_insurance'; $this->title = MODULE_ORDER_TOTAL_INSURANCE_TITLE; $this->description = MODULE_ORDER_TOTAL_INSURANCE_DESCRIPTION; $this->enabled = MODULE_ORDER_TOTAL_INSURANCE_STATUS; $this->sort_order = MODULE_ORDER_TOTAL_INSURANCE_SORT_ORDER; $this->output = array(); } function process() { global $order, $currencies; $choose_insurance = $_SESSION['choose_insurance']; if (MODULE_ORDER_TOTAL_INSURANCE_STATUS == 'true') { switch (MODULE_ORDER_TOTAL_INSURANCE_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; } } if(($choose_insurance != '1') && (MODULE_ORDER_TOTAL_INSURANCE_USE == 'true')){ $pass = false; } // Added in by Juan Velez to stop any negative amount if ($order->info['total'] < MODULE_ORDER_TOTAL_INSURANCE_OVER) { $pass = false; } // End of add by Juan Velez if ($pass == true) { $tax = tep_get_tax_rate(MODULE_ORDER_TOTAL_INSURANCE_TAX_CLASS); $how_often = ceil(($order->info['total']- $order->info['tax'] - MODULE_ORDER_TOTAL_INSURANCE_OVER)/MODULE_ORDER_TOTAL_INSURANCE_INCREMENT); $order->info['tax'] += tep_calculate_tax((MODULE_ORDER_TOTAL_INSURANCE_FEE * $how_often), $tax); $order->info['tax_groups']["{$tax}"] += tep_calculate_tax((MODULE_ORDER_TOTAL_INSURANCE_FEE * $how_often), $tax); $this_amount = MODULE_ORDER_TOTAL_INSURANCE_FEE * $how_often; if ($this_amount < MODULE_ORDER_TOTAL_INSURANCE_MIN_CHARGE ) { $this_amount = MODULE_ORDER_TOTAL_INSURANCE_MIN_CHARGE; } $order->info['total'] += $this_amount + tep_calculate_tax(MODULE_ORDER_TOTAL_INSURANCE_FEE, $tax); $this->output[] = array('title' => $this->title . ':', 'text' => $currencies->format(tep_add_tax(($this_amount), $tax), true, $order->info['currency'], $order->info['currency_value']), 'value' => tep_add_tax(($this_amount), $tax)); } } function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_INSURANCE_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function keys() { return array('MODULE_ORDER_TOTAL_INSURANCE_STATUS', 'MODULE_ORDER_TOTAL_INSURANCE_SORT_ORDER', 'MODULE_ORDER_TOTAL_INSURANCE_USE', 'MODULE_ORDER_TOTAL_INSURANCE_OVER', 'MODULE_ORDER_TOTAL_INSURANCE_INCREMENT', 'MODULE_ORDER_TOTAL_INSURANCE_FEE', 'MODULE_ORDER_TOTAL_INSURANCE_MIN_CHARGE', 'MODULE_ORDER_TOTAL_INSURANCE_DESTINATION', 'MODULE_ORDER_TOTAL_INSURANCE_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 Shipping Insurance', 'MODULE_ORDER_TOTAL_INSURANCE_STATUS', 'true', 'Do you want to offer Shipping Insurance?', '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_ORDER_TOTAL_INSURANCE_SORT_ORDER', '4', '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 ('Customer Chooses?', 'MODULE_ORDER_TOTAL_INSURANCE_USE', 'false', 'Do you want the customer to have the choice?', '6', '3', '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, use_function, date_added) values ('Amount Exempt From Fee', 'MODULE_ORDER_TOTAL_INSURANCE_OVER', '100', 'At what total amount do you start charging insurance? For example, UPS insures amounts up to $100, so that is what you would put here.', '6', '4', 'currencies->format', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Increment Amount', 'MODULE_ORDER_TOTAL_INSURANCE_INCREMENT', '100', 'For each <b>how many dollars,</b> ie. the increment amount, of the total (e.g. 100 here and .40 for the rate below would mean 40 cents fee for every $100 of the amount to be insured).', '6', '5', 'currencies->format', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Insurance Rate', 'MODULE_ORDER_TOTAL_INSURANCE_FEE', '.40', 'The amount charged per Increment Amount above.', '6', '6', 'currencies->format', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Minimum Charge', 'MODULE_ORDER_TOTAL_INSURANCE_MIN_CHARGE', '1.20', 'The minimum amount to be charged if order is over minimum total.', '6', '7', 'currencies->format', 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 ('Apply Insurance Fee To Which Orders', 'MODULE_ORDER_TOTAL_INSURANCE_DESTINATION', 'both', 'Apply insurance fee for orders sent to the set destination.', '6', '8', 'tep_cfg_select_option(array(\'national\', \'international\', \'both\'), ', 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 Class', 'MODULE_ORDER_TOTAL_INSURANCE_TAX_CLASS', '0', 'Use the following tax class on the insurance fee.', '6', '9', '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 . ")"); } } ?>
  5. dzdz

    Master Products - MS2

    After installed master products, from the slave product table on the product info page, we will see 5 colums: Model / Description / Name+ / select / Price, I want to remove 2 colums, the Model and the Description, How to do it? Many thanks for any help
  6. dzdz

    Master Products - MS2

    I am sorry if this has been asked before. I installed a brand new store, and then installed master product 1.1.5, no error message, and then I import my existing database through mySQL, also says import successfully. but I got error message on the site, any help will be greatly appreciated. the errors are: Under new product, I got: under product list, I got:
  7. dzdz

    Canada Post Module Postal Code Illegal

    With Canadapost shipping integrated, at the chout out pages, how to include 1% insurance in the shipping charge? Please help, Thanks
  8. dzdz

    New UPS XML Shipping Module available

    Thanks for your time and great help, JanZ. I know how to hide it now. a few more problems with me, if you can help, it will be greatly appreciated. 1. Always a wierd number displayed there, the circled one, it is even there when I only enable UPS standard, now I have Standard and express enabled. 2. When checked out, the shipping charge won't add to the total(this is a out of province sale, GST only). Also, which code I should change to hide the weight on this page? 3. When the sales is provincial, won't add the shipping charge either, but will display PST and GST twice. this didn't happen before I installed the contribution, and it won't happen either if I disable this contribution now.
  9. dzdz

    New UPS XML Shipping Module available

    I have Standard, Ground, express methods enabled, when I checked out, I got this: Three questions: 1. How can I hide the weight with the red ciecle, 25lbs. 2. Why the UPS ground never shows up? 3. The Standard is cheaper than Ground? I thought the ground is the cheapest and slowest way. Am I right? Thanks
  10. dzdz

    New UPS XML Shipping Module available

    After the installation of the latest version, I activated it first, and then tried to edit it, I got an error: Fatal error: Call to undefined function: tep_cfg_select_multioption() in /var/www/html/online/admin/modules.php(212) : eval()'d code on line 1 What does thisa mean? how to solve it, please help. Thanks
  11. dzdz

    I'm new....

    Iam from Canada, when I check out, got an error from UPS option: An error occured with the UPS shipping calculations. Origin postal code must have five digits. If you prefer to use UPS as your shipping method, please contact the store owner. In Canada, we have 6 digit postal code. What should I do? Please help> Thanks
  12. dzdz

    I'm new....

    Does the built-in UPS function work for every country or only for USA? Thanks
  13. dzdz

    I'm new....

    After I installed the new ups.php code, I still got the same error, "An error occured with the UPS shipping calculations. error If you prefer to use UPS as your shipping method, please contact the store owner." I am from Canada, does this matter? I supposed it also works for Canada setting. Can somesone tell me which parts I have to configure in the control panel to make it work? PLEASE HELP!!!!! Thanks. I am from Canada
  14. dzdz

    I'm new....

    I found I have the zip code filled out already under shipping/packing, and I also have the ups.php installed. BTW, where can I get a new version of ups.php code? Thanks
  15. dzdz

    I'm new....

    I found I have the zip code filled out already under shipping/packing, and I also have the ups.php installed. BTW, where can I get a new version of ups.php code? Thanks
×