Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't be done... can it?


florence_dave

Recommended Posts

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. I'm sure this one is an easy one, but 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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...