Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2009
    Posts
    18
    Plugin Contributions
    0

    Default Shipping module calls - From what page??

    When you click the Go To Checkout button on the shopping cart page you are directed to index.php?main_page=checkout_shipping. I figured based on the main_page qstring paramater I could figure out exactly where the shipping modules are called (the page that calls the options for shipping to calculate shipping totals for each option). No such luck, I am getting very frustrated trying to hunt these down. So please, in what page/script are the shipping modules called to calculate shipping costs for all items in the shopping cart?

    Thanks!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Shipping module calls - From what page??

    That happens in the quote() method of the individual shipping module class itself. Each shipping module has its own.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2009
    Posts
    18
    Plugin Contributions
    0

    Default Re: Shipping module calls - From what page??

    OK, and where, or at what point and in which file, is the quote method called/referenced?

    Again, thanks DrByte, you seem to be the goto person around here :)

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Shipping module calls - From what page??

    I have this sense that you're asking the wrong question, and steering yourself in the wrong direction. So, I'll ask: why
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Sep 2009
    Posts
    18
    Plugin Contributions
    0

    Default Re: Shipping module calls - From what page??

    Because what I need to do is split up the current shopping cart and determine shipping costs through multiple service providers for only portions of the shopping cart. It's easier if I give you an example:

    A shopping cart contains 6 items. 2 of these items can only be shipped via UPS, 2 more can only be shipped via Canada post, and the other two may be shipped via either CP or UPS. The available shipping providers are determined through boolean values associated to each product and set in the administrative section; each product has a radio button for UPS allows shipping and CP allows shipping. This is a requirement as policy dictates that some of the items this particular store sells cannot be shipped via UPS and others cannot be shipped via CP.

    On the shopping cart screen each item displays in its description which shipping providers will ship the item. Currently on the shipping options page these are all lumped together in the quotes. In the above scenario this page will instead display 4 "options" two of which cannot be modified. First option, the two items that MUST be shipped via CP and the quote to ship (obtained using CP module). Second option, the two items that MUST be shipped via UPS and the quote to ship. Third option the first two CP only items combined with the other two items that may be shipped via either provider and the fourth the UPS only items combined with the other two that maybe shipped via either provider, both with quotes and this time a radio button option to select between the two.

    At this time I need to break down the shopping cart and call the appropriate quote() method for each of these scenarios in order to obtain the correct quotes. I hope this helps, perhaps there is an easier way to do this using the Zen software?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Shipping module calls - From what page??

    /includes/modules/pages/checkout_shipping/header_php.php calls $shipping_modules->quote() , and $shipping_modules is an instantiation of the /includes/classes/shipping.php class, which is really just a parent class which calls the specified method in all the active shipping module classes, one by one. So, you'll need to work with that in conjunction with the various places where $_SESSION['shipping'] array contents are set/managed.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Sep 2009
    Posts
    18
    Plugin Contributions
    0

    Default Re: Shipping module calls - From what page??

    One place I'd never even thought to check and it makes perfect sense! Thanks DrByte, I'll follow up in this thread if there are anymore questions regarding this.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Shipping module calls - From what page??

    You might find this rudimentary document useful: http://www.zen-cart.com/index.php?ma...roducts_id=378
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v150 What shipping module to use with shipping drop down box
    By U3nme in forum General Questions
    Replies: 6
    Last Post: 3 Nov 2012, 09:44 PM
  2. What files are required to create an admin module from scratch?
    By mohammedsk in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 2 Jan 2010, 10:56 PM
  3. What file calls csshover.htc?
    By pjgscrap in forum General Questions
    Replies: 13
    Last Post: 11 Jul 2009, 05:53 PM
  4. Replies: 9
    Last Post: 29 Jun 2009, 06:39 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