Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: shipping tied to attribute

    Do you have an example of an URL to the Product and which Attribute you want checked that if in the shopping cart you want to give Free Shipping?
    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. #12
    Join Date
    Dec 2005
    Posts
    166
    Plugin Contributions
    0

    Default Re: shipping tied to attribute

    Yes, sure.
    http://asiabookzone.com/index.php?ma...oducts_id=6423

    I want that if the customer buys Notebooks and Registers (2nd attribute), he should be entitled to free shipping on the entire order.

    Thanks for your prompt response.
    http://www.raunharman.com
    http://www.raunharman.net
    Website Development, E-Book Solutions & Handicraft Exports

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

    Default Re: shipping tied to attribute

    Install the shipping module for Free Shipping Options freeoptions ...

    Add the code from post #9 for the file:
    /includes/classes/shopping_cart.php

    then on the Flat Rate flat shipping file, add the code in RED:
    /includes/modules/shipping/flat.php
    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
            $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
          }
    
    // bof: Free Shipping Test - do not show Flat if Product with Attribute is in cart
    if (!IS_ADMIN_FLAG) {
      $chk_cart = $_SESSION['cart']->in_cart_check_attrib_quantity(20, 70);
    echo 'flat: ' . $chk_cart . '<br>';
      if ($chk_cart > 0) {
        $this->enabled = false;
      }
    }
    // eof: Free Shipping Test
    
          if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {
    and in the file for Free Shipping Options freeoptions add the code in RED:
    /includes/modules/shipping/freeoptions.php

    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
              $this->enabled = ((MODULE_SHIPPING_FREEOPTIONS_STATUS == 'True') ? true : false);
          }
    
    // bof: Free Shipping Test - do not show FREEOPTIONS unless Product with Attribute is in cart
    if (!IS_ADMIN_FLAG) {
      $chk_cart = $_SESSION['cart']->in_cart_check_attrib_quantity(20, 70);
    echo 'freeoptions: ' . $chk_cart . '<br>';
      if ($chk_cart < 1) {
        $this->enabled = false;
      }
    }
    // eof: Free Shipping Test
    
          if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREEOPTIONS_ZONE > 0) ) {
    Change the values of 20, 70 to match your option name id and option value id, I believe those will be 3,5 to match As prescribed by School ( +Rs.650.00 ) ...

    This should now turn on/off Flat Rate flat and on/off Free Shipping Options based on if the Attribute is in the cart ...

    NOTE: comment out the two echos, once you have this working right ...
    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. #14
    Join Date
    Dec 2005
    Posts
    166
    Plugin Contributions
    0

    Default Re: shipping tied to attribute

    Thanks for your prompt reply.

    However, when I am ordering without the attribute (notebooks and registers --not required), the order is processing fine.

    But when I select the attribute (Notebooks and Registers - As prescribed by School), it shows the following message:

    Not Available At This Time
    Sorry, we are not shipping to your region at this time.
    Please contact us for alternate arrangements.


    Further, in the top left hand corner of the page, the following text appears: flat: 1
    freeoptions: 1

    Have I done something wrong?
    http://www.raunharman.com
    http://www.raunharman.net
    Website Development, E-Book Solutions & Handicraft Exports

  5. #15
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,973
    Plugin Contributions
    96

    Default Re: shipping tied to attribute

    Do you have the freeoptions shipping module enabled? If not, that's your issue.

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

    Default Re: shipping tied to attribute

    First, make sure Free Shipping Options is installed as lat9 pointed out ...

    Next, when done testing, you need to comment out the two echo lines to not see that:
    Code:
    //echo 'flat: ' . $chk_cart . '<br>';
    Code:
    //echo 'freeoptions: ' . $chk_cart . '<br>';
    Those echos are there for testing to ensure the new function is working in both shipping modules ...
    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!

  7. #17
    Join Date
    Dec 2005
    Posts
    166
    Plugin Contributions
    0

    Default Re: shipping tied to attribute

    Thanks a lot.

    It worked well.

    I had installed the Free Shipping Options module, but had removed the Total>=0.

    Thanks again for your help.
    http://www.raunharman.com
    http://www.raunharman.net
    Website Development, E-Book Solutions & Handicraft Exports

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

    Default Re: shipping tied to attribute

    Thanks for the update that this was able to work for you ...
    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!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Discount coupon tied to individual products
    By koifarmer in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 3 Oct 2012, 07:42 PM
  2. Inventory Tied to Attributes
    By kwarner in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 12 Dec 2008, 03:30 PM
  3. EC not tied to order
    By carlvt88 in forum PayPal Express Checkout support
    Replies: 6
    Last Post: 9 Oct 2007, 04:26 AM
  4. Can Stock of All Items be Tied Together?
    By Taipa in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 12 Sep 2007, 08:25 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