specials.php avec une image |
Bienvenue invité ( Connexion | Inscription )
specials.php avec une image |
26 Mar 2011, 18:20
Message
#1
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Bonjour à tous !
Je suis sur MS2.2 et souhaite afficher une image qui indique aux visiteurs qu'il n'y a pas de promo en cours (fichier specials.php) ... Ca fonctionne presque ! Mon seul souci est que cette image (annonçant qu'il n'y a pas de promo en cours) se cumule avec les produits en promo lorsqu'en j'en créé via l'admin... Certainement un détail à modifier mais vu que je me casse la tête depuis ce matin je sollicite votre aide. Merci à tous ! <?php } ?> <td align="center" class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td> <td align="center" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td> <td align="center" class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td> <td width="0"><?php echo tep_draw_separator('pixel_trans.gif', '0', '0'); ?></td> </tr> </table></td> </tr> </table> </td> </tr> <?php } else { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '0', '1'); ?></td> </tr> <tr> <td valign="middle" align="center"><map name="image"> <area shape="rect" coords="0,0,522,547" href="http://www.monsite.com/catalog/index.php"></a> <img src="/catalog/images/promo.jpg" usemap="#image"></map></td> </tr> <?php } ?> Ce message a été modifié par SamuelBen - 26 Mar 2011, 18:25. |
|
26 Mar 2011, 19:00
Message
#2
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Bonjour,
Si j'ai bien compris : 1) il y a des promos, specials.php s'affiche 2) il n'y a pas de promos, affichage d'une image annonçant "pas de promos" Dans le fichier index, à l'endroit où la box de promo doit s'afficher, on peut faire çà : Code <?php if ($specials_display == 1){ // il y a des promos include(DIR_WS_MODULES . FILENAME_DEFAULT_SPECIALS); } else { // ici le code de l'image } ?> Cela ne serait pas plus simple ? -------------------- 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 |
|
26 Mar 2011, 19:03
Message
#3
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Salut et merci pour ton aide.
J'essaye ça immédiatement et je reviens de suite !!! |
|
26 Mar 2011, 19:13
Message
#4
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Zut ! C'est pas exactement ça...
specials.php est le fichier appelé lorsqu'on clique sur le bouton "PROMOTION". Cette page affiche une image s'il n'y a pas de promo. S'il y a une promo... l'image est remplacée par la promo en cours. Voilà. Donc en fait c'est bien specials.php qui doit être modifié. Mais mon code est bancal... Ce message a été modifié par SamuelBen - 26 Mar 2011, 19:14. |
|
26 Mar 2011, 23:07
Message
#5
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Re,
Désolé pour cette fausse piste alors. Ma MS2 est tellement bidouillée que je ne trouve pas ce bouton "promotion" à cliquer. Il se trouve où normalement ? Par ce qu'on peut reprendre mon idée en changeant un peu le truc : Si promo alors on affiche le bouton promotion Si pas promo alors pas afficher le bouton promotion? -------------------- 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 |
|
27 Mar 2011, 01:01
Message
#6
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Ben ce serait plutôt à moi de m'excuser...
PROMOTION n'est qu'une simple categorie. En fait la condition ne semble pas remplie... Je souhaite avoir : "SI PROMOTION AFFICHE PROMOTION SINON AFFICHE L'IMAGE". Dans mon code il semble que ce ne soit pas le cas puisque mon image s'affiche nickel quand il n'y a pas de promotion mais elle reste au lieu de disparaitre quand je créé une promo... Les 2 s'ajoutent en fait... Merci à toi. Ce message a été modifié par SamuelBen - 27 Mar 2011, 01:03. |
|
27 Mar 2011, 08:15
Message
#7
|
|
Ceinture noire OSC Groupe : TechDev Messages : 2757 Inscrit : 9-September 08 Lieu : Douai Membre no 22915 |
Bonjour !
après Code if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> ajouter Code <?php } else { ?> <tr class="productListing-odd"> <td><?php ici ton titre ?></td> </tr> <tr> <td><?php Ici ton image ?></td> </tr> <?php } } ?> Chti poupon |
|
27 Mar 2011, 08:58
Message
#8
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Bonjour chti_poupon,
Et non... ta méthode me livre : Parse error: syntax error, unexpected T_ELSE in /home/wb80799/catalog/specials.php on line 108 Mince alors je ne pensais pas que c'était pas si simple... Merci à toi d'avoir essayé Ce message a été modifié par SamuelBen - 27 Mar 2011, 08:59. |
|
27 Mar 2011, 13:02
Message
#9
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Re,
Ok, essaye (si c'est bien le code html de l'image de non promo) : Code <?php if ($specials_display != 1){ // il n'y a pas de promos ?>
<tr> <td valign="middle" align="center"><map name="image"> <area shape="rect" coords="0,0,522,547" href="http://www.monsite.com/catalog/index.php"></a> <img src="/catalog/images/promo.jpg" usemap="#image"></map></td> </tr> <?php } ?> -------------------- 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 |
|
27 Mar 2011, 13:21
Message
#10
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Salut,
Je viens d'essayer. Quand j'ai pas de promo l'image de remplacement s'affiche seule, c'est parfait. Mais quand j'ajoute une promo via l'admin la promo s'affiche certes mais l'image de remplacement reste aussi alors qu'elle devrait disparaitre... Merci pour cette tentative. Ce message a été modifié par SamuelBen - 27 Mar 2011, 13:41. |
|
27 Mar 2011, 15:52
Message
#11
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Dans ce cas là cela veut dire que la variable $specials_display ne contient rien quel que soit les situations.
Dans le fichier specials.php qui se trouve dans includes/boxes/ contient-il la déclaration de cette variable ? -------------------- 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 |
|
27 Mar 2011, 17:10
Message
#12
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Dans mon includes/boxes/specials.php, je ne vois pas de $specials_display...
Code <?php /* $Id: specials.php,v 1.31 2003/06/09 22:21:03 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) { ?> <!-- specials //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SPECIALS); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SPECIALS)); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- specials_eof //--> <?php } ?> Si tu y vois plus clair ça m'arrangerait vraiment pas mal... Ce message a été modifié par SamuelBen - 27 Mar 2011, 17:39. |
|
27 Mar 2011, 19:09
Message
#13
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Re,
Juste avant la dernière accolade, il faudrait mettre : $specials_display = 1; Et je pense que cela fonctionnera. -------------------- 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 |
|
27 Mar 2011, 19:24
Message
#14
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Purée... J'y croyais mais c'est exactement pareil...
<?php $specials_display = 1; } ?> Ce message a été modifié par SamuelBen - 27 Mar 2011, 19:24. |
|
27 Mar 2011, 20:29
Message
#15
|
|
Ceinture noire OSC Groupe : TechDev Messages : 2757 Inscrit : 9-September 08 Lieu : Douai Membre no 22915 |
je me suis mal exprimé: il faut ajouter,
Code <?php else { ?> <tr class="productListing-odd"> <td><?php ici ton titre ?></td> </tr> <tr> <td><?php Ici ton image ?></td> </tr> <?php } # fin du else } # fin du if (($specials_split->number_of_rows > 0) etc .. ?> Ceci explique bien le message d'erreur que tu as essuyé. Chti Poupon (Cette solution fonctionne chez moi !) |
|
27 Mar 2011, 22:15
Message
#16
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Merci... merci mais je bug complet...
Code <?php else { ?> <tr class="productListing-odd"> <td><?php ici ton titre ?></td> </tr> <tr> <td><?php Ici ton image ?></td> </tr> <?php } # fin du else } # fin du if (($specials_split->number_of_rows > 0) etc .. ?> Je ne sais pas comment remplir les <?php ici ton titre ?> ou <?php Ici ton image ?> Je galère grave... Merci pour votre patience. |
|
28 Mar 2011, 19:34
Message
#17
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Alors j'en suis là...
Mon specials.php : Code <?php /* $Id: specials.php,v 1.49 2003/06/09 22:35:33 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SPECIALS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SPECIALS)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="4" cellpadding="4"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '21'); ?></td> </tr> <?php $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; $specials_split = new splitPageResults($specials_query_raw, MAX_DISPLAY_SPECIAL_PRODUCTS); if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <!--<td align="center" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>--> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?></td> </tr> <?php } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php $row = 0; $specials_query = tep_db_query($specials_split->sql_query); while ($specials = tep_db_fetch_array($specials_query)) { $row++; echo ' <td align="center" width="100%" class="smallText1"><img src="gauche.jpg"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><img src="droite.jpg"><br><img src="ombre_shirt.jpg"><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . $specials['products_name'] . '</a><br><s>' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</s><span class="productSpecialPrice">' . $currencies->display_price($specials['specials_new_products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</span></td>' . "\n"; if ((($row / 1) == floor($row / 1))) { ?> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <?php } } ?> </tr> </table></td> </tr> <?php if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <?php else { ?> <tr class="productListing-odd"> <td><?php titre ?></td> </tr> <tr> <td> <?php echo '<img src='nopromo.gif'/>'; ?> </td> </tr> <?php } } </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Et... l'erreur en réponse à l'appel du fichier specials.php... : Parse error: syntax error, unexpected T_ELSE in /home/wb80799/catalog/specials.php on line 116 |
|
28 Mar 2011, 19:45
Message
#18
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
J'ai changé pour :
<?php } else { ?> Et maintenant j'ai : Parse error: syntax error, unexpected '}' in /home/wb80799/catalog/specials.php on line 116 Je suis tétu, hein ? |
|
28 Mar 2011, 21:25
Message
#19
|
|
Ceinture noire OSC Groupe : TechDev Messages : 2757 Inscrit : 9-September 08 Lieu : Douai Membre no 22915 |
Sur le specials.php que tu donnes, les lignes 70 à 72 sont à commenter.
Ne pas rajouter de } avant le else Chti poupon PS avec Code echo "titre"; çà ira mieux encore
Ce message a été modifié par chti_poupon - 28 Mar 2011, 21:28. |
|
28 Mar 2011, 21:33
Message
#20
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Salut chti poupon,
Voici mon nouveau specials.php : Code <?php /* $Id: specials.php,v 1.49 2003/06/09 22:35:33 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SPECIALS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SPECIALS)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="4" cellpadding="4"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '21'); ?></td> </tr> <?php $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; $specials_split = new splitPageResults($specials_query_raw, MAX_DISPLAY_SPECIAL_PRODUCTS); if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <!--<td align="center" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>--> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?></td> </tr> //<?php // } //?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php $row = 0; $specials_query = tep_db_query($specials_split->sql_query); while ($specials = tep_db_fetch_array($specials_query)) { $row++; echo ' <td align="center" width="100%" class="smallText1"><img src="gauche.jpg"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><img src="droite.jpg"><br><img src="ombre_shirt.jpg"><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . $specials['products_name'] . '</a><br><s>' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</s><span class="productSpecialPrice">' . $currencies->display_price($specials['specials_new_products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</span></td>' . "\n"; if ((($row / 1) == floor($row / 1))) { ?> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <?php } } ?> </tr> </table></td> </tr> <?php if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <?php else { ?> <tr class="productListing-odd"> <td><?php echo "titre"; ?></td> </tr> <tr> <td> <?php echo '<img src='nopromo.gif'/>'; ?> </td> </tr> <?php } } </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Je me retrouve maintenant avec : Parse error: syntax error, unexpected T_ELSE in /home/wb80799/catalog/specials.php on line 116 Ce message a été modifié par SamuelBen - 28 Mar 2011, 21:35. |
|
28 Mar 2011, 22:45
Message
#21
|
|
Ceinture noire OSC Groupe : TechDev Messages : 2757 Inscrit : 9-September 08 Lieu : Douai Membre no 22915 |
Gag !
Code <?php // } ?> ou Code <!-- <?php } ?> --> ou encore Code <!-- <?php // } ?> --> Mais pas ce que t'as mis ! |
|
29 Mar 2011, 07:55
Message
#22
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Salut chti poupon...
J'ai fais comme tu m'as dit mais maintenant... il me trouve une erreur en début de page : * J'en perd mon latin. Existe il un programme qui corrige le code php ? Parce que si à chaque erreur corrigée il m'en trouve une autre ça peut durant des années, non ? En tout cas merci pour ta grande patience... Ce message a été modifié par SamuelBen - 29 Mar 2011, 07:57. |
|
29 Mar 2011, 08:42
Message
#23
|
|
Ceinture noire OSC Groupe : TechDev Messages : 2757 Inscrit : 9-September 08 Lieu : Douai Membre no 22915 |
Quelle erreur ?
sans doute un / ôté devant une * (entre balises php, /* est un début d zone commentée et */ la fin) Chti poupon |
|
29 Mar 2011, 09:34
Message
#24
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Salut chti poupon,
Je ne suis pas chez moi mais il me semblait que le message d'erreur concernait la ligne 3. Je pige pas grand chose car elle semble commentée comme il faut... Je refait le test ce soir au rentrant du taf... Merci à toi et bonne journée |
|
29 Mar 2011, 18:14
Message
#25
|
|
Ceinture blanche OSC Groupe : Membres Messages : 19 Inscrit : 26-March 11 Membre no 29598 |
Nous disions donc... :
Parse error: syntax error, unexpected T_ELSE in /home/wb80799/catalog/specials.php on line 116 Une idée géniale ? Merci. Ce message a été modifié par SamuelBen - 29 Mar 2011, 19:57. |
|
Version bas débit | Nous sommes le : 29th March 2024 - 12:23 |
Ce site est déclaré auprès de la commision Nationale de l'Informatique et des Libertés (déclaration n°: 1043896) |