olsonsp4c 0 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 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 Share this post Link to post Share on other sites
olsonsp4c 0 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 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 Share this post Link to post Share on other sites
Jack_mcs 1,112 Posted February 26, 2008 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
olsonsp4c 0 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 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 Share this post Link to post Share on other sites
olsonsp4c 0 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 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 Share this post Link to post Share on other sites