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

[Duplicate] product name gone when editing a product

Locked

Started by rob_musquetier on 23 May 2011, 8:42 PM · Views: 1,266

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

24 May 2011, 1:57 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: [Duplicate] product name gone when editing a product

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.