Affichage prix et Prix barré dans nouveaux produits du mois |
Bienvenue invité ( Connexion | Inscription )
Affichage prix et Prix barré dans nouveaux produits du mois |
3 Jun 2014, 17:44
Message
#1
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 133 Inscrit : 1-October 06 Lieu : RIOM 63 Membre no 12386 |
Bonjour
Je voudrais savoir si il existe une solution ou contrib pour afficher le prix barré sous le prix de base dans nouveau produit du mois ( Destockage ou autre tape à l'oeil ). Je suis nul pour modifier une contrib donc si il existe quelque chose de simple....Je vous remercie par avance. je cherche, mais je pense que je cherche pas au bon endroit !!!! -------------------- OsCommerce 2.2-MS2 . FR-060817. cDynamic Meta Tags V1.6. Colissimo. Virement Bancaire.
|
|
4 Jun 2014, 08:15
Message
#2
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Bonjour à mon voisin départemental,
Oui c'est possible Cela va se passer dans les fichiers : 1) catalog/includes/modules/new_products.php 2) catalog/stylesheet.css Donc dans le 1) remplacer vers la ligne 20 : Code if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } par : Code if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, s.status, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } puis vers la ligne 31 remplacer : Code $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))); par : Code if (isset($new_products['specials_new_products_price'])){ $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br><span class="specialPrice">' . $currencies->display_price($new_products['specials_new_products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span><br><span class="oldPrice">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span>'); } else { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))); } Pour le 2), ajouter en fin de fichier : Code .specialPrice { color: #ff0000; } .oldPrice { text-decoration: line-through; } Bien sûr si les couleurs ne te conviennent pas, c'est là qu'il te faut les changer. -------------------- Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse) Config 2 en local avec UwAmp : Osc Phoenix |
|
4 Jun 2014, 09:35
Message
#3
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 133 Inscrit : 1-October 06 Lieu : RIOM 63 Membre no 12386 |
Super Simple à mettre en place et ça fonctionne du 1er Jet !!! Merci Bonbec !!
Par Hasard sais tu comment rajouter un petit texte encadré " Solde" ou " Déstockage" ou " Promo" devant le prix le plus bas ? Merci de ton aide ....( De votre aide ). Ce message a été modifié par docvelo - 4 Jun 2014, 09:36. -------------------- OsCommerce 2.2-MS2 . FR-060817. cDynamic Meta Tags V1.6. Colissimo. Virement Bancaire.
|
|
4 Jun 2014, 12:40
Message
#4
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Re,
Le texte est récupéré par une variable ou c'est à mettre en dur dans le code (avec un soucis si c'est pour un éventuel site multi-langue) ? Pour l'encadré, il y a le choix du css (mais pas lu par IE < 8 je crois me souvenir) ou compatible avec tous les navigateurs avec une structure <table>...</table> -------------------- Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse) Config 2 en local avec UwAmp : Osc Phoenix |
|
6 Jun 2014, 13:51
Message
#5
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 133 Inscrit : 1-October 06 Lieu : RIOM 63 Membre no 12386 |
salut Bonbec....
Là tu me parle pas en AUVERGNAT !!! c'est du language que je ne connais pas. Je sais simplement faire les modifs que l'on m'explique ou que je trouve à droite ou à Gauche.... Pour Info mon site n'est qu'en français et pour le reste je suis pas difficile... moi mon Job c'est les vélos et si tu en fais alors je serai redevable... Voila si tu sais le code qu'il faut mettre et ou je dois le mettre alors je suis preneur. Merci -------------------- OsCommerce 2.2-MS2 . FR-060817. cDynamic Meta Tags V1.6. Colissimo. Virement Bancaire.
|
|
6 Jun 2014, 14:46
Message
#6
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Salut docvelo,
Je suis Bourbonnais na ! D'accord, avalé par l'Auvergne et bientôt par Rhône-Alpes Auvergne Je sais que tu es dans le vélo, j'avais été voir ton site et j'avais vu que tu n'avais pas perdu de temps pour mettre mon code en ligne Je ne suis pas dans le vélo, ni même dans la programmation. Si tu vas voir le site dans mon profil, tu verras ce que je fais ... c'est du petit petit Je regarderais dans la soirée ce que je peux te pondre comme truc en fonction des infos que tu m'as donné, par ce que là j'ai pas mal de fabrications à terminer puis à mettre en sachets pour regarnir mon site. A+ -------------------- Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse) Config 2 en local avec UwAmp : Osc Phoenix |
|
7 Jun 2014, 00:35
Message
#7
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Bon, me revoilà.
C'est du lourd, presque une contrib ... En fait, j'ai voulu que le texte affiché puisse être différent pour chaque article selon le type d'action que l'on souhaite faire. ===> Teste d'abord en local avant de mettre sur ton site en production. Il y a 4 grandes étapes : 1) modification de la table specials 2) modification de plusieurs fichiers dans l'administration 3) modification de l'affichage côté client 4) modification du fichier de css 1) modification de la table specials Dans PhpMyAdmin Code ALTER TABLE `specials` ADD `specials_reason` ENUM( '', 'Solde', 'Déstockage', 'promotion' ) NOT NULL AFTER `specials_new_products_price`; 2) modification de plusieurs fichiers dans l'administration Dans admin/includes/functions/html_output.php ajouter à la fin avant le ?> Code // Output a form pull down menu pour ENUM function tep_draw_pull_down_menu_enum($table_name, $column_name, $selected='') { $field = "<select name=".$column_name.">"; $result = mysql_query("SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table_name' AND COLUMN_NAME = '$column_name'") or die (mysql_error()); $row = mysql_fetch_array($result); $enumList = explode(",", str_replace("'", "", substr($row['COLUMN_TYPE'], 5, (strlen($row['COLUMN_TYPE'])-6)))); foreach($enumList as $value){ if($value == $selected){ $field .= "<option value=$value SELECTED>$value</option>"; } else { $field .= "<option value=$value>$value</option>"; } } $field .= "</select>"; return $field; } Dans admin/includes/languages/french/specials.php ajouter à la fin avant le ?> Code define('TEXT_SPECIALS_REASON', 'Raison'); // raison du prix spécial define('TABLE_HEADING_SPECIALS_REASON', 'Raison'); Dans admin/specials Vers la ligne 30, juste après : Code $specials_price = tep_db_prepare_input($HTTP_POST_VARS['specials_price']); Mettre : Code $specials_reason = tep_db_prepare_input($HTTP_POST_VARS['specials_reason']); Vers la ligne 51, trouver : Code tep_db_query("insert into " . TABLE_SPECIALS . " (products_id, specials_new_products_price, specials_date_added, expires_date, status) values ('" . (int)$products_id . "', '" . tep_db_input($specials_price) . "', now(), '" . tep_db_input($expires_date) . "', '1')"); Remplacer par : Code //tep_db_query("insert into " . TABLE_SPECIALS . " (products_id, specials_new_products_price, specials_date_added, expires_date, status) values ('" . (int)$products_id . "', '" . tep_db_input($specials_price) . "', now(), '" . tep_db_input($expires_date) . "', '1')"); tep_db_query("insert into " . TABLE_SPECIALS . " (products_id, specials_new_products_price, specials_reason, specials_date_added, expires_date, status) values ('" . (int)$products_id . "', '" . tep_db_input($specials_price) . "', '" . tep_db_input($specials_reason) . "', now(), '" . tep_db_input($expires_date) . "', '1')"); Vers la ligne 59, juste après : Code $specials_price = tep_db_prepare_input($HTTP_POST_VARS['specials_price']); Mettre : Code $specials_reason = tep_db_prepare_input($HTTP_POST_VARS['specials_reason']); Vers la ligne 72, trouver : Code tep_db_query("update " . TABLE_SPECIALS . " set specials_new_products_price = '" . tep_db_input($specials_price) . "', specials_last_modified = now(), expires_date = '" . tep_db_input($expires_date) . "' where specials_id = '" . (int)$specials_id . "'"); Remplacer par : Code //tep_db_query("update " . TABLE_SPECIALS . " set specials_new_products_price = '" . tep_db_input($specials_price) . "', specials_last_modified = now(), expires_date = '" . tep_db_input($expires_date) . "' where specials_id = '" . (int)$specials_id . "'"); tep_db_query("update " . TABLE_SPECIALS . " set specials_new_products_price = '" . tep_db_input($specials_price) . "', specials_reason = '" . tep_db_input($specials_reason) . "',specials_last_modified = now(), expires_date = '" . tep_db_input($expires_date) . "' where specials_id = '" . (int)$specials_id . "'"); Vers la ligne 135, trouver : Code $product_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, s.specials_new_products_price, s.expires_date from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id and s.specials_id = '" . (int)$HTTP_GET_VARS['sID'] . "'"); Remplacer par : Code // $product_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, s.specials_new_products_price, s.expires_date from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id and s.specials_id = '" . (int)$HTTP_GET_VARS['sID'] . "'"); $product_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, s.specials_reason, s.specials_new_products_price, s.expires_date from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id and s.specials_id = '" . (int)$HTTP_GET_VARS['sID'] . "'"); Vers la ligne 158, juste après : Code <tr> <td class="main"><?php echo TEXT_SPECIALS_SPECIAL_PRICE; ?> </td> <td class="main"><?php echo tep_draw_input_field('specials_price', (isset($sInfo->specials_new_products_price) ? $sInfo->specials_new_products_price : '')); ?></td> </tr> Mettre : Code <tr> <td class="main"><?php echo TEXT_SPECIALS_REASON; ?> </td> <td class="main"><?php echo tep_draw_pull_down_menu_enum(TABLE_SPECIALS, 'specials_reason', $sInfo->specials_reason);?></td> </tr> Vers la ligne 189, juste après : Code <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRODUCTS_PRICE; ?></td> Mettre : Code <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SPECIALS_REASON; ?></td> Vers la ligne 195, trouver : Code $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, s.specials_id, s.specials_new_products_price, s.specials_date_added, s.specials_last_modified, s.expires_date, s.date_status_change, s.status from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id order by pd.products_name"; Remplacer par : Code // $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, s.specials_id, s.specials_new_products_price, s.specials_date_added, s.specials_last_modified, s.expires_date, s.date_status_change, s.status from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id order by pd.products_name"; $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, s.specials_id, s.specials_new_products_price, s.specials_reason, s.specials_date_added, s.specials_last_modified, s.expires_date, s.date_status_change, s.status from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id order by pd.products_name"; 3) modification de l'affichage côté client Dans includes/modules/new_products.php Vers la ligne 22, trouver : Code $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, s.status, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } Remplacer par : Code // $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, s.status, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, s.status, s.specials_new_products_price, s.specials_reason, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, s.specials_reason, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } Vers la ligne 36, trouver : Code 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br><span class="specialPrice">' . $currencies->display_price($new_products['specials_new_products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span><br><span class="oldPrice">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span>'); Remplacer par : Code // 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br><span class="specialPrice">' . $currencies->display_price($new_products['specials_new_products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span><br><span class="oldPrice">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span>'); 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br><span class="specialPrice">' . $currencies->display_price($new_products['specials_new_products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span><br><span class="reason"> ' . $new_products['specials_reason'] . ' </span> <span class="oldPrice">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span>'); 4) modification du fichier de css Dans catalog/stylesheet.css Juste après : Code .specialPrice { color: #ff0000; } .oldPrice { text-decoration: line-through; } Ajouter : Code .reason { background-color: yellow; } Voilà, j'ai placé un fond jaune sous le texte explicatif, c'est compatible avec tous les navigateurs acceptant les CSS. Pour être logique, cet affichage devrait aussi figurer sur les différentes pages affichant un prix baissé mais ce n'est pas l'objet de ta demande. Ce message a été modifié par Bonbec - 7 Jun 2014, 00:36. -------------------- Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse) Config 2 en local avec UwAmp : Osc Phoenix |
|
7 Jun 2014, 07:29
Message
#8
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Re,
Le code ci-dessus est pour un site mono langue. Je le referais pour un site multi langue si çà intéresse du monde (à vrai dire je suis le premier intéressé ) -------------------- Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse) Config 2 en local avec UwAmp : Osc Phoenix |
|
7 Jun 2014, 16:00
Message
#9
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 133 Inscrit : 1-October 06 Lieu : RIOM 63 Membre no 12386 |
Merci BONBEC le BOURBONNAIS Auvergnat ...
Je regarde rapidement ce fonctionnement et te tiens au courant... Merci encore PS : Je suis tous les Lundi à St Yorre pour donner des cours de tango Argentin, comme quoi les Bourbonnais je les aimes bien ( Surtout les Bourbonnaises ) -------------------- OsCommerce 2.2-MS2 . FR-060817. cDynamic Meta Tags V1.6. Colissimo. Virement Bancaire.
|
|
Version bas débit | Nous sommes le : 29th March 2024 - 00:26 |
Ce site est déclaré auprès de la commision Nationale de l'Informatique et des Libertés (déclaration n°: 1043896) |