osCmax v2.5 User Manual
Results 1 to 3 of 3

Custom Shipping Mod...Shipping choice not saving.

This is a discussion on Custom Shipping Mod...Shipping choice not saving. within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I have built a custom shipping mod to pull quotes from DHL. I added the code to do this in ...

      
  1. #1
    Lurker
    Join Date
    Oct 2005
    Posts
    3
    Rep Power
    0


    Default Custom Shipping Mod...Shipping choice not saving.

    I have built a custom shipping mod to pull quotes from DHL. I added the code to do this in includes\modules\shipping\table.php. I'm kind of new to OSC and I think that's not the place it should have gone, but I'm not sure where to change what file it uses to pull shipping info. I didn't think it looked like it mattered as far as functionality goes. Anyway, I have everything working, it goes out gets the right quotes and puts them as radio buttons on the checkout_shipping.php page.

    The problem I'm having is regardless of which radio button is selected, when I continue with the checkout process on the confirmation page, the shipping method that shows up is the first item in the list. I haven't altered any of the code that does this, it seems silly to think the code would just work, but when I read through it, it seems like it should. Am I missing something? I hope there is someone out there who has some experience with this, I have been working on this for several days with no luck. I have very little hair left to pull out!

    Thanks for your time! If you need anything else to help please let me know.

  2. #2
    Lurker
    Join Date
    Oct 2005
    Posts
    3
    Rep Power
    0


    Default RE: Custom Shipping Mod...Shipping choice not saving.

    wow, 4 days and not a single person has a clue?

    I've moved the entire custom shipping code and moved it to the correct place (the DHL module)

    I'm still not getting the shipping option saved. No matter if I choose Ground or next day or whatever, it just uses the first option...

  3. #3
    Lurker
    Join Date
    Oct 2005
    Posts
    3
    Rep Power
    0


    Default

    Ok, I've come a long way over the last week. I'm getting close. I am working in Checkout_Shipping.php right now in the "process the selected shipping method" part.

    My problem I'm running into is that in the Checkout_Shipping.php, I need to know which of the shipping methods were chosen from a list of radio buttons (ground, next day, express, etc.). Can I access this list somehow from the Checkout_Shipping page?

    This is what I tried but it apparently isn't working...lol...I'm guessing I can't access the form object from this page?

    var radio = form.elements['shipping'];

    for (var x=0; x<radio.length; x++)
    {
    if (radio[x].checked == true)
    {
    $shipping = array('id' => $shipping,
    'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][x]['title'] . ')'),
    'cost' => $quote[0]['methods'][x]['cost']);

    }
    }

    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYME NT, '', 'SSL'));

Similar Threads

  1. Product Description not Saving
    By toddw in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 01-29-2006, 06:58 PM
  2. Need Custom Shipping Help
    By ericcech in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 01-16-2006, 03:54 PM
  3. Shipping Options/Individual Shipping
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 04-01-2004, 01:10 PM
  4. Free Shipping/flat rate shipping in zone
    By cvc505 in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 07-21-2003, 09:29 AM
  5. UPS mod package (UPS Choice v1.5) dated 2003/01/05
    By Mark1 in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 05-29-2003, 05:03 AM

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
  •