osCommerce France : Accueil Forum Portail osCommerce France Réponses aux questions Foire aux contributions

Bienvenue invité ( Connexion | Inscription )

3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
> [RESOLU]box déroulante pour whats_new.php..., le code est la...
gluthecat
posté 14 Mar 2006, 01:57
Message #26


Ceinture jaune OSC
Icône de groupe

Groupe : Membres
Messages : 77
Inscrit : 26-July 05
Membre no 6618



Sympa cette petite box, merci les gars.

Juste un petit truc, le défilement des produits s'effectue toujours dans le même ordre. Serait il possible de les faire défiler au hasard ?


--------------------
J'utilise MS2 FR !
Go to the top of the page
 
paduk
posté 14 Mar 2006, 10:30
Message #27


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



salut !


j'aimerais aussi savoir !!!! tongue.gif


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
fissiaux
posté 14 Mar 2006, 20:07
Message #28


5eme dan OSC
Icône de groupe

Groupe : Membres
Messages : 17048
Inscrit : 26-November 03
Lieu : Chez moi
Membre no 1669



Les p et pd sont des alias. Quand tu déclares "products p" ensuite dans le reste de la requete à la place de coder products.products_id, tu peux mettre p.products_id.

Pour l'aléatoire, continuez un peu à vous creuser la tête, cela fait du bien parait il ! biggrin.gif

La réponse est quand même dans le order by .
Go to the top of the page
 
gluthecat
posté 15 Mar 2006, 01:03
Message #29


Ceinture jaune OSC
Icône de groupe

Groupe : Membres
Messages : 77
Inscrit : 26-July 05
Membre no 6618



Merci chef !

Ci dessous le code modifié (sans balise html pour mes besoins). Par contre à chaque changement de page, cela fait un effet très désagréable car la hauteur de la box n'est pas fixe. Voir mon site, il y aurait possibilité de bloquer cette hauteur ?

CODE

<?php
$rp_query = tep_db_query("select p.products_id, pd.products_name, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'  order by rand() limit " . MAX_DISPLAY_NEW_PRODUCTS);
if (tep_db_num_rows($rp_query)) {
?>


<!-- whats_new //-->
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW));

while ($random_product = tep_db_fetch_array($rp_query)) {
$rp .= '<center><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>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
$rp .= "<br><br>";
}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="120" scrollamount= "2" scrolldelay= "20" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>');

new infoBox($info_box_contents);
?>
<!-- whats_new_eof //-->
<?php
}
?>


--------------------
J'utilise MS2 FR !
Go to the top of the page
 
paduk
posté 15 Mar 2006, 12:43
Message #30


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



c'est vrai que ça fait du bien de ce creser la tête de temps en temps.... tongue.gif biggrin.gif

enfin perso j'ai pas le même probleme que toi...quand je change de page tu peux voir mon site ICI par contre en effet si je fais un refresh de la page la le temps que la page ce charge j'ai une box assez long en hauteur....


mais bon cela ne me dérange pas outre mesure...


donc je ne peux t'aider car je ne voie pas ou est la soluce pour ton probleme.....par contre je voie que tu as une taille de box à 120 ca change quelque chose si tu l'a met un peut plus grande ??


enfin bon...


a++

paduk


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
fissiaux
posté 15 Mar 2006, 20:34
Message #31


5eme dan OSC
Icône de groupe

Groupe : Membres
Messages : 17048
Inscrit : 26-November 03
Lieu : Chez moi
Membre no 1669



Bravo...

Comme quoi, quand on se donne la peine, on trouve tout seul. biggrin.gif
Go to the top of the page
 
gluthecat
posté 15 Mar 2006, 20:47
Message #32


Ceinture jaune OSC
Icône de groupe

Groupe : Membres
Messages : 77
Inscrit : 26-July 05
Membre no 6618



Je dois avoir un problème avec le cache, je vais essayer de voir cela.


--------------------
J'utilise MS2 FR !
Go to the top of the page
 
nemrod34
posté 21 Mar 2006, 17:12
Message #33


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



Bonjour et félicitations (je viens de poster ailleurs sur la même chose) , serait'il possible d'avoir une contrib de ça (compatible théma ? avec deux blondes une rousse et une boite de chocolats? tongue.gif )?
Car je vais reprendre le post du début mais je ne suis pas sur d'avoir toutes les données :
- il faut featured avant
- c'est featured qu'on modifis
- et c'est comptible ms 2
c'est bien ca ?


