Jump to content
Sign in to follow this  
olsonsp4c

Call variable

Recommended Posts

Hello all,

 

I'm working on creating a usps shipping insurance option that is separate from the actual module... in order to do it I need to call $shipping_num_boxes in the order totals module. I have called it as follows:

 

	function process() {
  global $order, $currencies, $shipping_num_boxes;

 

However, the module is not calling the the variable, so the variable has a value of "0" and when I use the variable later on in a calculation I get divide by 0 errors. Any ideas on how to call this in an order totals module?

 

thanks!

 

Scott

Share this post


Link to post
Share on other sites

To clarify, $shipping_num_boxes in determined in includes/classes/shipping.php and I don't know how to call it in my order totals module... any thoughts?

 

Scott

Share this post


Link to post
Share on other sites

You could look at one of the several shipping insurance contributions to see how they do it.

 

Jack


Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Need Help? See this thread and provide the information requested.

How to Upgrade to the latest version

Recommended SEO Addons

Share this post


Link to post
Share on other sites
You could look at one of the several shipping insurance contributions to see how they do it.

 

Jack

 

Thanks Jack. I already looked at them and only one is an order totals module - and this one does not make reference to the shipping.php class, so I couldn't learn from other's work on this. I appreciate the response though.

 

Scott

Share this post


Link to post
Share on other sites

Does anyone else have any ideas how to call a variable from includes/classes/shipping.php in an includes/modules/order_total module?

 

specifically $shipping_num_boxes

 

thanks!

 

Scott

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×