Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Call variable


olsonsp4c

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

Link to comment
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

Link to comment
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

Link to comment
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

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