Zen Cart Logo
Forums / Bug Reports / [Duplicate] product name gone when editing a product

[Duplicate] product name gone when editing a product

Locked

Views: 1,261

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
23 May 2011, 8:42 PM
#1
rob_musquetier avatar

rob_musquetier

New Zenner

Join Date:
May 2011
Location:
The Netherlands
Posts:
4
Plugin Contributions:
0

[Duplicate] product name gone when editing a product

I don't know if someone has already reported this bug yet but after a fresh install of version 1.3.9h the product name was not filled in when a product was updated.

I was able to solve this by changing file admin/includes/modules/products/collect_info.php

from (line 297 - 300):

      <tr>
        <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>
        <td class="main"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? htmlspecialchars(stripslashes($products_name[$languages[$i]['id']]), ENT_COMPAT, CHARSET, TRUE) : htmlspecialchars(zen_get_products_name($pInfo->products_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE)), zen_set_field_length(TABLE_PRODUCTS_DESCRIPTION, 'products_name')); ?></td>
      </tr>

into:

      <tr>
        <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>
<?php if (isset($products_name[$languages[$i]['id']])) $p = htmlspecialchars(stripslashes($products_name[$languages[$i]['id']]), ENT_COMPAT, CHARSET, TRUE); else $p = htmlspecialchars(zen_get_products_name($pInfo->products_id, $languages[$i]['id'])); ?>
        <td class="main"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_input_field('products_name[' . $languages[$i]['id'] . ']', $p, zen_set_field_length(TABLE_PRODUCTS_DESCRIPTION, 'products_name')); ?></td>
      </tr>

regards,
Rob Musquetier
The Netherlands