Hejsa.
Jeg har installeret ovenstående contrib.
Når jeg vil gå "til kassen" kommer der en fejlmeddelse op?
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in ..... includes/classes/shipping.php on line 57
Jeg har taget et udpluk af den kode contrib'en har installeret i catalog/includes/classes/shipping.php
class shipping {
var $modules;
// class constructor
function shipping($module = '') {
global $language, $PHP_SELF;
// INDIV_SM BEGIN (this is messy i know)
global $cart;
// New to fix attributes bug
$cart_products = $cart->get_products();
$real_ids = array();
foreach($cart_products as $prod){
$real_ids[] = tep_get_prid($prod['id']);
}
$sql = "SELECT shipping_methods FROM ".TABLE_PRODUCTS." WHERE products_id IN (".implode(',',$real_ids).") AND shipping_methods IS NOT NULL AND shipping_methods <> ''";
$query = mysql_query($sql);
// End new bug fix
$allow_mod_array = array();
while($rec = mysql_fetch_array($query)){
if(empty($allow_mod_array)) $startedempty = true;
$methods_array = array();
$methods_array = explode(';',$rec[shipping_methods']);
if(!empty($methods_array)){
foreach($methods_array as $method){
$allow_mod_array[] = $method;
}
}
if($startedempty){
$startedempty = false;
}else{
$temp_array = array();
foreach($allow_mod_array as $val){
$temp_array[$val]++;
}
$allow_mod_array = array();
foreach($temp_array as $key => $val){
if($val > 1){
$allow_mod_array[] = $key;
}
}
}
}
// INDIV_SM END
if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
// INDIV_SM START
$temp_array = $this->modules;
$this->modules = array();
foreach($temp_array as $val){
if(mysql_num_rows($query)==0 || in_array(str_replace('.php','',$val),$allow_mod_array)) {
$this->modules[] = $val;
}
}
// INDIV_SM END
$include_modules = array();
Linie 57 er fremhævet.
Hvad er der i vejen med koden? - kan ikke se der skulle mangle ']' nogen steder - jeg er selvfølgelig heller ikke nogen koder
Venlig hilsen
Kenneth