IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

EDI, CMS, Outils, Scripts et API PHP Discussion :

[osCommerce] Changer le présentation des promotions specials.php


Sujet :

EDI, CMS, Outils, Scripts et API PHP

  1. #1
    Candidat au Club
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2009
    Messages : 3
    Points : 2
    Points
    2
    Par défaut [osCommerce] Changer le présentation des promotions specials.php
    Bonjour

    je bosse sur la page specials.php "les promotions" je veux remplacer le design specials.php par le design Mindsparx specials
    http://addons.oscommerce.com/info/6460 je galère trop pour la modification.

    Je vous laisse mon code specials.php

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    <?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" "http://www.w3.org/TR/html4/loose.dtd">
    <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">
    <LINK REL="SHORTCUT ICON" HREF="http://www.materiel-cycle.com/images/favicon.ico">
    </head>
    <body>
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->
     
    <!-- body //-->
    <table border="0" summary="" width="1060" cellspacing="0" cellpadding="5" align="center" class="fdc">
      <tr>
        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" summary="" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">
    <!-- 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" summary="" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
              <tr>
              <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>
                <td align="center" style="font-size: 22px;font-weight: bold; color: #333333;
                border-bottom: 2px solid #FFD30C;" 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%', '10'); ?></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" summary="" width="100%" cellspacing="0" cellpadding="0">
              <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
      }
    ?>
          <tr>
            <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
              <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="33%" class="smallText"><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><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><br><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 / 3) == floor($row / 3))) {
    ?>
              </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 == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
    ?>
          <tr>
            <td><br><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
              <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>
    <?php
      }
    ?>
        </table></td>
    <!-- body_text_eof //-->
        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" summary="" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">
    <!-- 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 //-->
    <br>
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
    Code Mindsparx specials

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    <?php
    /*
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
      Copyright (c) 2009 osCommerce
    
      Created by Mindsparx 2009
      http://www.mindsparx.org
      Released under the GNU General Public License
    */
    ?>
     
     
    <!-- Mindsparx specials //-->
    <?php
     
      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, p.products_price, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_prix 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 . "' and s.status = '1' order by RAND() 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, p.products_price, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_prix 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 . "' and s.status = '1' order by RAND() limit " . MAX_DISPLAY_NEW_PRODUCTS);
      }
     
      $row = 0;
      $col = 0;
      $info_box_contents = array();
      while ($new_products = tep_db_fetch_array($new_products_query)) {
            $sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$new_products['products_id'].' && language_id='.(int)$languages_id;
            $description_query = tep_db_query($sql);
            $description = mysql_fetch_array($description_query, MYSQL_ASSOC);        
            $description['products_description'] = substr($description['products_description'], 0, 50);
            $desc_len = strlen($description['products_description']);
               $show['desc'] = $description['products_description'];
     
     
     
        $info_box_contents[$row][$col] = array('align' => 'center',
                                               'params' => ' ',
                                               'text' => '
                                              
                                            <table class="box_outline3"  width="98%" border="0" cellspacing="5" cellpadding="0">
      <tr>
       <td align="left" valign="top"><div style="padding-top:10px;"><a class="specials_name" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></div><div align="left" class="specials_desc">'.$show['desc'].'...</div></td>
        <td width="80" rowspan="3" align="center" valign="middle"><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></td>
      </tr>
      <tr>
        <td height="20" align="center" class="specials_old_price" valign="bottom">'. SPECIALS_OLD_PRICE .'<s>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</s></td>
      </tr>
      <tr>
        <td height="30" valign="top"><table align="center" width="96" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" width="96" height="26" background="images/special_price.gif"><span class="specials_price">'. SPECIALS_PRICE .'' . $currencies->display_price($new_products['products_prix'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span></td>
      </tr>
    </table>
    </td>
      </tr>
    </table>'
     
        );    
        $col ++;
        if ($col > 1) {
          $col = 0;
          $row ++;
        }
      }
      new contentBox($info_box_contents);
    ?>
    <!-- Mindsparx specials //-->
    je galère aidez moi svp
    Cordialement

  2. #2
    Candidat au Club
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2009
    Messages : 3
    Points : 2
    Points
    2
    Par défaut la colonne de droite est en desous du site
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    <?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" summary="" width="100%" cellspacing="0" cellpadding="0">
              <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
      }
    ?>
          <tr>
            <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
              <tr>
    <?php
        $row = 0;
        $col = 0;
        $specials_query = tep_db_query($specials_split->sql_query);
        while ($specials = tep_db_fetch_array($specials_query)) {
     
    	$sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$specials['products_id'].' && language_id='.(int)$languages_id;
    $description_query = tep_db_query($sql);
    $description = mysql_fetch_array($description_query, MYSQL_ASSOC);
    $description['products_description'] = substr($description['products_description'], 0, 50);
    $desc_len = strlen($description['products_description']);
    $show['desc'] = $description['products_description'];
     
     
         $specials['products_name'] = tep_get_products_name($specials['products_id']);
    $info_box_contents[$row][$col] = array('align' => 'center',
    'params' => ' ',
    'text' => '
    
    						<table class="box_outline3"  width="98%" border="0" cellspacing="5" cellpadding="0">
      <tr>
       <td align="left" valign="top"><div style="padding-top:10px;"><a class="specials_name" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' .  $specials['products_name'] . '</a></div><div align="left" class="specials_desc">'.$show['desc'].'...</div></td>
        <td width="80" rowspan="3" align="center" valign="middle"><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></td>
      </tr>
      <tr>
        <td height="20" align="center" class="specials_old_price" valign="bottom">'. SPECIALS_OLD_PRICE .'<s>' . $currencies->display_price( $specials['products_price'], tep_get_tax_rate( $specials['products_tax_class_id'])) . '</s></td>
      </tr>
      <tr>
        <td height="30" valign="top"><table align="center" width="96" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" width="96" height="26" background="images/special_price.gif"><span class="specials_price">'. SPECIALS_PRICE .'' . $currencies->display_price( $specials['products_prix'], tep_get_tax_rate( $specials['products_tax_class_id'])) . '</span></td> 
      </tr>
    </table>
    </td>
      </tr>
    </table>'
     
    );
    $col ++;
    if ($col > 1) {
    $col = 0;
    $row ++;
    }
    }
    new contentBox($info_box_contents);
    ?>

Discussions similaires

  1. Présentation des nouveautés de Java 5.0 Tiger (J2SE 1.5)
    Par christopheJ dans le forum Langage
    Réponses: 43
    Dernier message: 30/09/2007, 17h38
  2. [osCommerce] Changer les titres et l'encadrement des entêtes des boxes
    Par sasaas dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 7
    Dernier message: 23/06/2007, 14h10
  3. Comment changer le répertoire des fichiers temporaires ?
    Par devdev dans le forum MS SQL Server
    Réponses: 9
    Dernier message: 01/09/2004, 14h18
  4. Redhat-9 changer le path des databases
    Par jean christophe dans le forum Installation
    Réponses: 7
    Dernier message: 30/05/2003, 17h53
  5. Réponses: 2
    Dernier message: 03/10/2002, 17h24

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo