Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Mar 2006
    Location
    Auckland, New Zealand
    Posts
    245
    Plugin Contributions
    0

    help question This may seem a dumb question

    and I've already looked in Wiki... however whenever I get an error and it refers to a line number... how exactly do I find that line number when I don't know what I am looking for.

    eg: One of my shipping modules has decided to flip out... was working fine before Christmas. I don't know why it has, all I have is a reference saying it's on "line 185", and without actual line numbers I have no idea which is "line 185" or where I even start counting from... the <?php at the very top or after the @version $id...

    I copied it into WordPad to see if that helped... on full screen mode the file doesn't have 185 lines..., in my cpanel screen view line 185 is in the middle of a syntax (if that's the correct word).

    Do line's being wrapped get counted or not?

    Hence, help!
    Elemi

    The Art of Bespoke Aromatherapy
    www.AmorAromatherapy.co.nz

  2. #2
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: This may seem a dumb question

    Which shipping module is giving you problems? Have you tried uninstalling and reinstalling it?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Mar 2006
    Location
    Auckland, New Zealand
    Posts
    245
    Plugin Contributions
    0

    Default Re: This may seem a dumb question

    Hi Kim

    The shipping module page in admin currently isn't showing me those options...

    It lists the following columns across the whole screen with the error message at the very top:
    Modules, Sort Order, Action
    Elemi

    The Art of Bespoke Aromatherapy
    www.AmorAromatherapy.co.nz

  4. #4
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: This may seem a dumb question

    Did you attempt an upgrade or do any work on the site recently? Your catalog is showing a warning about patching the database.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  5. #5
    Join Date
    Mar 2006
    Location
    Auckland, New Zealand
    Posts
    245
    Plugin Contributions
    0

    Default Re: This may seem a dumb question

    No, that was done back in May last year, the day before I cracked my skull open... I reversed what I could on that with Ajeh's help however have never been able to lose that comment.

    I've done no upgrades since then, still running on 1.2.7. I set up table shipping for NZ back in December, it's been working fine until this week.
    Elemi

    The Art of Bespoke Aromatherapy
    www.AmorAromatherapy.co.nz

  6. #6
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: This may seem a dumb question

    To see the line numbers, download Crimson Editor or Text Pad. I'm not sure either will help you with this issue since it seems to have popped up suddenly.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  7. #7
    Join Date
    Mar 2006
    Location
    Auckland, New Zealand
    Posts
    245
    Plugin Contributions
    0

    Default Re: This may seem a dumb question

    Thanks, I'll try that for starters :)
    Elemi

    The Art of Bespoke Aromatherapy
    www.AmorAromatherapy.co.nz

  8. #8
    Join Date
    Mar 2006
    Location
    Auckland, New Zealand
    Posts
    245
    Plugin Contributions
    0

    help question Re: This may seem a dumb question

    ok, I've downloaded Crimson Editor... it's very cute...

    the error message I have in admin/shipping is
    Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/aroma/public_html/includes/modules/shipping/table_north_island.php on line 185

    According to Crimson Editor, line 185 is a }

    The file I am having problems with is Ajeh's table.php 3308 2006-03-29 08:21:33Z and I copied it and saved it as table_north_island.php as I found written somewhere to do for our courier system here.

    Any ideas anyone? And if not, how do I unstall it when that option isn't currently being shown on my admin screen?
    Elemi

    The Art of Bespoke Aromatherapy
    www.AmorAromatherapy.co.nz

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: This may seem a dumb question

    Calling it table_something_something will cause a conflict with table ...

    Try calling it:
    tablenorthisland.php

    Change all table to tablenorthisland and TABLE to TABLENORTHISLAND

    NOTE: becareful of the word TABLE as that is a real word in php and you want to only replace to code related to the shipping variables and constants and not the php code that needs the word TABLE in it ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Mar 2006
    Location
    Auckland, New Zealand
    Posts
    245
    Plugin Contributions
    0

    Default Re: This may seem a dumb question

    Hi Linda

    I've made the changes as follows... however I think I've stuffed something up as I now get more error messages on the shipping module page

    <?php
    /**
    * @package shippingMethod
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tablenorthisland.php 3308 2007-01-23 08:21:33Z elemi $
    */
    /**
    * Enter description here...
    *
    */
    class table extends base {
    /**
    * Enter description here...
    *
    * @var unknown_type
    */
    var $code;
    /**
    * Enter description here...
    *
    * @var unknown_type
    */
    var $title;
    /**
    * Enter description here...
    *
    * @var unknown_type
    */
    var $description;
    /**
    * Enter description here...
    *
    * @var unknown_type
    */
    var $icon;
    /**
    * Enter description here...
    *
    * @var unknown_type
    */
    var $enabled;
    /**
    * Enter description here...
    *
    * @return table
    */
    function table() {
    global $order, $db;

    $this->code = 'tablenorthisland';
    $this->title = MODULE_SHIPPING_TABLE_TEXT_TITLE;
    $this->description = MODULE_SHIPPING_TABLE_TEXT_DESCRIPTION;
    $this->sort_order = MODULE_SHIPPING_TABLE_SORT_ORDER;
    $this->icon = '';
    $this->tax_class = MODULE_SHIPPING_TABLE_TAX_CLASS;
    $this->tax_basis = MODULE_SHIPPING_TABLE_TAX_BASIS;
    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
    $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
    }

    if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_TABLENORTHISLAND_ZONE > 0) ) {
    $check_flag = false;
    $check = $db->Execute("select zone_id from " . TABLENORTHISLAND_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_TABLENORTHISLAND_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
    while (!$check->EOF) {
    if ($check->fields['zone_id'] < 1) {
    $check_flag = true;
    break;
    } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
    $check_flag = true;
    break;
    }
    $check->MoveNext();
    }

    if ($check_flag == false) {
    $this->enabled = false;
    }
    }
    }
    /**
    * Enter description here...
    *
    * @param unknown_type $method
    * @return unknown
    */
    function quote($method = '') {
    global $order, $shipping_weight, $shipping_num_boxes;

    // shipping adjustment
    if (MODULE_SHIPPING_TABLENORTHISLAND_MODE == 'price') {
    $order_total = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices() ;
    } else {
    $order_total = $shipping_weight;
    }

    $tablenorthisland_cost = split("[:,]" , MODULE_SHIPPING_TABLENORTHISLAND_COST);
    $size = sizeof($tablenorthisland_cost);
    for ($i=0, $n=$size; $i<$n; $i+=2) {
    if ($order_total <= $tablenorthisland_cost[$i]) {
    $shipping = $tablenorthisland_cost[$i+1];
    break;
    }
    }

    if (MODULE_SHIPPING_TABLENORTHISLAND_MODE == 'weight') {
    $shipping = $shipping * $shipping_num_boxes;
    // show boxes if weight
    switch (SHIPPING_BOX_WEIGHT_DISPLAY) {
    case (0):
    $show_box_weight = '';
    break;
    case (1):
    $show_box_weight = ' (' . $shipping_num_boxes . ' ' . TEXT_SHIPPING_BOXES . ')';
    break;
    case (2):
    $show_box_weight = ' (' . number_format($shipping_weight * $shipping_num_boxes,2) . TEXT_SHIPPING_WEIGHT . ')';
    break;
    default:
    $show_box_weight = ' (' . $shipping_num_boxes . ' x ' . number_format($shipping_weight,2) . TEXT_SHIPPING_WEIGHT . ')';
    break;
    }
    }

    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_TABLENORTHISLAND_TEXT_TITLE . $show_box_weight,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_TABLENORTHISLAND_TEXT_WAY,
    'cost' => $shipping + MODULE_SHIPPING_TABLENORTHISLAND_HANDLING)));

    if ($this->tax_class > 0) {
    $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    }

    if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);

    return $this->quotes;
    }
    /**
    * Enter description here...
    *
    * @return unknown
    */
    function check() {
    global $db;
    if (!isset($this->_check)) {
    $check_query = $db->Execute("select configuration_value from " . TABLENORTHISLAND_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_TABLENORTHISLAND_STATUS'");
    $this->_check = $check_query->RecordCount();
    }
    return $this->_check;
    }
    /**
    * Enter description here...
    *
    */
    function install() {
    global $db;
    $db->Execute("insert into " . TABLENORTHISLAND_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable Table Method', 'MODULE_SHIPPING_TABLENORTHISLAND_STATUS', 'True', 'Do you want to offer table rate shipping?', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
    $db->Execute("insert into " . TABLENORTHISLAND_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Shipping Table', 'MODULE_SHIPPING_TABLENORTHISLAND_COST', '25:8.50,50:5.50,10000:0.00', 'The shipping cost is based on the total cost or weight of items. Example: 25:8.50,50:5.50,etc.. Up to 25 charge 8.50, from there to 50 charge 5.50, etc', '6', '0', 'zen_cfg_textarea(', now())");
    $db->Execute("insert into " . TABLENORTHISLAND_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Table Method', 'MODULE_SHIPPING_TABLENORTHISLAND_MODE', 'weight', 'The shipping cost is based on the order total or the total weight of the items ordered.', '6', '0', 'zen_cfg_select_option(array(\'weight\', \'price\'), ', now())");
    $db->Execute("insert into " . TABLENORTHISLAND_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_TABLENORTHISLAND_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())");
    $db->Execute("insert into " . TABLENORTHISLAND_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_TABLENORTHISLAND_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");
    $db->Execute("insert into " . TABLENORTHISLAND_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Tax Basis', 'MODULE_SHIPPING_TABLENORTHISLAND_TAX_BASIS', 'Shipping', 'On what basis is Shipping Tax calculated. Options are<br />Shipping - Based on customers Shipping Address<br />Billing Based on customers Billing address<br />Store - Based on Store address if Billing/Shipping Zone equals Store zone', '6', '0', 'zen_cfg_select_option(array(\'Shipping\', \'Billing\', \'Store\'), ', now())");
    $db->Execute("insert into " . TABLENORTHISLAND_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_TABLENORTHISLAND_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
    $db->Execute("insert into " . TABLENORTHISLAND_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_TABLENORTHISLAND_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
    }
    /**
    * Enter description here...
    *
    */
    function remove() {
    global $db;
    $db->Execute("delete from " . TABLENORTHISLAND_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
    }
    /**
    * Enter description here...
    *
    * @return unknown
    */
    function keys() {
    return array('MODULE_SHIPPING_TABLENORTHISLAND_STATUS', 'MODULE_SHIPPING_TABLENORTHISLAND_COST', 'MODULE_SHIPPING_TABLENORTHISLAND_MODE', 'MODULE_SHIPPING_TABLENORTHISLAND_HANDLING', 'MODULE_SHIPPING_TABLENORTHISLAND_TAX_CLASS', 'MODULE_SHIPPING_TABLENORTHISLAND_TAX_BASIS', 'MODULE_SHIPPING_TABLENORTHISLAND_ZONE', 'MODULE_SHIPPING_TABLENORTHISLAND_SORT_ORDER');
    }
    }
    ?>

    New Error messages are:
    Warning: include(/home/aroma/public_html/includes/languages/english/modules/shipping/tablenorthisland.php) [function.include]: failed to open stream: No such file or directory in /home/aroma/public_html/admin/modules.php on line 188

    Warning: include() [function.include]: Failed opening '/home/aroma/public_html/includes/languages/english/modules/shipping/tablenorthisland.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aroma/public_html/admin/modules.php on line 188

    Fatal error: Cannot redeclare class table in /home/aroma/public_html/includes/modules/shipping/tablenorthisland.php on line 185


    And I can't seem to find any corresponding info in the modules.php file.... "ARRGGGHHHH!" she says slowly tearing her hair out
    Elemi

    The Art of Bespoke Aromatherapy
    www.AmorAromatherapy.co.nz

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. This may seem odd, but can anyone tell me how to configure ZC to add to cart at zero
    By rivodaddy in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 Sep 2010, 12:49 AM
  2. Replies: 3
    Last Post: 7 Apr 2008, 05:44 PM
  3. dumb question
    By zas in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 12
    Last Post: 16 Mar 2007, 04:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg