Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006
    Posts
    3
    Plugin Contributions
    0

    Default shipping cost based on product type?

    I've been trying to figure out how to get different shipping rates for different product types.

    product type A is a flat rate of $5, no matter how many items are purchased, shipping total = $5.
    product type B is a table rate based on price (up to $19.99, shipping costs = $8. $20 to $24.99, shipping costs = $9 ...).

    The problem occurs when a customer wants to purchase some of product type A and some of product type B. I need to calculate shipping from products of mixed rates.

    I'm trying to create my own shipping module with an algorithm to handle the math. I've got the module set up, but I don't know what variables I can use in my algorithm. Can I use the product_id field? And how do I know how many of each product are in the customers basket? I rather not access the MySQL database. I heard someone used session variables to get a count of what was in the shopping cart.

    Can anyone help with this or have a better suggestion?

    Thanks,
    Tom

  2. #2
    Join Date
    Jul 2006
    Posts
    3
    Plugin Contributions
    0

    Default Re: shipping cost based on product type?

    Now I know why similar questions have been asked many times, but no real answer. After you figure it out, you are sick of the topic and don't want anything to do with it anymore. But I will write what I found.

    I looked in the shopping_cart.php file and found some session variables that can be used in calculating total shipping cost. I'm using the weight variable right now and making sure all my flat rate products have zero weight. All the other products have a non zero weight. So that is how I differentiate between product types. Later I will change this and have a key word in the product name. If the key word is found in the product name, then it has a certain shipping rate. Else it has a different shipping rate. Then I sum up the individual shipping totals to get the grand total. There are other ways I'm sure, but this is the first solution that came to mind.

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

    Default Re: shipping cost based on product type?

    Yes ... in order to do what you are proposing you will need some customization ...

    You will have to let us know how this ends up working for you ...

    Thanks for the update ...
    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. Shipping based on Product type?
    By snowgoose in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 12 Jul 2011, 01:14 AM
  2. Need a way to base shipping cost based on product
    By BobDGinn in forum Addon Shipping Modules
    Replies: 0
    Last Post: 5 Aug 2010, 01:44 AM
  3. Show shipping method based on product type
    By gpgoud in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 22 Sep 2009, 03:43 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