Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2008
    Posts
    3
    Plugin Contributions
    0

    Default Flat Rate Shipping based on Product

    I could use some help with the following. How can I implement this shipping scenario. For shipments to Canada only, if the order does not contain product A, it is a flat rate of $25. If the order contains 1 or more units of Product A, It is a flat rate of $35.

    Thanks

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

    Default Re: Flat Rate Shipping based on Product

    In the shopping_cart.php class there is a function that you can use to see how many of something about a product is in the cart:
    Code:
      /**
       * Method to calculate the number of items in a cart based on an abitrary property
       *
       * $check_what is the fieldname example: 'products_is_free'
       * $check_value is the value being tested for - default is 1
       * Syntax: $_SESSION['cart']->in_cart_check('product_is_free','1');
       *
       * @param string product field to check
       * @param mixed value to check for
       * @return integer number of items matching restraint
       */
      function in_cart_check($check_what, $check_value='1') {
    Using that, you could check if any of the Products exist and if the Order is for Canada, then add on to the Flat Rate shipping charge the extra charges for Canada ...
    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!

 

 

Similar Threads

  1. v151 Flat rate shipping based on master category ID?
    By snowgoose in forum Built-in Shipping and Payment Modules
    Replies: 18
    Last Post: 26 Mar 2014, 10:35 PM
  2. Flat rate shipping based on location
    By ztotheetothen in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 10 Feb 2011, 08:21 PM
  3. flat rate shipping based on weight?
    By cpoet in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 5 Aug 2010, 07:34 AM
  4. Shipping mods based on flat rate
    By delia in forum Contribution-Writing Guidelines
    Replies: 9
    Last Post: 16 Apr 2010, 02:24 PM
  5. Flat Rate Shipping based on UK/EU and ROW and product category?
    By HeathenMagic in forum Addon Shipping Modules
    Replies: 0
    Last Post: 24 Jul 2007, 07:44 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