Sign in to follow this  
Followers 0

alignements produits

8 posts in this topic

Posted · Report post

Pell 6.4

Bonjour

J'ai un souci avec la mise en page des produits en ligne (je n'ai pas testé en colonne).

Les prix sont alignés sur la longueur du titre du produit ce qui fait que suivant les titres, les prix sont plus à gauche ou plus à droite ( c'est pas beau ). :(

Y a t'il une solution ?

Merci.

Share this post


: post
Share on other sites

Posted · Report post

Bonjour,

Le bloc de code correspondant à l'affichage du prix des produits en ligne dans les catégories est celui-ci :


if ($params['mode'] == 'line') {
// Affichage des produits en ligne
$output .= '
<table>';
if ($product_object->is_price_flash(is_reseller_module_active() && is_reseller())) {
$output .= '
<tr>
<td colspan="6" class="col_flash">
' . TEXT_FLASH1 . ' ' . get_formatted_duration(strtotime($product_object->flash_end) - time(), false, 'day') . ' ' . TEXT_FLASH2 . '
</td>
</tr>
';
}
$output .= '
<tr>
<td class="col_image" style="width:10%;">
<a title="' . String::str_form_value($product_object->name) . '" href="' . $urlprod . '">' . $this_image . '</a>
</td>
<td style="width:45%;">
<a href="' . $urlprod . '" title="' . String::str_form_value($product_object->name) . '">' . $product_object->name . '</a>
</td>
<td style="text-align:center; width:12%;">
';
if (empty($product_object->on_estimate)) {
$output .= ((vn($GLOBALS['site_parameters']['category_order_on_catalog']) != 1)?$product_object->affiche_prix(display_prices_with_taxes_active(), is_reseller_module_active() && is_reseller(), true, false, null, false, true, 'full_expand_in_container', false):'');
} else {
$output .= display_on_estimate_information(true);
}
$output .= '
</td>
<td style="text-align:center; width:10%;">';
if ($product_object->on_stock == 1 && is_stock_advanced_module_active()) {
$output .= $product_object->get_product_stock_state();
}
$output .= '
</td>
<td class="col_zoom" style="width:10%;">
' . $zoom_link . ' <br />
<p class="col_detail"><a title="' . String::str_form_value($product_object->name) . '" href="' . $urlprod . '">' . $details_text . '</a></p>
</td>';
if (vn($GLOBALS['site_parameters']['category_order_on_catalog']) == '1' || $type == 'save_cart') {
$output .= '
<td colspan="2" class="fc_add_to_cart">
<!-- Ajout au panier -->';
if (!empty($product_object->on_check) && is_module_gift_checks_active()) {
$output .= affiche_check($product_id, 'cheque', null, true);
} else {
if ($type == 'save_cart') {
$output .= affiche_critere_stock($product_object->id, 'save_cart_details_', null, true, true, vn($prod['save_cart_id']), vn($prod['saved_couleur_id']), vn($prod['saved_taille_id']), vn($prod['saved_id_attribut']), vn($prod['saved_quantity']));
} elseif ($type == 'search') {
$output .= affiche_critere_stock($product_object->id, 'catalogue_details_', null, true);
} else {
$output .= affiche_critere_stock($product_object->id, 'catalogue_details_', null, true, true);
}
}
$output .= '
</td>';
}
$output .= '
</tr>';
if (a_priv('admin_products', false)) {
$output .= '
<tr>
<td colspan="6"><a href="' . $GLOBALS['administrer_url'] . '/produits.php?mode=modif&amp;id=' . $product_object->id . '" class="label">' . MODIFY_PRODUCT . '</a></td>
</tr>';
}
$output .= '
</table><hr />';
}
[/CODE]

Pouvez-vous fournir une url sur laquelle vous avez ce problème ? Je pourrais être plus précis.

Merci

Share this post


: post
Share on other sites

Posted · Report post

Bonjour,

Le bloc de code correspondant à l'affichage du prix des produits en ligne dans les catégories est celui-ci :


	if ($params['mode'] == 'line') {

	 // Affichage des produits en ligne

	 $output .= '

   <table>';

	 if ($product_object->is_price_flash(is_reseller_module_active() && is_reseller())) {

	  $output .= '

	<tr>

	 <td colspan="6" class="col_flash">

	  ' . TEXT_FLASH1 . ' ' . get_formatted_duration(strtotime($product_object->flash_end) - time(), false, 'day') . ' ' . TEXT_FLASH2 . '

	 </td>

	</tr>

	   ';

	 }

	 $output .= '

	<tr>

	 <td class="col_image" style="width:10%;">

	  <a title="' . String::str_form_value($product_object->name) . '" href="' . $urlprod . '">' . $this_image . '</a>

	 </td>

	 <td style="width:45%;">

	  <a href="' . $urlprod . '" title="' . String::str_form_value($product_object->name) . '">' . $product_object->name . '</a>

	 </td>

	 <td style="text-align:center; width:12%;">

	  ';

	 if (empty($product_object->on_estimate)) {

	  $output .= ((vn($GLOBALS['site_parameters']['category_order_on_catalog']) != 1)?$product_object->affiche_prix(display_prices_with_taxes_active(), is_reseller_module_active() && is_reseller(), true, false, null, false, true, 'full_expand_in_container', false):'');

	 } else {

	  $output .= display_on_estimate_information(true);

	 }

	 $output .= '

	 </td>

	 <td style="text-align:center; width:10%;">';

	 if ($product_object->on_stock == 1 && is_stock_advanced_module_active()) {

	  $output .= $product_object->get_product_stock_state();

	 }

	 $output .= '

	 </td>

	 <td class="col_zoom" style="width:10%;">

	  ' . $zoom_link . ' <br />

	  <p class="col_detail"><a title="' . String::str_form_value($product_object->name) . '" href="' . $urlprod . '">' . $details_text . '</a></p>

	 </td>';

	 if (vn($GLOBALS['site_parameters']['category_order_on_catalog']) == '1' || $type == 'save_cart') {

	  $output .= '

	 <td colspan="2" class="fc_add_to_cart">

	  <!-- Ajout au panier -->';

	  if (!empty($product_object->on_check) && is_module_gift_checks_active()) {

	   $output .= affiche_check($product_id, 'cheque', null, true);

	  } else {

	   if ($type == 'save_cart') {

		$output .= affiche_critere_stock($product_object->id, 'save_cart_details_', null, true, true, vn($prod['save_cart_id']), vn($prod['saved_couleur_id']), vn($prod['saved_taille_id']), vn($prod['saved_id_attribut']), vn($prod['saved_quantity']));

	   } elseif ($type == 'search') {

		$output .= affiche_critere_stock($product_object->id, 'catalogue_details_', null, true);

	   } else {

		$output .= affiche_critere_stock($product_object->id, 'catalogue_details_', null, true, true);

	   }

	  }

	  $output .= '

	 </td>';

	 }

	 $output .= '

	</tr>';

	 if (a_priv('admin_products', false)) {

	  $output .= '

	<tr>

	 <td colspan="6"><a href="' . $GLOBALS['administrer_url'] . '/produits.php?mode=modif&amp;id=' . $product_object->id . '" class="label">' . MODIFY_PRODUCT . '</a></td>

	</tr>';

	 }

	 $output .= '

   </table><hr />';

	}

Pouvez-vous fournir une url sur laquelle vous avez ce problème ? Je pourrais être plus précis.

Merci

Bonjour.

Je vous remercie de votre réponse, voici le lien vers le site

http://ipp.pro-site-france.fr

Pour faire exemple, j'ai placé uniquement la rubrique ( coffrets nus ) mais j'aimerais placer le site en son entier.

Merci

Jacques

Share this post


: post
Share on other sites

Posted · Report post

Bonjour.

Je vous remercie de votre réponse, voici le lien vers le site

http://ipp.pro-site-france.fr

Pour faire exemple, j'ai placé uniquement la rubrique ( coffrets nus ) mais j'aimerais placer le site en son entier.

Merci

Jacques

RE:

Je pense avoir trouvé la solution mais ???

$output .= '

<tr>

<td class="col_image" style="width:10%;">

<a title="' . String::str_form_value($product_object->name) . '" href="' . $urlprod . '">' . $this_image . '</a>

</td>

<td style="width:45%;">

<a href="' . $urlprod . '" title="' . String::str_form_value($product_object->name) . '">' . $product_object->name . '</a>

</td>

<td style="text-align:center; width:12%;">

';

J'ai remplacé <td style="width:45%;"> par <td style="width:350px;">

Je pense que ça doit le faire

Merci pour tout

Jacques

Share this post


: post
Share on other sites

Posted · Report post

Bonjour,

Le site est en maintenance, je ne peux pas voir les produits.

$output .= '

<tr>

<td class="col_image" style="width:10%;">

<a title="' . String::str_form_value($product_object->name) . '" href="' . $urlprod . '">' . $this_image . '</a>

</td>

<td style="width:45%;">

<a href="' . $urlprod . '" title="' . String::str_form_value($product_object->name) . '">' . $product_object->name . '</a>

</td>

<td style="text-align:center; width:12%;">

';

.

=> Vous modifiez le bon bloc de code, il faut effectivement régler la taille de ces cellules.

Share this post


: post
Share on other sites

Posted · Report post

bonjour

pourquoi utiliser :String::str_form_value($product_object->name) sur l'attribut title et pas sur sur l'ancre ?

Share this post


: post
Share on other sites

Posted · Report post

Bonjour,

la fonction str_form_value de la classe String permet de formater une chaine de caractère présent dans un attribut HTML :


function str_form_value($value, $flags = ENT_COMPAT)
{
if (function_exists('html_entity_decode') && (version_compare(PHP_VERSION, '5.0.0', '>=') || GENERAL_ENCODING == 'iso-8859-1')) {
// Le 4&#232; argument de htmlspecialchars appel&#233; $double_encode n'est pas disponible avant PHP 5.2.3
// Il faut donc appeler htmlentities_decode d'abord pour &#233;viter le double encodage des entit&#233;s HTML
return htmlspecialchars(String::html_entity_decode($value, ENT_QUOTES, GENERAL_ENCODING), $flags, GENERAL_ENCODING);
} else {
// Version simplifi&#233;e si PHP < 4.3
// ou si PHP >=4.3 et <5 car sinon pas de support de UTF-8
return str_replace('"', '&quot;', $value);
}
}
[/CODE]

D'autres fonctions de formatage existe dans la class pour formater une ancre, en fonction des besoins. De plus, le nom de la fonction [i]str_form_value[/i] oblige à être utilisé dans ce contexte.

Share this post


: post
Share on other sites

Posted · Report post

Bonjour,

Le site est en maintenance, je ne peux pas voir les produits.

.

=> Vous modifiez le bon bloc de code, il faut effectivement régler la taille de ces cellules.

Bien le bonjour.

Excuse pour le retard mais absent quelques jours.

Le système fonctionne très bien et je n'ai plus de problèmes d'alignement de texte et prix pour la version produits en ligne.

J'ai suivi vos conseils comme il se doit et tout est OK

Encore merci.

Jacques.

Share this post


: 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  
Followers 0

Twitter Advisto ecommerce

Facebook PEEL Shopping