Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Shipping Customization Per Product

    Can you shed some light which files need to edit and how. I edit this module file with if clause order total but it did not work.

  2. #12
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Shipping Customization Per Product

    You'll need to find a way, whether a separate field in the database or a simple PHP look-up table, to associate the minimum-order amount for free shipping on a product-by-product basis.

  3. #13
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Shipping Customization Per Product

    I know how to create a switch/field on product page but not sure how to implement it on catalog side. Can you shed some light which files need to edit and how for catalog side?

    Quote Originally Posted by lat9 View Post
    You'll need to find a way, whether a separate field in the database or a simple PHP look-up table, to associate the minimum-order amount for free shipping on a product-by-product basis.

  4. #14
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Shipping Customization Per Product

    The logic for granting free shipping on products marked "always free shipping" happens in a couple places. Which one takes effect depends on which shipping module/s you have enabled in your store.

    Sometimes the shipping module itself does all the calculations on its own.
    Often it simply relies on the "weight of the entire order", which the shopping_cart class provides after first setting the weight for "always free shipping" products to 0. This effectively makes them "free shipping" because shipping is mostly determined by the weight of the shipment.

    So, you'll need to find all the code that checks for the 'product_is_always_free_shipping' flag on each of the products in your cart and converts the weight to 0, and update the code to also check for whether the overall cart total is above the threshold you say you want to impose.
    Inside the shopping_cart class that total is represented in $this->total. Outside the class it's in $_SESSION['cart']->total instead.


    As a sanity check later in your code you can check these values to see if your code adjustments make sense:
    $_SESSION['cart']->free_shipping_weight (weight of all items granted free shipping)
    $_SESSION['cart']->free_shipping_item (number of items granted free shipping)
    $_SESSION['cart']->weight (weight of non-free-shipping items)

    Remember, the shopping_cart class treats the following as free-shipping (by setting the weight for these items to 0):
    - product has 'product_is_always_free_shipping' set to 1
    - downloads
    - purchase of gift certificates
    - weight is 0 (either directly, or via attribute rules selected for that product)
    .

    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.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 7
    Last Post: 20 Mar 2013, 02:12 PM
  2. v139h Per unit/per category/per location shipping rates
    By jsavoie in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 4 Nov 2012, 06:19 PM
  3. HOW TO? - Multiple Shipping options per product per order etc....
    By shags38 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 15 Sep 2011, 03:44 AM
  4. Shipping Rate per Product and per Country
    By joelbauca in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 18 Jul 2007, 04:35 AM
  5. Customization per customer access
    By virtue in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 14 May 2006, 10:19 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