Aide - Recherche - Membres - Calendrier
Version complète : [RESOLU]je n'ai plus de champ "nom du produit"
Forum osCommerce-fr > Adapter OsCommerce MS2 > Contributions
paduk
bonjour,

depuis que j'ai installé fckeditor je n'ai plus de champ pour mettre le nom de mon produit confused.gif

de plus dans l'admin j'ai dans l'ordre :

status de produits
Date de disponibilité :
Fabricant du produit :
Description du produit

Meta Tag Information
etc...

et de nouveau

Description du produit mais en utilisant fckeditor. de toute façon l'ancien champ de description des produits n'ait plus pris en compte..
ce qui m'enbête est que je n'ai plus de champ pour mes noms de produits !!!! je sais que je peux mettre un titre utilisant fckeditor mais le résultat est que mon produit s'affiche sans titre comme ICI

vous pouvez voir le nom des produits avant et apres fckeditor...je suis tres content de fckeditor et souhaite le garder mais comment pui-je faire pour retrouver le champ du nom du produit quand j'édite ou je rentre un nouvel article ???

merci de partager votre avis...j'ai regardé mes fichiers mais je ne voie pas ou je dois faire une modif..ou bien dans ma base ?? de plus si les anciens champs de description de produit ne sont plus prise en compte pourquoi sont ils toujours la ?? mad.gif
paduk
comme je l'ai préciser plus haut je ne peux plus entrer de nom pour mes produits.....c'est très génant !!!

j'ai regardé quel fichier j'utilise quand je suis dans l'admin et quand je veux...par exemple entré ou éditer un produit et c'est le fichier catalog/admin/categories.php j'ai donc vérifié si la fonction du nom du produit etait bien là...

j'ai trouvé à plusieur endroit cette déclaration :

$sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),

je ne voie pas pourquoi je n'ai plus ce champ disponible ??? alors qu'il est bien dans mon fichier ?? huh.gif confused.gif shock.gif
fissiaux
C'ets cela qu'il faut que tu cherches dans ton fichier

CODE
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>
            <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>
          </tr>
paduk
bonjour fissiaux,

j'etais jsutement en train de comparer un version non modifier du fichier categories.php avec le mien...

en faite j'ai pas ce code :


<tr>
<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>
<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>

je l'ai donc rajouté et j'ai ceci :

<tr>
<td class="main"><?php echo TEXT_PRODUCTS_STATUS; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_radio_field('products_status', '1', $in_status) . '&nbsp;' . TEXT_PRODUCT_AVAILABLE . '&nbsp;' . tep_draw_radio_field('products_status', '0', $out_status) . '&nbsp;' . TEXT_PRODUCT_NOT_AVAILABLE; ?></td>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?><br><small>(YYYY-MM-DD)</small></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;'; ?><script language="javascript">dateAvailable.writeControl(); dateAvailable.dateFormat="yyyy-MM-dd";</script></td>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>

<tr>
<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>
<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>

après cette modif j'ai bien mon champ (quoi qu'il manque le nom du champ mais bon..) pour le nom de mon produit mais quand je rentre un nom il n'est pas pris en compte...ou quand j'édite un produit déja existent et que je change le nom de celui ci la il n'affiche plus rien....



mais comme tu le sait j'ai fait des modifs pour mes contrib dans ce fichier... biggrin.gif donc tout de suite après les lignes de code ci dessus j'ai ceci :


<!-- HTC BOC //-->
<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

</tr>
</table></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2" class="main"><hr><?php echo TEXT_PRODUCT_METTA_INFO; ?></td>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_PAGE_TITLE; ?></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
<td class="main"><?php echo tep_draw_textarea_field('products_head_title_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_title_tag[$languages[$i]['id']]) ? $products_head_title_tag[$languages[$i]['id']] : tep_get_products_head_title_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>
</table></td>
</tr>
<?php
}
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_HEADER_DESCRIPTION; ?></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
<td class="main"><?php echo tep_draw_textarea_field('products_head_desc_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_desc_tag[$languages[$i]['id']]) ? $products_head_desc_tag[$languages[$i]['id']] : tep_get_products_head_desc_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>
</table></td>
</tr>
<?php
}
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_KEYWORDS; ?></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
<td class="main"><?php echo tep_draw_textarea_field('products_head_keywords_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_keywords_tag[$languages[$i]['id']]) ? $products_head_keywords_tag[$languages[$i]['id']] : tep_get_products_head_keywords_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>
</table></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td colspan="2" class="main"><hr></td>
</tr>
<!-- HTC EOC //-->

ceci viens de l'install de headertegs il me semble...j'ai pourtant bien suivi l'install...aurrai tu une idée pourquoi si je rajoute le bon code il n'en tiens pas compte...doi-je supprimer une ligne de code de la contrib headertags ??? si tu veux je peux te copier mon fichier categories.php mais il est assez gros...?
paduk
fissiaux,

apprement ça marche j'avais oublié cette ligne de code :

<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>

merci pour ton aide...juste une derniere question...pourrait tu me dire à quoi sert cette ligne de code enfin à quoi cela correspond ??
fissiaux
Cette ligne permet d'introsduire la boucle sur les langues. Effectivement, si tu gères plusieurs langues, tu dois donner le nom du produit dans toutes les langues.
paduk
c'est étrange car je n'utilise qu'une langue, le français... j'ai essayé d'enlever ce code et cela ne marche pas je suis obligé de le mettre.. blink.gif

enfin le principal est que ça marche biggrin.gif

merci,


paduk.
Ceci est une version "bas débit" de notre forum. Pour voir la version complète avec plus d'informations, la mise en page et les images, veuillez cliquer ici.
Invision Power Board © 2001-2013 Invision Power Services, Inc.