Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Additional Fees

Recommended Posts

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?




Never mind.. I don't know how to delete this post?  


It just dawned on me to simply increase the weight. Problem solved. 

Edited by opus_uno2001
Link to comment
Share on other sites

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...


// 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
// End surcharge test

Should do exactly what you need and not effect other products ship rates, nor need false weight bumps. Hope that helps.


Link to comment
Share on other sites

  • 3 months later...



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.

Link to comment
Share on other sites

@@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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...