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.
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.
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!
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!
I figured the code angle would be the best. Where can I find the code for the shipping and product modules?
Thank you.
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!
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
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!
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
Then customize your file: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 }
/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) {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 ...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) {
NOTE: change the values on:
To match your options_id value and the options_values_id value ...Code:$chk_options_id = 20; $chk_options_values_id = 72;
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!
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
Bookmarks