Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default No Shipping Estimate Quote -- writing my own shipping module

    In a shipping module chmod default shows as chmod 0644
    Read and write for owner, read for everybody else, chmod 0644
    ----
    In shipping modules are both shipping files set to,
    Everything for owner, read and execute for others
    chmod("/some_shipping_dir/some_shipping_file_1", 0755)
    chmod("/some_shipping_dir/some_shipping_file_2", 0755)
    or only 755
    ----
    will either of these three be selected,
    for shipping modules.
    Sticky bit, SUID, SGID
    Thank You
    Relentless

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

    Default Re: shipping module use chmod 0755 or 755

    What is wrong with the 644 setting?
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: function getFXFQuote($url)

    Thank you for pointing out to me that 0644 is not an issue.
    ===========
    What I see in my shipping Module now, line 37 to 52.
    Line 54 to 72 is what I think is missing.
    Module loads with no errors, to Admin., with yellow disabled
    ===========
    if (!zen_not_null($error_msg)) {
    $base_URL = 'http://www.shippingcompany.shipco.com/XMLRating.jsp?';
    ===========
    37] function getFXFQuote($url) {
    $isError = false;
    $connectMethod = false;

    if (($fp = @fopen($url, "r"))) {
    $connectMethod = 'fopen';
    $data = fread($fp, 4096);
    } elseif (function_exists('curl_init')) {
    $connectMethod = 'curl';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 180);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    $data = curl_exec($ch);
    52] }
    ===========
    54]function getFXFQuote($url) {
    $isError = false;
    $connectMethod = false;

    if (($fp = @fopen($url, "r"))) {
    $connectMethod = 'fopen';
    $data = fread($fp, 4096);
    } elseif (function_exists('curl_init')) {
    $connectMethod = 'curl';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 180);
    curl_setopt($ch, CURLOPT_URL, "http://mywebsite/shippingmodule.php");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    $data = curl_exec($ch);
    curl_close ($ch);
    fclose ($fp);
    72] }
    ===========
    Thank You
    Relentless

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

    Default Re: shipping module use chmod 0755 or 755

    You are posting code, but not the error message that you are getting ...

    Could you post the error message and where you are when you get 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: v1.5.5]
    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!

  5. #5
    Join Date
    Sep 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: shipping module use chmod 0755 or 755

    There are no errors,
    but no Shipping Estimate Quote.
    with product cost$ enabled, or with out.
    There were a few errors, got rid of them.
    This Module is installed in admin with yellow disabled.
    ===
    Tried enable_error_logging.php
    * Tool for debugging hard-to-track-down issues
    [this file did not appear] /cache/myDEBUG-xxxxxxx.log folder .
    when I checked out, and got email order confirmation, no errors
    Order Confirmation from My web site [Order #4]
    There are no errors in error_log
    ====
    Do you think this will help
    Tip: If you are having trouble getting libcurl to do what you want,
    add the following code before closing the cURL handle:

    <pre>
    <?php
    print_r(curl_getinfo($ch));
    echo "\n\ncURL error number:" .curl_errno($ch);
    echo "\n\ncURL error:" . curl_error($ch);
    // ...close cURL handle ($ch) below
    ?>
    </pre>
    This will force libcurl to report back on what happened on the last transfer,
    making it easier to troubleshoot.
    ===
    The link to this curl error report.
    http://devzone.zend.com/node/view/id/1081

    =============
    In my Module code added, enable, force libcurl to report back.

    function getFXFQuote($url) {
    $isError = false;
    $connectMethod = false;

    if (($fp = @fopen($url, "r"))) {
    $connectMethod = 'fopen';
    $data = fread($fp, 4096);
    } elseif (function_exists('curl_init')) {
    $connectMethod = 'curl';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 180);
    curl_setopt($ch, CURLOPT_URL, "http://mywebsite/shippingmodule.php");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    $data = curl_exec($ch);

    <pre>
    <?php
    print_r(curl_getinfo($ch));
    echo "\n\ncURL error number:" .curl_errno($ch);
    echo "\n\ncURL error:" . curl_error($ch);
    // ...close cURL handle ($ch) below
    ?>
    </pre>
    curl_close ($ch);/*assuming that this should be added, to mod file*/
    fclose ($fp); /*assuming that this should be added, to mod file*/
    }
    ------------
    Shall I add these two lines to my shipping module.
    curl_close ($ch);
    fclose ($fp);
    ------------
    Thank You
    Relentless
    Relentless research

 

 

Similar Threads

  1. Replies: 10
    Last Post: 5 Mar 2013, 07:33 PM
  2. Shipping Date Estimate Module
    By chris13 in forum Addon Shipping Modules
    Replies: 7
    Last Post: 3 May 2011, 01:01 AM
  3. Writing my own Payment Module?
    By Rayston in forum Addon Payment Modules
    Replies: 9
    Last Post: 29 Dec 2009, 07:42 PM
  4. writing a shipping module
    By tiny in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 27 May 2009, 07:34 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR