Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Aug 2014
    Location
    Jersey City, NJ, USA
    Posts
    4
    Plugin Contributions
    0

    Default shipping tied to attribute

    I am trying to set up a shipping schema for artwork as follows:

    one to seven prints: X dollars.
    framed print: x dollars per framed print.

    Is there any way I can tie this schema to the attributes?

    Thank you.

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

    Default Re: shipping tied to attribute

    What Shipping Module(s) are you currently using?

    Are you wanting to just add to the shipping cost of your Shipping Module(s) based on the Attributes?
    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!

  3. #3
    Join Date
    Aug 2014
    Location
    Jersey City, NJ, USA
    Posts
    4
    Plugin Contributions
    0

    Default Re: shipping tied to attribute

    Quote Originally Posted by Ajeh View Post
    What Shipping Module(s) are you currently using?

    Are you wanting to just add to the shipping cost of your Shipping Module(s) based on the Attributes?
    I am a true "newbie." Not sure which module I should select. Yes, I would. Thank you.

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

    Default Re: shipping tied to attribute

    It depends on the shipping module you want to use such as UPS, USPS, FedEx or Zone Rates etc.

    But something could be worked out to add additional charges to based on the Attributes ...

    Now you need to decide how you want to price your shipping charges, then something could be worked into the code ...
    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!

  5. #5
    Join Date
    Aug 2014
    Location
    Jersey City, NJ, USA
    Posts
    4
    Plugin Contributions
    0

    Default Re: shipping tied to attribute

    I figured the code angle would be the best. Where can I find the code for the shipping and product modules?
    Thank you.

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

    Default Re: shipping tied to attribute

    It would really be of help to know what shipping module(s) you want to use to manage your shipping ...

    Are you wanting to use something like USPS? Or Flat rate? Or Item Rate?

    Have you an URL to your site that we could perhaps peek at to get a feel for how your products are set up?
    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!

  7. #7
    Join Date
    Aug 2014
    Location
    Jersey City, NJ, USA
    Posts
    4
    Plugin Contributions
    0

    Default Re: shipping tied to attribute

    www.eldredboze.com/sales
    Would like to use table for prints (up to 7 prints for $8, 8 to 14 for $16, etc.) and not sure what to use for the framed prints ($22 per framed print).
    Again, thanks

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

    Default Re: shipping tied to attribute

    So if I have:
    7 prints and 1 Framed Print the cost would be $8.00 + $22.00 = $30.00
    7 prints and 2 Framed Print the cost would be $8.00 + 2 x $22.00 = $52.00
    7 prints and 3 Framed Print the cost would be $8.00 + 3 x $22.00 = $74.00

    Correct?

    And Frame Prints are always Options Name ID (options_id) 1 and Options Values ID (options_values_id) 1 correct?
    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!

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

    Default Re: shipping tied to attribute

    If this is what you are wanting, you could add the code in RED to the bottom of the file:
    /includes/classes/shopping_cart.php

    Code:
         return $new_qty;
      }
    // bof: change $total_count for options_id/options_values_id combo
    /**
     * calculate the number of items in a cart based on an attribute option_id and option_values_id combo
     * USAGE:  $chk_attrib_1_16 = $this->in_cart_check_attrib_quantity(1, 16);
     * USAGE:  $chk_attrib_1_16 = $_SESSION['cart']->in_cart_check_attrib_quantity(1, 16);
     *
     * @param float $check_qty
     * @param int $check_option_id
     * @param int $check_option_values_id
     * @param string $message
     */
      function in_cart_check_attrib_quantity($check_option_id, $check_option_values_id) {
        // if nothing is in cart return 0
        if (!is_array($this->contents)) return 0;
    
        // compute total quantity for match
        $in_cart_check_qty = 0;
        // get products in cart to check
        $chk_products = $this->get_products();
        for ($i=0, $n=sizeof($chk_products); $i<$n; $i++) {
          if (is_array($chk_products[$i]['attributes'])) {
            foreach ($chk_products[$i]['attributes'] as $option => $value) {
              if ($option == $check_option_id && $value == $check_option_values_id) {
      //          echo 'Attribute FOUND FOR $option: ' . $option . ' $value: ' . $value . ' quantity: ' . $chk_products[$i]['quantity'] . '<br><br>';
                $in_cart_check_qty += $chk_products[$i]['quantity'];
              }
            }
          }
        }
        return $in_cart_check_qty;
      }
    // eof: change $total_count for options_id/options_values_id combo
    }
    Then customize your file:
    /includes/modules/shipping/table.php

    with the code in RED:
    Code:
      function quote($method = '') {
        global $order, $shipping_weight, $shipping_num_boxes, $total_count;
    
    // bof: change $total_count for options_id/options_values_id combo
        $chk_options_id = 20;
        $chk_options_values_id = 72;
        $additional_shipping = 22.00;
        $reduce_count = $_SESSION['cart']->in_cart_check_attrib_quantity($chk_options_id, $chk_options_values_id);
        $total_count = $total_count - $reduce_count;
    // eof: change $total_count for options_id/options_values_id combo
    
        // shipping adjustment
        switch (MODULE_SHIPPING_TABLE_MODE) {
    Code:
    // bof: change $total_count for options_id/options_values_id combo
        $additional_shipping_charge = $reduce_count * $additional_shipping;
    
        $this->quotes = array('id' => $this->code,
        'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
        'methods' => array(array('id' => $this->code,
        'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
        'cost' => $shipping + $additional_shipping_charge + (MODULE_SHIPPING_TABLE_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_TABLE_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_TABLE_HANDLING) ) ));
    // eof: change $total_count for options_id/options_values_id combo
    
        if ($this->tax_class > 0) {
    And this will now charge the count for Products based on the number of regular Products that are Prints using the Table Rate table settings and for the Framed Prints it will charge $22.00 each ...

    NOTE: change the values on:
    Code:
        $chk_options_id = 20;
        $chk_options_values_id = 72;
    
    To match your options_id value and the options_values_id value ...
    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!

  10. #10
    Join Date
    Dec 2005
    Posts
    166
    Plugin Contributions
    0

    Default Re: shipping tied to attribute

    I have a similar query.

    I am using Zen version 1.3.9 with Books module.
    The shipping module is Flat Rate.
    I want to offer free shipping on the entire order when a particular attribute is selected.
    Could you please help.
    Thanks in advance.
    http://www.raunharman.com
    http://www.raunharman.net
    Website Development, E-Book Solutions & Handicraft Exports

 

 
Page 1 of 2 12 LastLast

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

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