Jump to content

add flat fee to every purchase


Guest ckwall

Recommended Posts

Guest ckwall

I am looking for a way to add a flat fee of $3 to every checkout total. The product I am selling needs to have a $3 charge in addition to everything in the basket. Is there a way to do that?

Link to comment
Share on other sites

Sure. In fact, one of my clients has a month-long bottom-line % discount. Instead of a proper mod, I just rigged the basket total calculation.

In the file: /includes/content/cart.inc.php, there are several places to change. And in cart.tpl, there needs to be a line that explains the charge.

Look for this in cart.inc.php:

$view_cart->assign("LANG_CART_TOTAL",$lang['front']['cart']['cart_total']);

$view_cart->assign("VAL_CART_TOTAL",priceFormat($grandTotal));

Just above that is the line that sums the various charges (tax, shipping, etc). Just add 3.00 to that equation right there.

Link to comment
Share on other sites

Guest estelle

Could you add it into the shipping fee? You could then rename 'Shipping' to 'Shipping + Handling' (or whatever the extra fee is for).

Link to comment
Share on other sites

  • 2 years later...
Guest JJackman

Great tip, I've used on my site -- but also discovered that you have to add the amount to the PayPal module -- by adding a line to transfer.inc.php:

<input type='hidden' name='handling' value='2' /> (or whatever the value you added on the cart page)

This is because the PayPal script takes the individual values for subtotal, tax, and shipping and adds them again.

If you do not add the handling item it will not be included in the PayPal charge.

Sure. In fact, one of my clients has a month-long bottom-line % discount. Instead of a proper mod, I just rigged the basket total calculation.

In the file: /includes/content/cart.inc.php, there are several places to change. And in cart.tpl, there needs to be a line that explains the charge.

Look for this in cart.inc.php:

$view_cart->assign("LANG_CART_TOTAL",$lang['front']['cart']['cart_total']);

$view_cart->assign("VAL_CART_TOTAL",priceFormat($grandTotal));

Just above that is the line that sums the various charges (tax, shipping, etc). Just add 3.00 to that equation right there.

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.

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