opus_uno2001 Posted July 24, 2014 Share Posted July 24, 2014 (edited) Hello.. I've scoured the forum but can't find what I'm looking for.. client uses both USPS & UPS… but for 1 heavy product she's getting killed on shipping and wants and additional "handling fee" (for lack of a better term) for that one item, but doesn't want to simply add it to the total price. Tried installing SSPP but it's not what I need. Can anybody point me in the right direction? Thanks.. Never mind.. I don't know how to delete this post? It just dawned on me to simply increase the weight. Problem solved. Edited July 24, 2014 by opus_uno2001 Quote Link to comment Share on other sites More sharing options...
Roaddoctor Posted July 24, 2014 Share Posted July 24, 2014 I used the code below for two heavy specific items I sell (added to fedexwebservices.php), but should work the same for usps or ups modules... simple // Begin surchage test - proof of concept code by burt $products_surcharge = array(28, 29); // any of these ID's in the cart, add the surcharge $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (in_array($products[$i]['id'], $products_surcharge)) { $cost += 5; // amount to be added break; } } // End surcharge test Should do exactly what you need and not effect other products ship rates, nor need false weight bumps. Hope that helps. Quote -Dave Link to comment Share on other sites More sharing options...
discxpress Posted November 15, 2014 Share Posted November 15, 2014 @@Roaddoctor I'm looking for something like that. I have dozens, maybe a 100 items that have a surcharge added to them. I implement flat rate shipping. I'm hoping to add a field to the products file where I can add a shipping surcharge to the item. For example, v_products_surcharge and then place a snippet of code in the shipping module file like above in your example where it only affects items with surcharges. Your time and assistance is appreciated. Quote Link to comment Share on other sites More sharing options...
burt Posted November 16, 2014 Share Posted November 16, 2014 @@discxpress what roaddoctor posted was "proof of concept" code that should not be used in a live shop. What you need is a system to flag products (1), and a system to check for flagged products in the checkout procedure (2). If any flagged products exist in the customers cart add a shipping surcharge via an order_total module (3). 1. amend admin/categories.php there is a video at oscommerce.tv channel that shows how to do this for "featured products" - so similar for "surcharge products" 2. create a header_tag module that installs on checkout_shipping 3. create an order_total module both of these are not done You then have a solid system that has only 1 place in which you need to amend code, the shop side you just press button to install. I suggest having this coded up for you by a coder who knows the new structure and values of osCommerce (no core code changes!!) by posting a commercial request at http://www.oscommerce.com/forums/forum/79-commercial-support-enquiries/ You can then get a range of quotes, and share the resuting code (if you go ahead) with the rest of the #community Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.