olsonsp4c Posted February 22, 2008 Posted February 22, 2008 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 Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox
olsonsp4c Posted February 26, 2008 Author Posted February 26, 2008 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 Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox
Jack_mcs Posted February 26, 2008 Posted February 26, 2008 You could look at one of the several shipping insurance contributions to see how they do it. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
olsonsp4c Posted February 26, 2008 Author Posted February 26, 2008 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 Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox
olsonsp4c Posted February 29, 2008 Author Posted February 29, 2008 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 Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.