jhande Posted May 6, 2010 Share Posted May 6, 2010 At least I know it's beyond my brains scope LOL. I have some categories of products that can be shipped USPS First Class non-machinable envelope (added items up to 13 ounces = $0.84). But yet I also have some categories of products that weigh less than the 13 ounces but I must ship them in a box. I only ship USPS. I'm not sure if a newer version of the USPS contribution handles First Class better than mine, but I don't think so. I think it automatically calculates First Class boxes or large envelopes. Believe it or not but we are losing customers because when they go to process the payments and see they are being charged $4.00 or so for a package that weighs only a few ounces they cancel out. Any thoughts or ideas? - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
lagodilecco Posted May 6, 2010 Share Posted May 6, 2010 I'm just starting my shop, but I've implemented an option where if a customer buys ONLY from a given top level category, then they are charged a particular (cheap) rate (it's a modification of something from the 'osCommerce Cookbook'). Not sure if this is what you would want, as your items might be all in different categories, but am happy to explain and pass on my notes if you think it'll help. Diana Link to comment Share on other sites More sharing options...
jhande Posted May 7, 2010 Author Share Posted May 7, 2010 Thanks Diana That sounds like it might work. The products I need the cheaper shipping rate for are all within one main category with a few sub-categories. - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
lagodilecco Posted May 7, 2010 Share Posted May 7, 2010 Here's a copy of the notes that I made for myself at the time (I'm a bit strange...) . My shop sells scrapbooking supplies (or it will!), and I wanted cheap shipping if people ordered only "brads" (paper fasteners). Step 8 is only necessary if you want to remove the default shipping. You might choose to just include both. If you think that this is what you need, you will need the book. I'll make my email address public for a while - let me know if you don't have the book. Ciao, Diana Adding the “Brads Only” shipping price Add special flat rate shipping price if all items are in a given category. Based on “Deep Inside Oscommerce”, by Monika Mathe, Recipe 52 pg 241 “Limit Flat Rate Shipping to a specific category only” 1. Modify the admin version of general.php (admin/includes/functions/general.php) to add functions as in book: tep_cfg_pull_down_categories tep_draw_pull_down_menu These functions are used by the admin function when setting up shipping.<BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"> 2. Make a clone of includes/modules/shipping/flat.php. Call it bradsonly.php. Change occurrences of “flat” to be “bradsonly” Change occurrences of “FLAT” to be “BRADSONLY”<BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"> 3. Edit display text in bradsonly.php as explained on pg 247. This affects text seen in admin.<BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"> 4. In bradsonly.php, add a new key (MODULE_SHIPPING_BRADSONLY_CAT_LIMIT) to the install() function as explained on pg 248.<BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"> 5. In bradsonly.php, add this new key to the keys() function as explained on pg 249.<BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"> 6. Add code which hides module unless order contains all items from the one specified category. Note that category will be specified using admin. (See below). Modification to book Book: valid if there is only ONE item and it is in the specified category Mine: valid as long as ALL items are in the specified category<BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"> 7. Make a clone of includes/languages/english/modules/shipping/flat.php. Call it bradsonly.php. Change definitions as described in book.<BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"> 8. Duplicate the new code from step 6 and use it in the current shipping module so that the current module is excluded from being offered. // hide the module if the order contains items which are not from the specified category $products_id = $cart->get_product_id_list(); // get list of product ids in this cart e.g "21, 22, 33" $product_array = (explode(', ', $products_id)); // Put product ids into array // loop through each product in the array foreach ($product_array as $key => $value) { $item_path = tep_get_product_path(tep_get_prid($value)); // get product path for current item $item_cat = explode('_', $item_path); // put categories into an array if ($item_cat[0] != MODULE_SHIPPING_BRADSONLY_CAT_LIMIT) { // test primary category $this->enabled = false; // No, does not match break; } // if ($item_cat[0... } // "foreach" Link to comment Share on other sites More sharing options...
lagodilecco Posted May 7, 2010 Share Posted May 7, 2010 Sorry - the post included MS word stuff. Here are the notes in text format: Adding the “Brads Only” shipping price Add special flat rate shipping price if all items are in a given category. Based on “Deep Inside Oscommerce”, by Monika Mathe, Recipe 52 pg 241 “Limit Flat Rate Shipping to a specific category only” 1. Modify the admin version of general.php (admin/includes/functions/general.php) to add functions as in book: tep_cfg_pull_down_categories tep_draw_pull_down_menu These functions are used by the admin function when setting up shipping. 2. Make a clone of includes/modules/shipping/flat.php. Call it bradsonly.php. Change occurrences of “flat” to be “bradsonly” Change occurrences of “FLAT” to be “BRADSONLY” 3. Edit display text in bradsonly.php as explained on pg 247. This affects text seen in admin. 4. In bradsonly.php, add a new key (MODULE_SHIPPING_BRADSONLY_CAT_LIMIT) to the install() function as explained on pg 248. 5. In bradsonly.php, add this new key to the keys() function as explained on pg 249. 6. Add code which hides module unless order contains all items from the one specified category. Note that category will be specified using admin. (See below). Modification to book Book: valid if there is only ONE item and it is in the specified category Mine: valid as long as ALL items are in the specified category 7. Make a clone of includes/languages/english/modules/shipping/flat.php. Call it bradsonly.php. Change definitions as described in book. 8. Duplicate the new code from step 6 and use it in the current shipping module so that the current module is excluded from being offered. // hide the module if the order contains items which are not from the specified category $products_id = $cart->get_product_id_list(); // get list of product ids in this cart e.g "21, 22, 33" $product_array = (explode(', ', $products_id)); // Put product ids into array // loop through each product in the array foreach ($product_array as $key => $value) { $item_path = tep_get_product_path(tep_get_prid($value)); // get product path for current item $item_cat = explode('_', $item_path); // put categories into an array if ($item_cat[0] != MODULE_SHIPPING_BRADSONLY_CAT_LIMIT) { // test primary category $this->enabled = false; // No, does not match break; } // if ($item_cat[0... } // "foreach" Link to comment Share on other sites More sharing options...
jhande Posted May 7, 2010 Author Share Posted May 7, 2010 Thank you Diana Email sent - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
lagodilecco Posted May 7, 2010 Share Posted May 7, 2010 Hi Jim, Responded to email, but it bounced ... "Reason: No Such User Here". Try again? D Link to comment Share on other sites More sharing options...
jhande Posted May 7, 2010 Author Share Posted May 7, 2010 That's strange... Replied to PM - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.