Results 1 to 10 of 14

Hybrid View

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

    Default Re: Unable to select an action in Shipping Module

    The code change to count for 1 particular Product and add to the charge is the code changes shown in RED where the products_id is 27 and add $14.95 to the charges ...

    Code:
              $cost = preg_replace('/[^0-9.]/', '',  $cost);
    
    
    // bof: add Rake charge
    $chk_rakes = 0;
    $chk_rakes = $_SESSION['cart']->in_cart_check('products_id', '27');
    $chk_rakes = $chk_rakes * 14.95;
    
              $methods[] = array('id' => $type,
                                 'title' => $title,
                                 'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) + $chk_rakes );
    // eof: add Rake charge
    If you are getting errors, first take out the changes and make sure the usps shipping module is working and that no more debug logs are created when you go to the Modules ... Shipping ...

    Next, check for the products_id of the Product you want to add the extra charge ...
    Last edited by Ajeh; 24 Jun 2011 at 04:30 PM.
    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!

  2. #2
    Join Date
    Apr 2010
    Posts
    41
    Plugin Contributions
    0

    Default Re: Unable to select an action in Shipping Module

    Here's what I did:

    Took the code you gave me back out of the UPS.php file and re-uploaded.

    Went to Modules / Shipping in ZenCart and I was able to interact with the window (make edits, etc.) Looked good... no error logs in the cache.

    Got the product ID for the Rake (#190) from Product/Categories/Products - and replaced the '27' with '190' in the lines you gave me - and reinserted them into the UPS.php and re-uploaded.

    Not only can I not interact with the Shipping Tables under Modules, if I buy ANY product on the website, it does NOT ADD shipping or taxes to the item - not to the Rake and not to any other item.

    Here is the updated Error Log from the cache (more recent - includes code for the rake with correct item number):

    [24-Jun-2011 07:34:47] PHP Fatal error: Call to a member function in_cart_check() on a non-object in /home/weedmat/waterweedmat.com/ZenCart/includes/modules/shipping/ups.php on line 469

    Ajeh, I know I'm a pain in the neck because I am not familiar with PHP and am not a programmer, but I appreciate your help. When you send me instructions, it would really help me understand if you would finish your sentences (connect the dots) because I'm a real idiot when it comes to this stuff. I am happy and willing to compensate for your time as much as I am able. Thanks for your help.

    Marlene

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

    Default Re: Unable to select an action in Shipping Module

    First, add below the line:
    Code:
    // bof: add Rake charge
    Code:
    global $cart;
    Next, this code is for the USPS shipping module so be sure you adapted the code for:

    Code:
            $methods[] = array('id' => $type,
                               'title' => $this->types[$type],
                               'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_HANDLING)  + $chk_rakes);
    NOTE: slight edit to last post on position of:
    + $chk_rakes
    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!

  4. #4
    Join Date
    Apr 2010
    Posts
    41
    Plugin Contributions
    0

    Default Re: Unable to select an action in Shipping Module

    Added/edited USP.php (LOL!.. not USPS that you keep calling it).
    as follows:
    }
    if (empty($returnval)) $returnval = $errorret;

    return $returnval;
    }
    }

    ******** beginning of edit **************

    Line 467: // bof: add Rake charge
    Line 468: global $cart;
    Line 469:
    Line 470:
    Line 471: $chk_rakes = 0;
    Line 472: $chk_rakes = $_SESSION['cart']->in_cart_check('products_id', '190');
    $chk_rakes = $chk_rakes * 14.95;
    $methods[] = array('id' => $type,
    'title' => $this->types[$type],
    'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_HANDLING) + $chk_rakes);
    // eof: add Rake charge

    re-uploaded - refreshed - Shipping Module still not interactive.

    Back to FTP to open new error log... here's the error:

    [24-Jun-2011 08:43:54] PHP Fatal error: Call to a member function in_cart_check() on a non-object in /home/weedmat/waterweedmat.com/ZenCart/includes/modules/shipping/ups.php on line 472

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

    Default Re: Unable to select an action in Shipping Module

    In a clean copy of ups.php ... search for the line of code:
    Code:
    $cost = preg_replace('/[^0-9.]/', '',  $cost);
    This code goes where that code is and the BLACK code already exists ...

    The RED code is the NEW code to add ...

    I think you are putting this in the wrong place ...
    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!

  6. #6
    Join Date
    Apr 2010
    Posts
    41
    Plugin Contributions
    0

    Default Re: Unable to select an action in Shipping Module

    OK, yes... that was it. I did not have the code in the right place - at least I am not getting any errors and I have access to editing in the SHIPPING MODULES table....

    HOWEVER, Shipping rates (none of them) are being added to any product at checkout. I don't think it's this particular file, but probably an error in the way I original set up my UPS shipping and/or the Shipping Module.

    Is there a tutorial that explains STEP-BY-STEP, how to set up UPS shipping for 1. USA only 2. Tax in New York based on shipping address?

    Thanks again for all your help.
    Marlene

  7. #7
    Join Date
    Apr 2010
    Posts
    41
    Plugin Contributions
    0

    Default Re: Unable to select an action in Shipping Module

    Any way you can delete this obsolete thread? The owner of water weed mat.com is concerned about security of the site and since this is 6 years old, I doubt it has any value to anyone. The page appears when doing a search on water weed mat. Thank you... Marlene.

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Unable to select an action in Shipping Module

    Quote Originally Posted by MarleneF View Post
    Any way you can delete this obsolete thread? The owner of water weed mat.com is concerned about security of the site and since this is 6 years old, I doubt it has any value to anyone. The page appears when doing a search on water weed mat. Thank you... Marlene.
    I'm not one of the Zen team, and couldn't delete this thread even if I wanted to.

    What I can tell you though is that if the owner has security concerns then he/she should be addressing those concerns, and not trying to 'hide' them. There is a common saying among us security pros', and it goes like this 'Security by obscurity is worse than no security at all'. Another being 'security through obscurity is an illusion'

    OK, so what if we do ignore the idioms, and this thread is deleted - It will still be found in Google and a zillion other sites with cached copies, and there's nothing can be done about that. Sure, it may make you (and your customer) *feel* safer if this thread didn't exist, just like an ostrich with its head in the sand also feels safe (I assume).

    You, or the site owner actually have far more serious concerns to consider at the moment. Not only has Zencart moved on over the last 5 or 6 years (since V1.3.9) but so has the rest of the world. Webservers have been updated, PHP has been updated, MySQL has been updated - each of these taking this site one step further away from being compatible. The next update to any of these services could be the death of the site, and this will happen at the most inconvenient time possible. Updating a working site, at leisure, can be challenging. Updating a non functional site while under pressure can be near impossible. Many that have found themselves in this position have never been able to recover.

    Cheers
    RodG

 

 

Similar Threads

  1. v151 Unable to Edit Shipping Module
    By hmbuhler in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 8 Oct 2014, 05:00 PM
  2. Urgent: Where did the action bar go ( shipping module)
    By CartCrazy in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 1 Jul 2011, 11:13 AM
  3. FEDEX module allowing residential customers to select ground shipping
    By Terrill_Taylor in forum Addon Shipping Modules
    Replies: 5
    Last Post: 28 Jun 2010, 04:07 PM
  4. USPS Module unable shipping quote
    By aunrea in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 29 Jan 2010, 04:12 PM
  5. Shipping module automatic select/switch
    By jhs in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 21 Oct 2007, 12:48 AM

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