bart42 si je peut me permettre je suis en 1280 et ta bannièrre n'est pas centrée elle à gauche c'est domage wink.gif


--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 
paduk
posté 21 Mar 2006, 17:21
Message #34


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



salut nemrod34,

oui c'est compatible avec ms2...mais le code est pour la box what's new....



tu peux voir ce que ca donne ICI

A++


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
nemrod34
posté 21 Mar 2006, 18:01
Message #35


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



Oui oui c'est exactement ce que je voulais, donc j'installe fetured product et me voilà avec ça :
CODE
Warning: main(includes/classes/navigation_history.php): failed to open stream: No such file or directory in /home/beziers/public_html/boutiquedemo/admin/includes/application_top.php on line 126

Warning: main(includes/classes/navigation_history.php): failed to open stream: No such file or directory in /home/beziers/public_html/boutiquedemo/admin/includes/application_top.php on line 126

Fatal error: main(): Failed opening required 'includes/classes/navigation_history.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/beziers/public_html/boutiquedemo/admin/includes/application_top.php on line 126


mais dois-je comprendre que je m'ennuis pour rien avec cette contrib ? shock.gif


--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 
paduk
posté 21 Mar 2006, 18:14
Message #36


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



je sais pas blink.gif

que veux tu faire exactement ?


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
nemrod34
posté 21 Mar 2006, 18:24
Message #37


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



Pour l'instant remettre en place laugh.gif

ca vas mais j'ais des " ? " à la place des " é " et " è "

Sinon ca fait un moment que je cherche à avoir une box défilante comme chez toi (tu utilise aussi thémabox non ? ) et si en plus on peut définir un nombre de nouveautés qui défiles, et lesquelles ca serait le pied !


--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 
paduk
posté 21 Mar 2006, 18:29
Message #38


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



regarde ma signature..je n'utilise pas themabox !

je n'utilise pas non plus featured product !

et pour la box défilante je ne pige pas ou est le problème...voici mon code pour catalog/include/box/whats_new

CITATION

