Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Displaying the amount left for free shipping.


T. Thomas

Recommended Posts

I'm trying to modify my shopping_cart.php to display the amount left until free shipping kicks in. I'm usually able to reverse engineer simple mods like this but I'm unable to find the php variables needed to correctly calculate and display what I'm trying to do.

 

Basically:

 

If(total_amount > free_shipping_amount){

display ("You get free shipping!")

else

display ("You still need" + (free_shipping_amount - total_amount) + " to get free shipping.")

 

I want to get the current shopping cart total and the amount needed for free shipping (which is hard because I can't find anywhere its referenced). I could use hard numbers but that would mean me having to hand code it in every time I update the free shipping price. I just want to be able to set it in the back end and then have the php work on the front end without updating it every time.

 

So I guess my question is whats the name of the variables to access the shopping carts "total amount" and the web stores "free shipping price" in shopping_cart.php?

Link to comment
Share on other sites

@@mhsuffolk

Thanks for the reply but the addons you've mentioned isn't really what I'm looking for. I'm looking to pretty much implement this using the method I've mentioned in my initial post using the two variables I've mentioned in my initial post. Also there are a couple things preventing me from using the addon you mentioned; The first is that its in french so I don't really know or understand any of the comments, the second is that it seems to be doing things and changing files that aren't relevant to what I'm trying to do and I can't seem to figure it out because all of the comments and instructions are in french.

 

I'm just looking for the two variables present in shopping_cart.php that are responsible for “Current shopping cart balance” and “Free Shipping Threshold”

 

All of the coding after that I can figure out on my own.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...