Results 1 to 10 of 15

Hybrid View

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

    Default Re: Per item shipping, then a flat rate...

    This returns the pricing info ...
    PHP Code:
    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
    'cost' => (MODULE_SHIPPING_ITEM_COST $total_count) + MODULE_SHIPPING_ITEM_HANDLING))); 
    You need to test for how many items ... the $total_count just before that code, and when it is >= 3 send 500 vs computed cost ...
    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 2006
    Posts
    358
    Plugin Contributions
    0

    Default Re: Per item shipping, then a flat rate...

    Dear Linda,

    Thank you for you patience and your time. I have tried my best to adjust that section of PHP but with no success. I went to several PHP tutorial sites and tried to get an understanding of how to do things, but the examples are so different from the code in Zen that I could not make any progress... Whatever I tried I got error messages or parsing errors etc....

    If you, or someone, would be so kind as to give me an example that I could try, I might be able to make some headway...

    Thank you again!

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

    Default Re: Per item shipping, then a flat rate...

    The idea is ...

    IF count >= 3
    charge 500
    else
    charge normal
    endif

    So ... you need to alter the code in /includes/modules/item.php to use this IF in place of the normal method ...
    PHP Code:
          // if total item count >= 3 charge 500 otherwise, charge regular item charge
          
    if ($total_count >= 3) {
            
    $this->quotes = array('id' => $this->code,
                                  
    'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
                                  
    'methods' => array(array('id' => $this->code,
                                                           
    'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
                                                           
    'cost' => 500)));
          } else {
            
    $this->quotes = array('id' => $this->code,
                                  
    'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
                                  
    'methods' => array(array('id' => $this->code,
                                                           
    'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
                                                           
    'cost' => (MODULE_SHIPPING_ITEM_COST $total_count) + MODULE_SHIPPING_ITEM_HANDLING)));
          } 
    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 2006
    Posts
    358
    Plugin Contributions
    0

    Default Re: Per item shipping, then a flat rate...

    Well, thank you very much! I must say that I could not have come up with such a piece of code, even with weeks of study, I imagine. Now that I can see the final result, I can understand what you have done, but this was really something beyond me.

    I have tested it and it works fine!

    One thing that I have yet to figure out is how you developers make a living from all the work you do on Zen-Cart AND the enormous assistance you give everyone. This is the most amazing and helpful community. It is really very Zen! (And I live in Japan, so that is saying something!)

    The store that I am building I am doing completely as a volunteer, but I will be sending you a donation out of my own pocket for the wonderful work you are all doing and the marvelous positive assistance you are giving the many small businesses around the world.

    Thank you so much!

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

    Default Re: Per item shipping, then a flat rate...

    The donations that people give to Zen Cart are very important to us ...

    While it will be sometime before we "make a living" we hope that others like you understand that for use to build such software and provide the kind of support you need and want to run your businesses ... these donations are important ...

    We hope more and more people will come to find that Zen Cart is their e-commerce solution ... and they want to keep it running and developing and have access to the free support ...

    Glad that you were able to get the code working for your site!
    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 2006
    Posts
    358
    Plugin Contributions
    0

    Default Re: Per item shipping, then a flat rate...

    Thanks for explaining things to me... I have sent off an donation but there is no need to send me anything, which means more for you hard workers over there!

    I am sure I will have some further questions, probably sooner than later...

    Once again, thank you for the wonderful support!

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

    Default Re: Per item shipping, then a flat rate...

    Thanks for the donation ... we really appeciate that ...
    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!

 

 

Similar Threads

  1. Flat Rate Per Item Type Shipping
    By D9Studios in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 30 Aug 2011, 08:54 PM
  2. Flat Rate Per Item Shipping ?
    By haredo in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 25 Jan 2010, 06:56 AM
  3. Per Item Flat Rate Shipping
    By dannyd in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 4 Mar 2009, 10:01 PM
  4. Shipping Per Item with a flat rate
    By robg in forum Addon Shipping Modules
    Replies: 0
    Last Post: 12 Oct 2006, 10:14 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