I am using Ceon Advanced Shipper with ZC 1.5.0. I, too, know this is a paid add-on but I am hoping to find a kindred spirit that can lend a hand since Ceon has passed on and JSweb is NOT supporting this module at all.
I am trying to set up the Custom Product Field Configuration/Integration . I followed the instructions in the docomentation and it all seemed to go swimmingly until I tried to actually assign a custom field to a method on the Advanced Shipper Config page; I can choose the custom vield value from dropdown menu - that part works ok. But I cannot save it.
My log files show:
PHP Fatal error: Cannot use string offset as an array in /path/to/file/advshipper_method_config.php on line 981
And this is what I learned:
An offset error in PHP is a fatal error that occurs when you incorrectly try to use an index value for an array on a string variable.
So I sort of understand what the problem is - - the array of option Values and Titles set in admin/includes/languages/english/advshipper_custom_product_field_functionality are strings but the function is looking for an index value.
But don't know how to fix it
Here is the code in question (line 981)If anyone has used the Custom Product Field feature successfully or has any suggestions on how to fix this, I could sure use some help.
PHP Code:// Store any custom product field value selections /////////////////////////////////////////////
if (isset($_POST['custom_product_field_values'])) {
$custom_product_field_values_info = $_POST['custom_product_field_values'];
if (strlen($custom_product_field_values_info) > 0) {
$custom_product_field_values_info_array = explode('||',
$custom_product_field_values_info);
$num_custom_product_field_values = sizeof($custom_product_field_values_info_array);
for ($custom_product_field_value_i = 0; $custom_product_field_value_i <
$num_custom_product_field_values; $custom_product_field_value_i++) {
$custom_product_field_value_info = explode('|',
$custom_product_field_values_info_array[$custom_product_field_value_i]);
$custom_product_field_values[$custom_product_field_value_i]['value'] =
$custom_product_field_value_info[0];
$custom_product_field_values[$custom_product_field_value_i]['title'] =
urldecode($custom_product_field_value_info[1]);
}
}
}



Reply With Quote
