Jump to content
Sign in to follow this  
Hailstorm

Additional Images "delete image" Problem!

Recommended Posts

Greetings noble members of the osc-forum.

 

I've installed the latest version of additional images and I'm very satified with it. But while testing all functions I had a problem. When I want to delete a picture form the admin panel, I recieve this message:

Fatal error: Call to undefined function: si() in /homepages/18/d13508335/htdocs/catalog/admin/categories.php on line 319

So I had a look at this section but found no obvious error? So here is the "delete image" section of the categories.php:

case 'del_images':

        $additional_images_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);

        

        if ( ($HTTP_POST_VARS['products_id']) && (is_array($HTTP_POST_VARS['additional_images_id'])) ) {

          $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);

          $additional_images_id = $HTTP_POST_VARS['additional_images_id'];

                          

          for ($i=0; $i<si($additional_images_id); $i++) {

            tep_db_query("te from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . tep_db_input($additional_images_id[$i]) . "'");

          }               

        }                 

        //tep_db_query("de from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . $HTTP_POST_VARS['additional_images_id'] . "'");

        tep_redirect(tep_hlink(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id));

        break;

At line 319 you'll find this:

for ($i=0; $i<si($additional_images_id); $i++) {

            tep_db_query("te from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . tep_db_input($additional_images_id[$i]) . "'");

          }              

        }

 

So if someone has an idea how to fix my problem?


Mike

May the force be with you.

Share this post


Link to post
Share on other sites

From an Earlier Post:

The code is missing characters all over the place. Here is the correct code
.

 

 

case 'del_images': 

       $additional_images_id = tep_db_prepare_input($HTTP_GET_VARS['pID']); 

       

       if ( ($HTTP_POST_VARS['products_id']) && (is_array($HTTP_POST_VARS['additional_images_id'])) ) { 

         $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); 

         $additional_images_id = $HTTP_POST_VARS['additional_images_id']; 



         for ($i=0; $i<sizeof($additional_images_id); $i++) { 

           tep_db_query("delete from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . tep_db_input($additional_images_id[$i]) . "'"); 

         } 

       } 

       //tep_db_query("delete from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . $HTTP_POST_VARS['additional_images_id'] . "'"); 

       tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id)); 

       break;

 

I changed this in Categories.php and it worked for me

 

Good Luck

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×