florence_dave Posted November 21, 2003 Posted November 21, 2003 Hi Everyone, I'm trying to integrate Individual Product Shipping Prices - v2.0 MS 2.2 with Ajeh's SECv2.2. I'm pretty new to all this stuff, but decided to give it a shot. There is a piece of code that is a duplicate of some changes made by SEC. It is tep_get_configuration_key_value. I took a flyer and tried to rename the IndvidShipping code to new_tep_get_configuration_key_value and changed it in all appropriate files (I think ) I get the following errors: Fatal error: Call to undefined function: new_tep_get_configuration_key_value() in /home/jewelryi/public_html/includes/classes/shipping.php on line 54 Here is the code from the \includes\classes\shipping.php OF: WebMakers.com Added: Downloads Controller - Free Shipping and Payments // Show either normal shipping modules or free shipping module when Free Shipping Module is On // Free Shipping Only if ( (tep_get_configuration_key_value('MODULE_SHIPPING_FREESHIPPER_STATUS')=='1' and $cart->show_weight()==0) ) { $include_modules[] = array('class'=> 'freeshipper', 'file' => 'freeshipper.php'); } else { // All Other Shipping Modules while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); // Don't show Free Shipping Module if ($class !='freeshipper') { $include_modules[] = array('class' => $class, 'file' => $value); } } } // EOF: WebMakers.com Added: Downloads Controller - Free Shipping and Payments } // BOF: Individual Shipping Prices // Show either normal shipping modules or Individual shipping module when Individual Shipping Module is On // Show Individual Shipping Only if (new_tep_get_configuration_key_value('MODULE_SHIPPING_INDVSHIP_STATUS') and $shiptotal) { $include_modules[] = array('class'=> 'indvship', 'file' => 'indvship.php'); } else { // All Other Shipping Modules while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); // Don't show Individual Shipping Module if ($class != 'indvship') { $include_modules[] = array('class' => $class, 'file' => $value); } } } // EOF: Individual Shipping Prices } for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) { include(DIR_WS_LANGUAGES . $language . '/modules/shipping/' . $include_modules[$i]['file']); include(DIR_WS_MODULES . 'shipping/' . $include_modules[$i]['file']); $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']; } } } And to add insult to injury I get this error at the end of the file. There is so little information that I'm not sure what to do with it. Parse error: parse error in /home/jewelryi/public_html/includes/classes/shipping.php on line 155 Here is the code for this: $cheapest = $rates[$i]; } } return $cheapest; } } } ?> Hope someone can help. I think I'm close, but it may be more wishful thinking than anything else. Thanks! Cheers, Dave
florence_dave Posted November 27, 2003 Author Posted November 27, 2003 Hoping some kind soul will help out with this.
Ajeh Posted January 11, 2004 Posted January 11, 2004 You need to find where the two copies of the same function are and just tack an _old on the end of the name of one of them is the simple solution. What it sounds like you might have done is rename the call to the function rather than rename the duplicate function itself. The function will start with: function tep_get_configuration_key_value( And most likely be in one of the files in /includes/functions
Guest Posted January 11, 2004 Posted January 11, 2004 Where is the function new_tep_get_configuration_key_value if it says it is undefined, normally that means you don't have a line saying: function new_tep_get_configuration_key_value(...) {
Ajeh Posted January 11, 2004 Posted January 11, 2004 I do not use the code new_tep_get_configuration_key_value in shipping.php But I do use new_tep_get_configuration_key_value in shipping.php Did you perhaps try to rename the duplicate function and edit the wrong file? :unsure:
Ajeh Posted January 11, 2004 Posted January 11, 2004 Take two ... I use tep_get_configuration_key_value but not new_tep_get_configuration_key_value in shipping.php ... :rolleyes:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.