<?php
/*
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/

//$rp_query = tep_db_query("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");
//if (tep_db_num_rows($rp_query)) {

$rp_query = tep_db_query("select p.products_id, pd.products_name, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by rand() limit " . MAX_RANDOM_SELECT_NEW);
if (tep_db_num_rows($rp_query)) {
?>


<!-- whats_new //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW));

while ($random_product = tep_db_fetch_array($rp_query)) {
$rp .= '<center><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>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));

}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "14" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>');

new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- whats_new_eof //-->
<?php
}
?>



bon code


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
nemrod34
posté 21 Mar 2006, 18:31
Message #39


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



OK j'essais de remttre un language comphréensible en français en place, et je teste ça .
le truc c'est que j'avais essayé et gallérré avec thémabox mais on vas y arrvier merci beaucoup.


--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 
paduk
posté 21 Mar 2006, 18:33
Message #40


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



par contre je voie que tu as agrandissement sans popup tu peux me donner le lien stp ??


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
nemrod34
posté 21 Mar 2006, 19:04
Message #41


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



Bon c'est presque parfait !
Déjà bravo et merci ca fait un moment que je cherché ça !

Sinon j'utilise thémabox et la contrib qui cache le bouton "acheter" et le prix si le prix est à zéro:
Donc il reste à
ne pas afficher de prix pour ces articles
espacer un chouia entre deux articles
afficher le prix promos

sinon ça roule , je vais voir le fix de la contib "boxes défilantes promotions " pour le prix des promotions
(même si je suis quasi sur de pas y faire grand chose ...)

Pour ceux que ca nteresse en prennant en compte les deux contribs que j'utilise à savoir :
thémabox et hide price if 0 le code donne ça :

CODE
<?php
/*
  $Id: whats_new.php,v 1.31 2003/02/10 22:31:09 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
//$rp_query = tep_db_query("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");
//if (tep_db_num_rows($rp_query)) {

$rp_query = tep_db_query("select p.products_id, pd.products_name, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by rand() limit " . MAX_RANDOM_SELECT_NEW);
if (tep_db_num_rows($rp_query)) {
?>


<!-- whats_new //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);

// Nom du fichier image à indiquer pour l'afficher en haut de la boxe
// new infoBoxHeading($info_box_contents, image_de_gauche, nom_du_css, affichage_text_box, image_de_droite, image_du_lien, adresse_du_lien);
    new infoBoxHeading($info_box_contents, false, infoBoxHeadingWatsNew, false, false, box_wats_new, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'));

    if (tep_not_null($random_product['specials_new_products_price'])) {
      $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>';
      $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
    } else {
     //$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
    // Start "Hide Price if $0" edit 1 of 1 (uncomment above line if removing this contribution)
    $whats_new_price = (($random_product['products_price'] > 0) ? $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) : '');
    // End "Hide Price if $0" edit 1 of 1

    }
    while ($random_product = tep_db_fetch_array($rp_query)) {
$rp .= '<center><br><br><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>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));

}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "14" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>');
    

// Nom des css pour l'intérieure de la boxe et le cadre
// new infoBox($info_box_contents, nom_de_la_css_pour_l'intérieure, nom_de_la_css_pour_le_cadre);  
    new infoBox($info_box_contents, infoBoxContentsWatsNew, infoBoxWatsNew);
    
// Nom du fichier image à indiquer pour l'afficher en bas de la boxe
// new infoBoxHeading($info_box_contents, image, nom_du_css);
    new infoBoxHeading($info_box_contents, bas, infoBoxHeadingWatsNew);
?>
            </td>
          </tr>
<!-- whats_new_eof //-->
<?php
  }
?>






Pour aérer un peu entre deux articles :
deux <br> dans cette ligne
CODE
$rp .= '<center><br><br><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>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));



j'ai corrigé dans le post précédent blush.gif



--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 
paduk
posté 21 Mar 2006, 19:22
Message #42


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



content pour toi ! smile.gif

et à chacun son propre design... tongue.gif


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
nemrod34
posté 21 Mar 2006, 19:48
Message #43


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



blush.gif j'avais pas vus :
agrandissement sans popup:
CODE
This contributed work is freely available under the GNU General Public License.
(by stepibou 07/09/2005)

This code is made not to use pop-up window for the product_info image.
Presented two way to do it. Use it either.
one is a Css rollover, the other is a javascricpt clickable area.


##################################################################################################################

in product_info.php, replace near line 137:

<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>

#################################################################################################################
by(css method):

<?php
// no popup image css rollover
$chemin_small_img = DIR_WS_IMAGES . $product_info['products_image'];
$size_small_img = getimagesize($chemin_small_img);
$image_to_popup = $product_info['products_image'];
$to_popup_width = $size_small_img[0];
$to_popup_height = $size_small_img[1];

$dif_width = SMALL_IMAGE_WIDTH/2;
$dif_height = SMALL_IMAGE_WIDTH/2;
echo '
<style type="text/css">
<!--
#image {
position: relative;
width : '. SMALL_IMAGE_WIDTH .'px;
height: '. SMALL_IMAGE_HEIGHT .'px;
padding: 5px 5px 5px 5px;
}
#zone1 {
position: absolute;
width : '. SMALL_IMAGE_WIDTH .'px;
height: '. SMALL_IMAGE_HEIGHT .'px;
right: 0px;
top: 0px;
}

#zone1:hover {
width : '. $to_popup_width .'px;
height: '. $to_popup_height .'px;
top: '. $dif_width .'px;
right: '. $dif_height .'px;
border: 1px solid black;
background: url('. DIR_WS_IMAGES . $image_to_popup .') top left no-repeat;
z-index: 200;
}
-->
</style>';

echo '<div style="display: none;">'. $chemin_small_img .'</div>';
echo '<div id="image">
       <div id="zone1"></div>
        '. tep_image($chemin_small_img, addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="0" vspace="0"') . '
      </div><br>' . TEXT_CLICK_TO_ENLARGE;
// end no popup image css rollover
/* <script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script> */
?>


#################################################################################################################
or by(javascript method):

<!-- // Modif de popup image //-->
<script language="javascript" type="text/javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

function popupXL2(of) {

var xlContStyle = document.getElementById('xlCont').style
xlContStyle.display='block';
if (of && document.getElementById('xlImg').height > 400) {
with (xlContStyle) {
  height='400px';
  width=(parseInt(document.getElementById('xlImg').width) + 20) + 'px';
  overflow='auto'
}
}
}

