petite question css prix et titre d'une couleur différentes |
Bienvenue invité ( Connexion | Inscription )
petite question css prix et titre d'une couleur différentes |
18 Oct 2007, 15:07
Message
#1
|
|
Ceinture jaune OSC Groupe : Membres Messages : 73 Inscrit : 19-January 07 Membre no 14717 |
bonjour
j'ai modifier mon fichier stylesheet pour afficher mon titre et mon prix en gras. ici : TD.productListing-data { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; } mais comment donnez une couleur differente aux prix .... mon titre , mon prix pour mon titre mon prix que dois je rajouter ? d'avance merci |
|
18 Oct 2007, 15:14
Message
#2
|
|
Ceinture jaune OSC Groupe : Membres Messages : 73 Inscrit : 19-January 07 Membre no 14717 |
ou peut etre dans mon fichier products listing ....
ici : case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' '; } je réfléchi Ce message a été modifié par etuzien - 18 Oct 2007, 15:15. |
|
18 Oct 2007, 16:03
Message
#3
|
|
Ceinture noire OSC Groupe : Membres Messages : 2872 Inscrit : 27-June 07 Lieu : Elancourt (78) Membre no 18127 |
Bonjour,
Il suffit de rajouter un <span style="color: #141414;"> </span> à l'endroit où tu veux que cela s'affiche donc le prix pour toi. Par contre je vois que c'est déjà fait pour ce qui est dans le if apparement... CODE ;<span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> Donc il suffit de changer la couleur de la police de la classe productSpecialPrice avec l'attribut color, sauf si ce n'est pas ça que tu dois changer...Pour dans le else: CODE $lc_text = ' <span style="color: #141414;">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; Ca devrait faire l'affaire...Bon courage -------------------- "Les solutions existent toujours depuis longtemps, il suffit de les trouver."
|
|
18 Oct 2007, 16:43
Message
#4
|
|
Ceinture jaune OSC Groupe : Membres Messages : 73 Inscrit : 19-January 07 Membre no 14717 |
je crois que mon bout de code concerne l'admin
voici li fichier en complet : product listing ;[codebox]<?php /* $Id: product_listing.php,v 1.44 2003/06/09 22:49:43 hpdl Exp $ */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); if ($listing_split->number_of_rows > 0) { $listing_query = tep_db_query($listing_split->sql_query); $row = 0; $column = 0; while ($listing = tep_db_fetch_array($listing_query)) { $product_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> '; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' '; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } $product_contents[] = $lc_text; } $lc_text = implode('<br>', $product_contents); $list_box_contents[$row][$column] = array('align' => 'center', 'params' => 'class="productListing-data"', 'text' => $lc_text); $column ++; if ($column >= 3) { $row ++; $column = 0; } } new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } ?> [/codebox] j'ais essayer comme ça mais trouve pas. merci pour ses pistes |
|
9 Oct 2017, 16:10
Message
#5
|
|
Ceinture blanche+ OSC Groupe : Membres Messages : 27 Inscrit : 16-September 05 Lieu : Ile de la Réunion Membre no 7141 |
Bonjour,
je réponds 10 ans après la première demande mais bon si je le fais c'est que je cherchais moi aussi la réponse et que peut-être d'autres s'en serviront. Cela permet d'avoir un titre de produit d'une couleur et un prix d'une autre couleur (et pourquoi pas changer la taille aussi) Voilà mon approche : dans product_info.php ligne 113 il y a un appel PageHeading pour le nom du produit Code <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> et un autre appel pour le prix Code <td class="pageHeading2" align="right" valign="top"><?php echo $products_price; ?></td> Les deux apparemment utilisent la même classe css. Il suffit donc de partir dans le fichier stylesheet.css et de chercher la classe d'appel, chez moi il ressemble à ça avec mes propres couleurs : Code TD.pageHeading, DIV.pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 20px; font-weight: bold; color: #0000CC; } tu fais donc une autre class que tu nomes comme tu veux, moi j'ai fais très simple j'ai juste rajouté un 2 : Code TD.pageHeading2, DIV.pageHeading2 { font-family: Verdana, Arial, sans-serif; font-size: 20px; font-weight: bold; color: #0000CC; } Il faut donc faire pareil pour l'appel du css du prix : Code <td class="pageHeading2" align="right" valign="top"><?php echo $products_price; ?></td> Voilà, bonne continuation si vous lisez ceci. -------------------- MS2, Contrib big image, tag controler, google sitemap, heu...j'ai oublié
|
|
Version bas débit | Nous sommes le : 30th March 2024 - 04:01 |
Ce site est déclaré auprès de la commision Nationale de l'Informatique et des Libertés (déclaration n°: 1043896) |