//--></script>
<style type="text/css">
<!--
#xlCont {
display:none;
top:120px;
right:170px;
position:absolute;
background:white;  
border:1px solid #B9BAC1;
z-index:200
}
-->
</style>

<?php
echo '<a href="java script:popupXL2(false);">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<div id="xlCont" style="display:none"><a href="java script:void(0)" onclick="document.getElementById('xlCont').style.display='none'">
<?php  
    echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $width, $height, 'class="infoBox_image" id="xlImg"');
?>
</a></div>
<?php /* <script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script> */  ?>
<!-- // Fin Modif de popup image //-->


##################################################################################################################


--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 
nemrod34
posté 21 Mar 2006, 20:33
Message #44


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



Personne n'aurait une idée pour exclure de cette box les promotions ?
merci

edit :
je n'arrive pas à isoler seulement les promos , ou les produits non en promo :

box nouveautés:
CODE
$rp_query = tep_db_query("select p.products_id, pd.products_name, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added limit " . MAX_RANDOM_SELECT_NEW);


j'ai les produits en radom avec dedans des promos

box promos:
CODE
  $rp_query = tep_db_query("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);


Pareil mais avec en plus le défilement des promos quand la première liste est finie.

J'ai beau chercher a part des erreurs je n'ais rien , je sais bien que c'est là mais bon ...


--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 
paduk
posté 22 Mar 2006, 14:24
Message #45


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



beh apparement tu le demande..dans ta box specials tu as combien de $rp_query ?

parceque je voie sur le fichier dans ton précedent méssage que tu demande les deux dans la même box ...


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
nemrod34
posté 22 Mar 2006, 15:13
Message #46


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



Ben vi je n'arrive pas à isoler "nouveautés" et "promos".
Pour être franc je ne comprend pas la totalité du code (je crois que ca se voit laugh.gif )
J'ai bidouillé un peu au pif , un peu par déduction jusqu'as une heure du mat hier sans résultats.

Tout ce que j'ai obtenus c'est :

nouvautés affiche : nouvautés , promos sans le prix promo, les articles avec le prix de 0.00€ qui ne devrais pas apparaitre (mais je crois que le fix pour ca de cette contrib est sortis, puis c'est un moindre mal).


Promotions affiche : les nouveautés, puis la liste des promos avec le prix promotionnel, et les articles avec en prix 0.00€ puisqu'il ne sagit pas de promotion.

Je sais que c'est pas grand chose, mais voilà je comprend pas ce que je doit enlever dans chacunne. blush.gif

j'en suis là :

what's new :
CODE
<?php
/*
  $Id: whats_new.php,v 1.31 2003/02/10 22:31:09 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
//$rp_query = tep_db_query("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");
//if (tep_db_num_rows($rp_query)) {

$rp_query = tep_db_query("select p.products_id, pd.products_name, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added limit " . MAX_RANDOM_SELECT_NEW);
if (tep_db_num_rows($rp_query)) {
?>


<!-- whats_new //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);

// Nom du fichier image à indiquer pour l'afficher en haut de la boxe
// new infoBoxHeading($info_box_contents, image_de_gauche, nom_du_css, affichage_text_box, image_de_droite, image_du_lien, adresse_du_lien);
    new infoBoxHeading($info_box_contents, false, infoBoxHeadingWatsNew, false, false, box_wats_new, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'));

    if (tep_not_null($random_product['specials_new_products_price'])) {
      $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>';
      $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
    } else {
     //$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
    // Start "Hide Price if $0" edit 1 of 1 (uncomment above line if removing this contribution)
    $whats_new_price = (($random_product['products_price'] > 0) ? $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) : '');
    // End "Hide Price if $0" edit 1 of 1

    }
    while ($random_product = tep_db_fetch_array($rp_query)) {
$rp .= '<center><br><br><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>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));

}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "14" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>');
    

// Nom des css pour l'intérieure de la boxe et le cadre
// new infoBox($info_box_contents, nom_de_la_css_pour_l'intérieure, nom_de_la_css_pour_le_cadre);  
    new infoBox($info_box_contents, infoBoxContentsWatsNew, infoBoxWatsNew);
    
// Nom du fichier image à indiquer pour l'afficher en bas de la boxe
// new infoBoxHeading($info_box_contents, image, nom_du_css);
    new infoBoxHeading($info_box_contents, bas, infoBoxHeadingWatsNew);
?>
            </td>
          </tr>
<!-- whats_new_eof //-->
<?php
  }
?>



specials:

CODE
<?php
/*
  $Id: specials.php,v 1.31 2003/06/09 22:21:03 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  $rp_query = tep_db_query("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);
if (tep_db_num_rows($rp_query)) {
?>

<!-- specials //-->
          <tr>
            <td>
<?php
    $info_box_contents = array();
    $info_box_contents[] = array('text' => BOX_HEADING_SPECIALS);

// Nom du fichier image à indiquer pour l'afficher en haut de la boxe
// new infoBoxHeading($info_box_contents, image_de_gauche, nom_du_css, affichage_text_box, image_de_droite, image_du_lien, adresse_du_lien);
    new infoBoxHeading($info_box_contents, false, infoBoxHeadingSpecials, false, false, Box_specials, tep_href_link(FILENAME_SPECIALS, '', 'NONSSL'));    
    
  if (tep_not_null($random_product['specials_new_products_price'])) {
      $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>';
      $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
    } else {
     //$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
    // Start "Hide Price if $0" edit 1 of 1 (uncomment above line if removing this contribution)
    $whats_new_price = (($random_product['products_price'] > 0) ? $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) : '');
    // End "Hide Price if $0" edit 1 of 1

    }
    while ($random_product = tep_db_fetch_array($rp_query)) {
$rp .= '<center><br><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'specials_new_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, 'specials_new_products_id=' . $random_product['specials_new_products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['specials_new_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']));

}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "14" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>');

// Nom des css pour l'intérieure de la boxe et le cadre
// new infoBox($info_box_contents, nom_de_la_css_pour_l'intérieure, nom_de_la_css_pour_le_cadre);  
    new infoBox($info_box_contents, infoBoxContentsSpecials, infoBoxSpecials);
    
// Nom du fichier image à indiquer pour l'afficher en bas de la boxe
// new infoBoxHeading($info_box_contents, image, nom_du_css);
    new infoBoxHeading($info_box_contents, bas, infoBoxHeadingSpecials);
?>
            </td>
          </tr>
<!-- specials_eof //-->
<?php
  }
?>
  


--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 
paduk
posté 22 Mar 2006, 15:18
Message #47


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



ca c'est pour la box specials.php


CITATION
$rp_query = tep_db_query("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");
if (tep_db_num_rows($rp_query)) {


et ca c'est pour la box whats_new.php :

CITATION
$rp_query = tep_db_query("select p.products_id, pd.products_name, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by rand() limit " . MAX_RANDOM_SELECT_NEW);
if (tep_db_num_rows($rp_query)) {


ne met pas les deux dans la même page !!!

voila ça devrais marcher la....


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
nemrod34
posté 22 Mar 2006, 15:27
Message #48


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



Merci mais non toujours pareil. sad.gif


--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 
paduk
posté 22 Mar 2006, 15:29
Message #49


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 299
Inscrit : 4-January 06
Membre no 8416



peut tu afficher tes deux box pages ?


--------------------
osCommerce 2.2 Milestone 2
les contribs que j'ai installées: Loginbox, contrib installer, article manager, membership 1, osplayer V1.2, Image catégorie, order_drop_down, la superbe contrib Fckeditor V 2.2.1 de delaballe, headertags V 2.5.6, Extra pages-info box w-admin 4.5 by azer, Cid killer et boutons buy now + quelques modifs perso...
Go to the top of the page
 
nemrod34
posté 22 Mar 2006, 15:32
Message #50


Ceinture bleue OSC
Icône de groupe

Groupe : Membres
Messages : 1123
Inscrit : 7-October 04
Membre no 3437



whats new :

CODE
<?php
/*
  $Id: whats_new.php,v 1.31 2003/02/10 22:31:09 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
//$rp_query = tep_db_query("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");
//if (tep_db_num_rows($rp_query)) {

$rp_query = tep_db_query("select p.products_id, pd.products_name, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by rand() limit " . MAX_RANDOM_SELECT_NEW);
if (tep_db_num_rows($rp_query)) {
?>


<!-- whats_new //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);

// Nom du fichier image à indiquer pour l'afficher en haut de la boxe
// new infoBoxHeading($info_box_contents, image_de_gauche, nom_du_css, affichage_text_box, image_de_droite, image_du_lien, adresse_du_lien);
    new infoBoxHeading($info_box_contents, false, infoBoxHeadingWatsNew, false, false, box_wats_new, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL'));

    if (tep_not_null($random_product['specials_new_products_price'])) {
      $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>';
      $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
    } else {
     //$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
    // Start "Hide Price if $0" edit 1 of 1 (uncomment above line if removing this contribution)
    $whats_new_price = (($random_product['products_price'] > 0) ? $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) : '');
    // End "Hide Price if $0" edit 1 of 1

    }
    while ($random_product = tep_db_fetch_array($rp_query)) {
$rp .= '<center><br><br><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>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));

}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "14" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>');
    

// Nom des css pour l'intérieure de la boxe et le cadre
// new infoBox($info_box_contents, nom_de_la_css_pour_l'intérieure, nom_de_la_css_pour_le_cadre);  
    new infoBox($info_box_contents, infoBoxContentsWatsNew, infoBoxWatsNew);
    
// Nom du fichier image à indiquer pour l'afficher en bas de la boxe
// new infoBoxHeading($info_box_contents, image, nom_du_css);
    new infoBoxHeading($info_box_contents, bas, infoBoxHeadingWatsNew);
?>
            </td>
          </tr>
<!-- whats_new_eof //-->
<?php
  }
?>



specials:


CODE
<?php
/*
  $Id: specials.php,v 1.31 2003/06/09 22:21:03 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

$rp_query = tep_db_query("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");
if (tep_db_num_rows($rp_query)) {
?>

<!-- specials //-->
          <tr>
            <td>
<?php
    $info_box_contents = array();
    $info_box_contents[] = array('text' => BOX_HEADING_SPECIALS);

// Nom du fichier image à indiquer pour l'afficher en haut de la boxe
// new infoBoxHeading($info_box_contents, image_de_gauche, nom_du_css, affichage_text_box, image_de_droite, image_du_lien, adresse_du_lien);
    new infoBoxHeading($info_box_contents, false, infoBoxHeadingSpecials, false, false, Box_specials, tep_href_link(FILENAME_SPECIALS, '', 'NONSSL'));    
    
  if (tep_not_null($random_product['specials_new_products_price'])) {
      $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>';
      $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
    } else {
     //$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
    // Start "Hide Price if $0" edit 1 of 1 (uncomment above line if removing this contribution)
    $whats_new_price = (($random_product['products_price'] > 0) ? $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) : '');
    // End "Hide Price if $0" edit 1 of 1

    }
    while ($random_product = tep_db_fetch_array($rp_query)) {
$rp .= '<center><br><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'specials_new_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, 'specials_new_products_id=' . $random_product['specials_new_products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['specials_new_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']));

}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "14" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>');

// Nom des css pour l'intérieure de la boxe et le cadre
// new infoBox($info_box_contents, nom_de_la_css_pour_l'intérieure, nom_de_la_css_pour_le_cadre);  
    new infoBox($info_box_contents, infoBoxContentsSpecials, infoBoxSpecials);
    
// Nom du fichier image à indiquer pour l'afficher en bas de la boxe
// new infoBoxHeading($info_box_contents, image, nom_du_css);
    new infoBoxHeading($info_box_contents, bas, infoBoxHeadingSpecials);
?>
            </td>
          </tr>
<!-- specials_eof //-->
<?php
  }
?>
  



Milles merci pour ton aide et ton temps


--------------------
oscommerce 2.2-ms2 fr +
théma - ventes croisées - agrandissement sans popup -pas de commande si prix zéro - FCKeditor v 2.2.1 -afficher nom de famille + prenom client - menubarv1 - Store Pick Up Version 1.4 - featured_products_v1.5.5_1- QTPRO 4.3 - Prof_Invoice&PackingSlip_v0.2_1 - Products_Short_Descriptions_V1_03 - tvaintracom_v5 - osplayer v2.1 - Download_Controllerv5.3 MS2.2_21 - CustomerDiscount v1.1 - Member Approval 1.5 - ask a question 1.0 (modifié) - Product sold v1.2
Go to the top of the page
 

3 Pages V  < 1 2 3 >
Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 



RSS Version bas débit Nous sommes le : 16th April 2024 - 09:46
Ce site est déclaré auprès de la commision Nationale
de l'Informatique et des Libertés (déclaration n°: 1043896)