Flash Discount |
Bienvenue invité ( Connexion | Inscription )
Flash Discount |
29 Oct 2007, 22:09
Message
#226
|
|
Ceinture marron OSC Groupe : Membres Messages : 1441 Inscrit : 24-April 03 Membre no 1102 |
CITATION(Dizin @ 26 Jul 2007, 16:43) [snapback]244864[/snapback] Bonjour J'ai installé la contribution sur ma boutique il y a peu de temps et ça marche plutôt bien. Je tiens à féliciter les personnes qui ont bossé dessus Ayant au préalable déjà installer la contribution TotalB2B, j'ai du durant l'installation de Flash Discount associer les 2, je m'en suis plutôt pas mal sortie sauf qu'il me reste un petit problème. Le problème survient lorsqu'un client faisant partie d'un groupe ayant droit à une remise voit cette remise appliquée dans la page flash_selling et dans la boxe sur la gauche, par contre elle ne l'est pas dans le panier et lors de la commande. Pour moi au final je me trouve avec le bon prix mais c'est le client qui doit se poser des questions du fait que le prix change au moment de finaliser l'achat. Donc je voulais savoir si quelqu'un avait installé ces 2 contributions sur sa boutique s'il retrouve cette erreur. Et si quelqu'un voulez bien m'aidé à trouver le problème je peux poster le code des pages concernées. Merci A bientôt Salut, Je ne connais pas Total B2B, elle utilise du Java, n'y aurait il pas un conflict ? reprend l'installe dans ta page shopping cart.php et checkout_process.php, pour voir. -------------------- OSC 2.1.3 et MS2 (PHP Version 5.2.17)
|
|
30 Oct 2007, 13:59
Message
#227
|
|
Ceinture blanche OSC Groupe : Membres Messages : 16 Inscrit : 8-December 05 Lieu : Annecy Membre no 8136 |
La contribution Total B2B permet la création de groupes clients par l'administrateur, l'affectation de conditions commerciales différenciées aux groupes de clients et aux clients, l'affectation possible de plusieurs prix pour un même produit et la gestion de la visualisation des prix par les simples visiteurs.
Elle n'utilise pas de Java et c'est tout à fait possible qu'il y ai conflit car au moment de l'installation de Flash Discount il y avait du code à mettre au même endroit que le code de la contribution Total B2B, et j'ai donc essayer d'adapter les 2 à ces endroits là. -------------------- Ms2Fr : TotalB2B v1.2.d + Down for Maintenance v1.2 + Header Tags Controller v2.5.4 + Ultimate SEO URLs v2 + Google XLM Sitemap v1.2
|
|
30 Oct 2007, 16:05
Message
#228
|
|
Ceinture orange+ OSC Groupe : Membres Messages : 401 Inscrit : 6-July 04 Membre no 2821 |
bonjour
j ai toujours des problème a installer la contribution flash discount j ai du code au même endroit je sais pas comment faire pouvais vous m aider svp merci -------------------- MS2 version fr de Delaballe,BoxImageThemaMS2fr_V2.7,Header Tags Controller v2.3.2,zones-french,price-break-1.11,CrawlTrack 1.7.1,Ultimate_SEO_URLSv21d,colissimo_1.5.2,whats_new_scroll_25items_1
|
|
1 Nov 2007, 19:09
Message
#229
|
|
Ceinture orange+ OSC Groupe : Membres Messages : 401 Inscrit : 6-July 04 Membre no 2821 |
j aurais besoin de votre aide svp
je me bat avec cette contribution,je vient de reinstaller pour x fois mais ca marche toujour pas. quand je clique sur le bouton ajouter dans le panier de l article en flash ,j ai un message d erreur: Warning: Cannot modify header information - headers already sent by (output started at /data/members/free/multimania/fr/r/t/o/rtony30/htdocs/products_new.php:12) in /data/members/free/multimania/fr/r/t/o/rtony30/htdocs/includes/functions/general.php on line 33 voici une partie de mon fichier general.php Code ...
Raison de l'édition : code trop long et incomplet supprimé
-------------------- MS2 version fr de Delaballe,BoxImageThemaMS2fr_V2.7,Header Tags Controller v2.3.2,zones-french,price-break-1.11,CrawlTrack 1.7.1,Ultimate_SEO_URLSv21d,colissimo_1.5.2,whats_new_scroll_25items_1
|
|
4 Oct 2008, 00:35
Message
#230
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 157 Inscrit : 12-April 07 Lieu : juste derrière TOI !!!! Membre no 16529 |
Bonjour et un grand BRAVO à Gyakutsuki et à tous ceux qui ont travaillé sur cette contrib
J'ai installé la version 2.9 et ça marche correctement mis à part quelques petits bugs (comme par exemple l'absence de changement lorsqu'on active ou désactive le bouton rouge/vert de la vente flash. On doit donc arrêter la vente flash en changeant la date de fin, mais bon, ce n'est pas très grave) J'aurais cependant 2 questions svp : 1- Quelqu'un sait t'il comment faire pour suprimer l'affichage de la remise en % svp ? 2- Comment faire apparaître le compte à rebours un peu plus grand et de couleur plus voyante (il est actuellement petit et gris, ce qui n'est pas top). En ce qui concerne la taille du compte à rebours, j'ai beau modifier cette ligne : <span id= "ctpbox" type="text" class="smallText" size="28"></span> en remplaçant le 28 par une autre valeur. Il n'ya aucun changement. Merci d'avance pour vos réponses. Ce message a été modifié par loopz - 4 Oct 2008, 18:33. -------------------- OsCommerce-2.2ms2-FR-060817-2010 + Colissimo_1_2_3 + Retour Paypal (3 dossiers) + virementbancaire v1.2 + Store Pick Up v1.5 + ATOS v2.3.0_1 + Ship In Cart v2.2.2 + Discount_coupon_codes_3_31 + whats_new_scroll_25items_1 + (search_enhancements_v1.1a_1 + search_result) + Cool Flash Carousel Menu v1.2 + CGV by Decad7 + Flash Discount v2.9 + Inventaire v1 + BordelContrib v3.5.
|
|
6 Oct 2008, 20:00
Message
#231
|
|
Ceinture jaune OSC Groupe : Membres Messages : 42 Inscrit : 20-August 05 Membre no 6846 |
hello, je viens d'installer cette contrib mais je bloque car j'ai ce message :
Fatal error: Call to undefined function: tep_get_products_special_price_flash_selling() in /home.2/gazoline/www/newsite/catalog/products_new.php on line 82 quelqu'un peut il m'aider d'avance merci -------------------- MS2
|
|
6 Oct 2008, 20:07
Message
#232
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 157 Inscrit : 12-April 07 Lieu : juste derrière TOI !!!! Membre no 16529 |
Peut être pourrais-tu commencer par regarder ce qui pourrait clocher à la ligne 82 de ton fichier products_new.php
-------------------- OsCommerce-2.2ms2-FR-060817-2010 + Colissimo_1_2_3 + Retour Paypal (3 dossiers) + virementbancaire v1.2 + Store Pick Up v1.5 + ATOS v2.3.0_1 + Ship In Cart v2.2.2 + Discount_coupon_codes_3_31 + whats_new_scroll_25items_1 + (search_enhancements_v1.1a_1 + search_result) + Cool Flash Carousel Menu v1.2 + CGV by Decad7 + Flash Discount v2.9 + Inventaire v1 + BordelContrib v3.5.
|
|
8 Oct 2008, 10:25
Message
#233
|
|
Ceinture jaune OSC Groupe : Membres Messages : 42 Inscrit : 20-August 05 Membre no 6846 |
eh bien je sais pas trop :
ligne 82 : if ($new_price = tep_get_products_special_price_flash_selling($products_new['products_id'])) { -------------------- MS2
|
|
8 Oct 2008, 10:36
Message
#234
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 157 Inscrit : 12-April 07 Lieu : juste derrière TOI !!!! Membre no 16529 |
attention, regarde aussi un peu au dessus et au dessous car le compteur des éditeurs diffère parfois légèrement des messages d'erreur.
-------------------- OsCommerce-2.2ms2-FR-060817-2010 + Colissimo_1_2_3 + Retour Paypal (3 dossiers) + virementbancaire v1.2 + Store Pick Up v1.5 + ATOS v2.3.0_1 + Ship In Cart v2.2.2 + Discount_coupon_codes_3_31 + whats_new_scroll_25items_1 + (search_enhancements_v1.1a_1 + search_result) + Cool Flash Carousel Menu v1.2 + CGV by Decad7 + Flash Discount v2.9 + Inventaire v1 + BordelContrib v3.5.
|
|
22 Jan 2009, 16:49
Message
#235
|
|
Ceinture blanche OSC Groupe : Membres Messages : 6 Inscrit : 8-January 09 Membre no 24158 |
Bonjour a tous.
Super contrib et très beau travail déjà pour commencer mais et oui il y a un mais ... et je sèche un peu.. Je possède la version 2.9 sur un oscommerce-2.2rc1-FR-w3c-3 et quand je me retrouve sur la page des produits et qu'il y a, et seulement dans ce cas la un produit en vente flash, et que je desire afficher la liste des produits classés par prix j'ai ce message. 1054 - Champ 'final_price' inconnu dans order clause select p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id, products_to_categories p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '4' and p2c.categories_id = '22' order by final_price , pd.products_name limit 0, 20 [TEP STOP] la page qui doit etre en cause est l'index.php mais je ne trouve pas l'erreur si quelqu'un pourrais regarder ou se trouve la coquille. Voici mon index.php CODE <?php /* $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!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"> </head> <body> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" summary="" width="1000" cellspacing="0" cellpadding="3" align="center"> <tr> <td width="200" valign="top" bgcolor="#251633"><table border="0" summary="" width="200" cellspacing="0" cellpadding="2"> </tr> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <?php if ($category_depth == 'nested') { $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); ?> <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> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], 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> <tr> <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); for($i=0, $n=sizeof($category_links); $i<$n; $i++) { $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $categories = tep_db_fetch_array($categories_query); if ($categories['total'] < 1) { // do nothing, go through the loop } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); break; // we've found the deepest category the customer is in } } } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); } $number_of_categories = tep_db_num_rows($categories_query); $rows = 0; while ($categories = tep_db_fetch_array($categories_query)) { $rows++; $cPath_new = tep_get_path($categories['categories_id']); $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; echo ' <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n"; if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) { echo ' </tr>' . "\n"; echo ' <tr>' . "\n"; } } // needed for the new products module shown below $new_products_category_id = $current_category_id; ?> </tr> </table></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> </table></td> </tr> </table></td> <?php } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) { // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_new_products_price, NULL) as specials_new_products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } // #################### End Added Flash Selling ################### } else { // We show them all // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling from " . TABLE_PRODUCTS . " pleft join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m , " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // #################### End Added Flash Selling ################### } else { // We show them all // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // #################### End Added Flash Selling ################### } } if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= " order by pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } ?> <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> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <?php // optional Product List Filter if (PRODUCT_LIST_FILTER > 0) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo ' <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); echo tep_hide_session_id() . '</form></td>' . "\n"; } } // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $image = $image['manufacturers_image']; } elseif ($current_category_id) { $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; } ?> <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, 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> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td> </tr> </table></td> <?php } else { // default page ?> <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> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?></td> </tr> <tr> <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> <?php include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?> </table></td> </tr> </table></td> <?php } ?> <!-- body_text_eof //--> <td width="200" valign="top" bgcolor="#251633"><table border="0" summary="" width="200" 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 //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Merci d'avance. Ce message a été modifié par Franck95 - 22 Jan 2009, 16:56. |
|
Guest_jp914_* |
16 Apr 2009, 08:42
Message
#236
|
Invité |
Peut être pourrais-tu commencer par regarder ce qui pourrait clocher à la ligne 82 de ton fichier products_new.php salut il te manque simplement le code a integrer dans le fichier includes/fonction/general.php et la fonction tep_get_products_special_price_flash_selling |
|
3 May 2009, 17:08
Message
#237
|
|
Ceinture orange OSC Groupe : Membres Messages : 191 Inscrit : 18-October 06 Membre no 12709 |
Avec la contrib v2.9,
pour les ventes flash, j'ai bien le prix + l'anim flash qui disparaissent (en temps réel) à la fin de la date programmée en revanche il faut que j'actualise la page product_info.php (F5) pour avoir l'affichage qui apparait passée la date de début... Est-ce normal ? Et si oui, existe-t-il une routine qui permettrait que l'offre s'affiche en temps réel au même titre que celle-ci s'enlève ? Ce message a été modifié par milerwan - 3 May 2009, 17:25. -------------------- osCommerce v2.3.4 BS
|
|
3 May 2009, 20:52
Message
#238
|
|
Ceinture orange+ OSC Groupe : Membres Messages : 331 Inscrit : 3-March 09 Lieu : Paris Membre no 24686 |
A tu activer le cache car moi je les d'installer et je n'est pas se problème. mais mon cache n'est pas activer. Si le tient est activer fait un éssais sans le cache. -------------------- osCommerce MS2 RC1FRW3C + Pacth RC2aFRW3C (pour mon nouveau site) pour l'autre osCommerce MS2 RC1FRW3C
|
|
25 May 2009, 06:01
Message
#239
|
|
Ceinture blanche OSC Groupe : Membres Messages : 13 Inscrit : 19-May 09 Membre no 25366 |
Bonjour,
super comme contribe, mais j'aimerais avoir une image gif dans le product listing, comment faire, quel code ajouter? Merci |
|
6 Oct 2009, 21:03
Message
#240
|
|
Ceinture blanche+ OSC Groupe : Membres Messages : 32 Inscrit : 20-April 07 Membre no 16716 |
Bonjour,
Je viens d'installer et adapter cette contrib sur mon osc. Tout fonctionne comme je veux. Le hic car il y en a un est que j'ai installé le compte à rebours javascript sur la page flash_selling.php en reprenant le code de celui de product_info.php. Le compte a rebours ne fonctionne que sur le 1er produit. Donc, si je lance par exemple 2 ventes flash, elles apparaissent bien toutes les 2 sur la page flash_selling.php mais seule la première dispose du compte à rebours javascript. Et je sèche pour reussir à l'afficher sur chaque produit. Donc, si quelqu'un avait réussi ce tour de passe passe, je lui serais très reconnaissant de m'indiquer la piste à suivre Par avance , merci Voici le code à partir de la ligne 64 de la page flash_selling.php 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 class="smallText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_FLASH); ?></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> <tr> <td class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS). '">' . TEXT_FLASH_LINK_SPECIALS . '</a>' ; ?></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" width="100%" cellspacing="0" cellpadding="2"> <tr> <script type="text/javascript"> function decompteur(jour,mois,annee,heure,minute,seconde) { Resultat = ""; now = new Date(); goal = new Date(annee,mois-1,jour,heure,minute,seconde); ts = Math.abs((now.getTime()/1000)-(goal.getTime()/1000)); if((goal.getTime()/1000) < (now.getTime()/1000)){ location.reload(); } fjour = Math.floor(ts/(3600*24)); if(fjour<=1) { Resultat = fjour + " jour "; } else { Resultat = fjour + " jours "; } ts = ts - (fjour*24*3600); fheure = Math.floor((ts/3600)); if(fheure<10) { Resultat += " 0" + fheure + "h "; } else { Resultat += " " + fheure + "h "; } ts = ts - (fheure*3600); minutes = Math.floor((ts/60)); if(minutes<10) { Resultat += "0" + minutes + "m "; } else { Resultat += minutes + "m "; } ts = ts - (minutes*60); fseconde = Math.floor(ts); if(fseconde<10) { Resultat += "0" + fseconde + "s" } else { Resultat += fseconde + "s" } return Resultat } function startXbox() { document.getElementById("ctppflash").innerHTML=decompteur(<?php echo $jend_days_box.','.$jend_month_box.','.$jend_year_box.','.$jend_hour_box.','.$jend_minute_box.','.$jend_second_box; ?>); document.getElementById("ctpbox").innerHTML=decompteur(<?php echo $jend_days_box.','.$jend_month_box.','.$jend_year_box.','.$jend_hour_box.','.$jend_minute_box.','.$jend_second_box; ?>); setTimeout("startXbox()",1000); } window.onload = startXbox; </script> <?php $row = 0; $specials_query = tep_db_query($specials_split->sql_query); while ($specials = tep_db_fetch_array($specials_query)) { $row++; //Modif F.B Formater la taille de l'image $FormatImg=tep_formatImag(DIR_WS_IMAGES . $specials['products_image'],SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); //Fin modif 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'], $FormatImg['W'], $FormatImg['H']) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . //debut modif by paddybl for ecotax $specials['products_name'] . '</a><br><s>' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id']),$specials['ecotax_rates_id']) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($specials['specials_price_flash_selling'], tep_get_tax_rate($specials['products_tax_class_id']),$specials['ecotax_rates_id']) . '</span><br/>'; //fin modif by paddybl for ecotax // echo '<b>' . TEXT_END_TIME . '</b> '. '<b>' .tep_get_products_flash_timer($specials['products_id']) . '</b>' . '<br>'; //$stock_level = tep_get_products_stock($specials['products_id']); echo '<span id= "ctppflash" type="text" class="compteurflash"></span>' . '</b>' . '<br>'; $stock_level = tep_get_products_stock($specials['products_id']); if ((STOCK_CHECK == "true")&&($stock_level < 1) ) { echo '<span class="markProductOutOfStock"><b>' . TEXT_OUT_OF_STOCK . '</b></span><br/>'; } elseif ((STOCK_CHECK == 'true')&&($stock_level > 0 )) { echo '<span class="markProductInStock"><b>' . TEXT_IN_STOCK . '</b></span><br/>'; } 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" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_FLASH); ?></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" 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 //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Ce message a été modifié par graale44 - 6 Oct 2009, 21:06. |
|
20 May 2011, 00:48
Message
#241
|
|
Ceinture jaune OSC Groupe : Membres Messages : 40 Inscrit : 8-January 11 Lieu : Toulouse/Villefranche de Rouergue Membre no 28806 |
YouP !
Il commençait presque à prendre la poussière ce post Je souhaiterais savoir si des personnes ont testé cette contrib sur un OsC 2.3.1 récemment ? Ou peut être existe t-il une autre contrib plus récente de vente flash que je n'aurais pas trouvé sur le net ? Sur ce, bonne nuit HaGeN ! |
|
23 May 2011, 16:27
Message
#242
|
|
Ceinture jaune OSC Groupe : Membres Messages : 40 Inscrit : 8-January 11 Lieu : Toulouse/Villefranche de Rouergue Membre no 28806 |
De retour aux nouvelles !!
Finalement, j'ai réussi à adapter cette contrib pour la 2.3.1 après pas mal de galère, de test, et parfois un peu de bidouille ^^ Merci aux infos présente dans ce fil de discussion et celles présentes sur ce lien HaGeN |
|
11 Dec 2012, 15:43
Message
#243
|
|
Ceinture blanche+ OSC Groupe : Membres Messages : 27 Inscrit : 3-February 09 Membre no 24419 |
Bonjour
j'ai installé la contribution flash discount 2.9 elle fonctionne sauf au niveau de l'affichage par liste ! Exemple : je n'ai pas d'affichage du prix en "promotion flash", dans la liste en affichant, par exemple, tout les produits d'un fabricant Quelqu'un aurait il rencontré ce probléme ? je sais c'est un vieux post ! merci Ce message a été modifié par jlb59226 - 11 Dec 2012, 15:44. -------------------- oscommerce 2.2 rc1
|
|
11 Feb 2013, 02:57
Message
#244
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 81 Inscrit : 14-July 08 Lieu : Melun City Membre no 22442 |
Bonjour,
j'ai besoin de vos lumières parce que je but sur un truc, c'est dans index.php. J'aurais besoin de faire cohabiter Flash Discount et SPPC dans mon index.php j'ai ça (modif inseré pour SPPC) : Code // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { // ok in mysql 5 $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd , " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // either retail or no need to get correct special prices -- changed for mysql 5 $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } else { // We show them all // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { // ok in mysql 5 $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } else { // either retail or no need to get correct special prices -- changed for mysql 5 $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory; // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { // ok for mysql 5 $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // either retail or no need to get correct special prices -- ok in mysql 5 $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s using(products_id) where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // end else { // either retail... // EOF Separate Pricing Per Customer } else { // We show them all // BOF Separate Pricing Per Customer --last query changed for mysql 5 compatibility if ($status_product_prices_table == true) { // original, no need to change for mysql 5 $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // either retail or no need to get correct special prices -- changed for mysql 5 $listing_sql = "select " . $select_column_list . " p.products_date_added, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // end else { // either retail... // EOF Separate Pricing per Customer et j'aimerais y fusionner ça (Flash Discount) : Code // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_new_products_price, NULL) as specials_new_products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } // #################### End Added Flash Selling ################### } else { // We show them all // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling from " . TABLE_PRODUCTS . " pleft join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } // #################### End Added Flash Selling ################### } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m , " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // #################### End Added Flash Selling ################### } else { // We show them all // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } // #################### End Added Flash Selling ################### Help me please -------------------- Oscommerce-2.2rc1 FR w3c 3 + Flash Shelling + Also Consider + Ask a question + Category Description + Header Tags + Super Download Shop + Family Products + Points Reward + Products New Images Text + Quick Stock Update + d'autre contrib que je n'ai plus le nom = Une bien jolie boutique !!!
|
|
16 Mar 2013, 14:01
Message
#245
|
|
Ceinture jaune OSC Groupe : Membres Messages : 72 Inscrit : 28-September 08 Membre no 23094 |
Bonjour j'ai exactement le même souci je souhaiterais faire co-habiter les deux contributions SPPC et Flash discount. Qui peut nous aider? Merci infiniment.
-------------------- J'utilise sur un site: osCommerce Online Merchant v2.2 RC1 W3C Valid FR - Contributions: Extra Fields Manager - PayPal IPN v2.3.3 - PostFinance Debit Direct - virementbancaire v 1.4 - spu (Store Pick Up) v 1.2 - Shipping Label (ne fonctionne pas) - Extra pages-info box w admin - Newsletter and Subscribers
et sur un site en test: osCommerce v.2.3.3 FR - Contributions: Points/RewardsV2.1rc2a, AutoBackUp, Recover Cart Sales, oscThumb modifié, Featured Product, More Categories, Sitemap SEO, Wish List, Order Editor, reCaptcha, Product Tabs, PDF Invoices, SEO Site URLs 5, Easypopulate, Attribute Img, Product questions, Cross-Sell (X-Sell), Product Exta Field, Specials by category, Tracking Module, Vauchers & coupons, Supertracker, Inactive user, Slideshow. |
|
16 Mar 2013, 18:31
Message
#246
|
|
Ceinture noire OSC Groupe : TechDev Messages : 2757 Inscrit : 9-September 08 Lieu : Douai Membre no 22915 |
Bonjour
Je comprends que vous voulez afficher les produits flash aux conditions (prix...) du client en ligne. Et éventuellement l'affichage standard. $listing_sql, au sortir de la modif SPCC contient les produits aux conditions client qui vont bien. Pourquoi ne pas comparer ce tableau à celui des produits répondant aux conditions flash pour en extraire $listing_sql_flash, intersection des 2 tableaux ? Est-ce-si lourd ? Chti poupon |
|
20 Mar 2013, 21:56
Message
#247
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 81 Inscrit : 14-July 08 Lieu : Melun City Membre no 22442 |
Bonjour Je comprends que vous voulez afficher les produits flash aux conditions (prix...) du client en ligne. Et éventuellement l'affichage standard. $listing_sql, au sortir de la modif SPCC contient les produits aux conditions client qui vont bien. Pourquoi ne pas comparer ce tableau à celui des produits répondant aux conditions flash pour en extraire $listing_sql_flash, intersection des 2 tableaux ? Est-ce-si lourd ? Chti poupon J'avais déjà comparé et testé, j'ai rien compris à ce qu'il falait modifier :-/ -------------------- Oscommerce-2.2rc1 FR w3c 3 + Flash Shelling + Also Consider + Ask a question + Category Description + Header Tags + Super Download Shop + Family Products + Points Reward + Products New Images Text + Quick Stock Update + d'autre contrib que je n'ai plus le nom = Une bien jolie boutique !!!
|
|
19 Jun 2015, 23:42
Message
#248
|
|
Ceinture jaune OSC Groupe : Membres Messages : 53 Inscrit : 9-November 04 Lieu : Charleroi Membre no 3721 |
Bonjour à tous,
Je tente d'adapter cette contribution sur une version OsCommerce Bootstrap 2.3.4 sauf que je bûche sur un point qui a déjà été survolé mais qui n'a pas été développé. En fait je voudrais reproduire le compte-à-rebours du product_info sur catalogue/includes/modules/flash_selling.php et catalogue/flash_selling.php. L'idée survolée a été de créer une fonction, je suis donc parti sur cette idée mais je m'embrouille un peu les pinceaux... Pour l'instant j'en suis là: par exemple dans catalogue/includes/modules/flash_selling.php j'ai créé la fonction osc_decompte: CODE if (strlen(strip_tags($product['products_description'])) > 0 && PRODUCT_LIST_DESCRIPTION_GRID > 0) { if (strlen(strip_tags($product['products_description'])) > PRODUCT_LIST_DESCRIPTION_GRID) { $p_desc_grid = '<div class="product-description description-grid">'.mb_substr(strip_tags($product['products_description']), 0, PRODUCT_LIST_DESCRIPTION_GRID, 'UTF-8').'...'.'</div>'; $p_desc_grid = '<div align="center">'.tep_image(DIR_WS_IMAGES . 'Horloge.gif', ''). ' '.osc_decompte($specials['products_id']) .'</div><div class="product-description description-list">'.mb_substr(strip_tags($product['products_description']), 0, PRODUCT_LIST_DESCRIPTION_LIST, 'UTF-8').'...'.'</div>'; } else { $p_desc_grid = '<div class="product-description description-grid">'.strip_tags($product['products_description']).'</div>'; $p_desc_grid = '<div align="center">'.tep_image(DIR_WS_IMAGES . 'Horloge.gif', ''). ' '.osc_decompte($specials['products_id']) .'</div><div class="product-description description-list">'.mb_substr(strip_tags($product['products_description']), 0, PRODUCT_LIST_DESCRIPTION_LIST, 'UTF-8').'...'.'</div>'; } } else { $p_desc_grid =''; } ensuite - et c'est là que ça se complique un peu, dans includes/functions/general.php je suis parti sur cette idée que je ne parviens pas à faire aboutir: CODE function osc_decompte($special_flash_selling_beginning_date1) { $special_flash_selling_end_date1 = tep_get_products_special_flash_selling_end_date($product_id); $jend_days = substr($special_flash_selling_end_date1,8,2); // le jour $jend_month = substr($special_flash_selling_end_date1,5,2); // puis le mois $jend_year = substr($special_flash_selling_end_date1,0,4); // et l\'annee $jend_hour = substr($special_flash_selling_end_date1,11,2); // et l\'heure $jend_minute = substr($special_flash_selling_end_date1,14,2); // et la minute $jend_second = substr($special_flash_selling_end_date1,17,2); // et la seconde $timestamp_end_flash_selling_date = mktime($jend_hour,$jend_minute,$jend_second,$jend_month,$jend_days,$jend_year); // Flash discount start Date $special_flash_selling_beginning_date1 = tep_get_products_special_flash_selling_beginning_date($product_id); $jbeginning_days = substr($special_flash_selling_beginning_date1,8,2); // le jour $jbeginning_month = substr($special_flash_selling_beginning_date1,5,2); // puis le mois $jbeginning_year = substr($special_flash_selling_beginning_date1,0,4); // et l\'annee $jbeginning_hour = substr($special_flash_selling_beginning_date1,11,2); // et l\'heure $jbeginning_minute = substr($special_flash_selling_beginning_date1,14,2); // et la minute $jbeginning_second = substr($special_flash_selling_beginning_date1,17,2); // et la seconde $timestamp_beginning_flash_selling_date = mktime($jbeginning_hour,$jbeginning_minute,$jbeginning_second,$jbeginning_month,$jbeginning_days,$jbeginning_year); // Now $today =time(); //Time to end of flash sale $ecart_secondes = ($timestamp_end_flash_selling_date - $today); $ecart_days = floor($ecart_secondes / (60*60*24)); $ecart_hour = floor($ecart_secondes / (60*60)); $ecart_minutes = floor($ecart_secondes / (60)); //Time to beginning $ecart_secondes_beginning = ($timestamp_end_flash_start_date - $today); $ecart_days_beginning = floor($ecart_secondes / (60*60*24)); $ecart_hour_beginning = floor($ecart_secondes / (60*60)); $ecart_minutes_beginning = floor($ecart_secondes / (60)); $jend_days = substr($special_flash_selling_end_date1,8,2); // le jour $jend_month = substr($special_flash_selling_end_date1,5,2); // puis le mois $jend_year = substr($special_flash_selling_end_date1,0,4); // et l\'annee $jbeginning_days = substr($special_flash_selling_beginning_date1, 8, 2); $jbeginning_month = substr($special_flash_selling_beginning_date1, 5, 2); $jbeginning_year = substr($special_flash_selling_beginning_date1, 0, 4); $timestamp_beginning_flash_selling_date = round((mktime($jbeginning_hour,$jbeginning_minute,$jbeginning_second,$jbeginning_month,$jbeginning_days,$jbeginning_year)-mktime($jend_hour,$jend_minute,$jend_second,$jend_month,$jend_days,$jbeginning_year))/86400); return $timestamp_beginning_flash_selling_date >= 0 ? $timestamp_beginning_flash_selling_date : ''; } Quelqu'un pourrait il m'aider à mettre un peu d'ordre à tout ça? -------------------- OsCommerce Bootstrap 2.3.4 visible ici >> Account_Balance_V4 >> Admin Notes with french v2.4_1 >> cronemul >> Extra Info to customer page in admin V1 >> extra_fields_v2_1 >> extra_images_v1-61 >> heardabout_1_25 >> mail-manager >> Menu deroulant date naissance Mini_Images_v2.0 >> Minimum_Order_Amount_1_4 >> Master Password 1_4 >> ordercheck >> Product Serial 1_0 >> PDF_Customer_Invoice_v1.0 >> points_rewardsV2.2beta >> RecoverCartSales 230 >> RMA_Returns_2-6 >> Suivi_colissimo >>
|
|
26 Jun 2015, 10:58
Message
#249
|
|
Ceinture jaune OSC Groupe : Membres Messages : 53 Inscrit : 9-November 04 Lieu : Charleroi Membre no 3721 |
Je suis en train de commencer à tenter d'adapter le compte à rebours sur catalog/flash_selling.php... mais je coince un peu. Si je fais par exemple:
CODE <?php /* $Id: flash_selling.php,v 1.49 2003/06/09 22:35:33 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FLASH_SELLING); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FLASH_SELLING)); $content = CONTENT_FLASH_SELLING; require(DIR_WS_INCLUDES . 'template_top.php'); ?> <h1 class="page-heading product-list"><?php echo HEADING_TITLE; ?></h1> <div class="block-content"> <?php // ##################### Added Flash Selling ################## //$specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_price_flash_selling 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_flash_selling = '1' and now() < s.flash_selling_end_date order by s.specials_date_added DESC"; $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_price_flash_selling 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_flash_selling = '1' and now() > s.flash_selling_beginning_date and now() < s.flash_selling_end_date order by s.specials_date_added DESC"; $specials_split = new splitPageResults($specials_query_raw, MAX_DISPLAY_SPECIAL_PRODUCTS); // ##################### END Added Flash Selling ################## if ($specials_split->number_of_rows > 0) { echo tep_gridlist_build(); } if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <div class="listing-panel top-panel top-view"> <div class="row"> <div class="col-xs-6 displayText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></div> <div class="col-xs-6"><?php echo $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></div> </div> </div> <?php } ?> <ul class="row product-listing"> <?php $specials_query = tep_db_query($specials_split->sql_query); $i=0; while ($specials = tep_db_fetch_array($specials_query)) { $i++; $product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$specials['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); // ##################### Added Flash Selling ################## $special_flash_selling_end_date = tep_get_products_special_flash_selling_end_date($specials['products_id']); $jend_days_fs = (int)substr($special_flash_selling_end_date,8,2); // le jour $jend_month_fs = (int)substr($special_flash_selling_end_date,5,2); // puis le mois $jend_year_fs = (int)substr($special_flash_selling_end_date,0,4); // et l\'annee $jend_hour_fs = (int)substr($special_flash_selling_end_date,11,2); // et l\'heure $jend_minute_fs = (int)substr($special_flash_selling_end_date,14,2); // et la minute $jend_second_fs = (int)substr($special_flash_selling_end_date,17,2); // et la seconde ?> <script type="text/javascript"> function decompteur(jour,mois,annee,heure,minute,seconde) { Resultat = ""; now = new Date(); goal = new Date(annee,mois-1,jour,heure,minute,seconde); ts = Math.abs((now.getTime()/1000)-(goal.getTime()/1000)); if((goal.getTime()/1000) < (now.getTime()/1000)){ location.reload(); } fjour = Math.floor(ts/(3600*24)); if(fjour<=1) { Resultat = fjour + " jour "; } else { Resultat = fjour + " jours + "; } ts = ts - (fjour*24*3600); fheure = Math.floor((ts/3600)); if(fheure<10) { Resultat += " 0" + fheure + "h "; } else { Resultat += " " + fheure + "h "; } ts = ts - (fheure*3600); minutes = Math.floor((ts/60)); if(minutes<10) { Resultat += "0" + minutes + "m "; } else { Resultat += minutes + "m "; } ts = ts - (minutes*60); fseconde = Math.floor(ts); if(fseconde<10) { Resultat += "0" + fseconde + "s" } else { Resultat += fseconde + "s" } return Resultat } function startXbox() { document.getElementById("countdown").innerHTML=decompteur(<?php echo $jend_days_fs.','.$jend_month_fs.','.$jend_year_fs.','.$jend_hour_fs.','.$jend_minute_fs.','.$jend_second_fs; ?>); setTimeout("startXbox()",1000); } window.onload = startXbox; </script> <?php // ##################### END Added Flash Selling ################## if (strlen(strip_tags($product['products_description'])) > 0 && PRODUCT_LIST_DESCRIPTION_GRID > 0) { if (strlen(strip_tags($product['products_description'])) > PRODUCT_LIST_DESCRIPTION_GRID) { //$p_desc_grid = '<div class="product-description description-grid">'.mb_substr(strip_tags($product['products_description']), 0, PRODUCT_LIST_DESCRIPTION_GRID, 'UTF-8').'...'.'</div>'; } else { //$p_desc_grid = '<div class="product-description description-grid">'.strip_tags($product['products_description']).'</div>'; } } else { $p_desc_grid =''; } if (strlen(strip_tags($product['products_description'])) > 0 && PRODUCT_LIST_DESCRIPTION_LIST > 0) { if (strlen(strip_tags($product['products_description'])) > PRODUCT_LIST_DESCRIPTION_LIST) { // ##################### Added Flash Selling ################## $p_desc_list = '<div align="center">'.tep_image(DIR_WS_IMAGES . 'Horloge.gif', ''). ' ' . $jend_days_fs .' Jours +'. ' ' . $jend_hour_fs.'h'. ' ' . $jend_minute_fs . ' mn '. $jend_second_fs .'s'. '</div><div class="product-description description-list">'.mb_substr(strip_tags($product['products_description']), 0, PRODUCT_LIST_DESCRIPTION_LIST, 'UTF-8').'...'.'</div>'; // ##################### END Added Flash Selling ################## } else { $p_desc_list = '<div class="product-description description-list">'.strip_tags($product['products_description']).'</div>'; } } else { $p_desc_list =''; } $products_price = $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])); $specials_price_flash_selling = '<span class="soloprix_normal">' . $currencies->display_price_dizaines($specials['specials_price_flash_selling'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</span>'; $specials_content .= tep_product_block_build( $productId = $specials['products_id'], $productImage = $specials['products_image'], $productName = $specials['products_name'], $productAdded = '', $productManufacturerId = $specials['manufacturers_id'], $productManufacturerName = '', $productPrice = $products_price, //$productPriceNew = $products_price_promos, $productPriceNew = $specials_price_flash_selling, $productWeight = '', $productQuantity = '', $productModel = '', $productDescription = $p_desc_list.$p_desc_grid, $productButtons = true, $pageComming = FILENAME_FLASH_SELLING, $elCount = $i ); } echo $specials_content; ?> </ul> <?php if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <div class="listing-panel bottom-panel"> <div class="row"> <div class="col-xs-6 displayText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></div> <div class="col-xs-6"><?php echo $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></div> </div> </div> <?php } ?> </div> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> ... là on est presque bon : la date est bien à jour sauf que le compte à rebours ne se déclenche pas; l'heure de fin s'affiche de façon figée (ex. 23h 56mn 56s). Cela s'explique puisque la fonction du decompteur javascript n'est pas prise en compte. J'ai donc essayé une deuxième possibilité à l'instar de product_info.php pour exploiter le decompteur javascript en remplaçant: CODE ' . $jend_days_fs .' Jours +'. ' ' . $jend_hour_fs.'h'. ' ' . $jend_minute_fs . ' mn '. $jend_second_fs .'s'. ' par CODE <span id= "countdown" type="text" disabled="disabled" class="boldText" size="28"></span> ça ne marche pas... là - et uniquement sur le premier produit de la liste des ventes flash - on a un compte à rebours qui décompte bien avec une date (ex. 9 jours + 3h 54mn 25s) mais ces informations sont erronées. Sur ces deux tentatives il y a une partie de bonne dans chacune d'elle pour arriver au résultat souhaité qui serait d'afficher le même compte à rebours de product_info.php. Une idée ou une suggestion? -------------------- OsCommerce Bootstrap 2.3.4 visible ici >> Account_Balance_V4 >> Admin Notes with french v2.4_1 >> cronemul >> Extra Info to customer page in admin V1 >> extra_fields_v2_1 >> extra_images_v1-61 >> heardabout_1_25 >> mail-manager >> Menu deroulant date naissance Mini_Images_v2.0 >> Minimum_Order_Amount_1_4 >> Master Password 1_4 >> ordercheck >> Product Serial 1_0 >> PDF_Customer_Invoice_v1.0 >> points_rewardsV2.2beta >> RecoverCartSales 230 >> RMA_Returns_2-6 >> Suivi_colissimo >>
|
|
2 Jul 2015, 11:09
Message
#250
|
|
Ceinture jaune OSC Groupe : Membres Messages : 53 Inscrit : 9-November 04 Lieu : Charleroi Membre no 3721 |
J'avance un peu mais besoin d'aide pour un ultime détail. Revoici ma page catalogue/flash_selling.php
CODE <?php /* $Id: flash_selling.php,v 1.49 2003/06/09 22:35:33 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FLASH_SELLING); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FLASH_SELLING)); $content = CONTENT_FLASH_SELLING; require(DIR_WS_INCLUDES . 'template_top.php'); ?> <h1 class="page-heading product-list"><?php echo HEADING_TITLE; ?></h1> <div class="block-content"> <?php //$specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_price_flash_selling 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_flash_selling = '1' and now() < s.flash_selling_end_date order by s.specials_date_added DESC"; $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_price_flash_selling 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_flash_selling = '1' and now() > s.flash_selling_beginning_date and now() < s.flash_selling_end_date 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) { echo tep_gridlist_build(); } if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <div class="listing-panel top-panel top-view"> <div class="row"> <div class="col-xs-6 displayText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></div> <div class="col-xs-6"><?php echo $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></div> </div> </div> <?php } ?> <ul class="row product-listing"> <?php $specials_query = tep_db_query($specials_split->sql_query); $i=0; while ($specials = tep_db_fetch_array($specials_query)) { $i++; $product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$specials['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); // ##################### Added Flash Selling ################## $new_price = tep_get_products_special_price($specials['products_id']); $status_flash_selling = tep_get_products_special_status_flash_selling($specials['products_id']); $status_special = tep_get_products_special_status_flash($specials['products_id']); $special_flash_selling_end_date = tep_get_products_special_flash_selling_end_date($specials['products_id']); $special_flash_selling_end_date1 = tep_get_products_special_flash_selling_end_date($specials['products_id']); $jend_days = substr($special_flash_selling_end_date1,8,2); // le jour $jend_month = substr($special_flash_selling_end_date1,5,2); // puis le mois $jend_year = substr($special_flash_selling_end_date1,0,4); // et l\'annee $jend_hour = substr($special_flash_selling_end_date1,11,2); // et l\'heure $jend_minute = substr($special_flash_selling_end_date1,14,2); // et la minute $jend_second = substr($special_flash_selling_end_date1,17,2); // et la seconde $timestamp_end_flash_selling_date = mktime($jend_hour,$jend_minute,$jend_second,$jend_month,$jend_days,$jend_year); // Flash discount start Date $special_flash_selling_beginning_date = tep_get_products_special_flash_selling_beginning_date($specials['products_id']); $special_flash_selling_beginning_date1 = tep_get_products_special_flash_selling_beginning_date($specials['products_id']); $jbeginning_days = substr($special_flash_selling_beginning_date1,8,2); // le jour $jbeginning_month = substr($special_flash_selling_beginning_date1,5,2); // puis le mois $jbeginning_year = substr($special_flash_selling_beginning_date1,0,4); // et l\'annee $jbeginning_hour = substr($special_flash_selling_beginning_date1,11,2); // et l\'heure $jbeginning_minute = substr($special_flash_selling_beginning_date1,14,2); // et la minute $jbeginning_second = substr($special_flash_selling_beginning_date1,17,2); // et la seconde $timestamp_beginning_flash_selling_date = mktime($jbeginning_hour,$jbeginning_minute,$jbeginning_second,$jbeginning_month,$jbeginning_days,$jbeginning_year); // Now $today =time(); $specials_query = tep_db_query("select specials_new_products_price, expires_date from " . TABLE_SPECIALS . " where products_id = '" . (int)$specials['products_id'] . "' and status = '1' order by specials_new_products_price, expires_date limit 1"); $special = tep_db_fetch_array($specials_query); $new_price = $special['specials_new_products_price']; if ($status_flash_selling != '') { $new_price_flash_selling = tep_get_products_special_price_flash_selling($specials['products_id']); } else { $new_price_flash_selling = 0; } if (($status_special =='0') && ($status_flash_selling =='0')) { //$products_price = $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])); $products_price_dizaines = '<span class="soloprix_normalb" itemprop="price">'.$currencies->display_price_dizaines($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])).'</span>'; } elseif (($status_special =='0') && ($status_flash_selling =='1') && ($timestamp_end_flash_selling_date > $today) && ($timestamp_beginning_flash_selling_date < $today)) { $products_price_dizaines = '<span class="soloprix_normalb" itemprop="price">' . $currencies->display_price_dizaines($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</span><br> <span class="old-price price">' . $currencies->display_price($new_price_flash_selling, tep_get_tax_rate($specials['products_tax_class_id'])) . '<br> -'. round((($specials['products_price'] - $new_price_flash_selling) / $specials['products_price']) * 100, 0) . '% </span>'; } elseif (($status_special =='1') && ($status_flash_selling =='0')) { $products_price_dizaines = '<del class="old-price price">' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</del> <span class="soloprix_normalb" itemprop="price">' . $currencies->display_price_dizaines($new_price, tep_get_tax_rate($specials['products_tax_class_id'])) . '</span>';// promos } elseif(($status_special =='1') && ($status_flash_selling =='1') && ($new_price > $new_price_flash_selling) && ($timestamp_end_flash_selling_date > $today) && ($timestamp_beginning_flash_selling_date < $today)) { $products_price_dizaines = '<font color=red><del class="old-price price">' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</del></font> <span class="soloprix_normalb" itemprop="price">' . $currencies->display_price_dizaines($new_price_flash_selling, tep_get_tax_rate($specials['products_tax_class_id'])) . '</span><span><br> -'. round((($specials['products_price'] - $new_price_flash_selling) / $specials['products_price']) * 100, 0) . '% </span>'; } elseif(($status_special =='1') && ($status_flash_selling =='1') && ($timestamp_end_flash_selling_date < $today)) { $products_price_dizaines = '<del class="old-price price">' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</del> <span class="soloprix_normalb" itemprop="price">' . $currencies->display_price_dizaines($new_price, tep_get_tax_rate($specials['products_tax_class_id'])) . '</span>';// promos } else { $products_price_dizaines = '<span itemprop="price" class="soloprix_normalb" itemprop="price">'.$currencies->display_price_dizaines($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])).'</span>'; } // ################# end Added Flash Selling ################## //Time to stp $ecart_secondes = ($timestamp_end_flash_selling_date - $today); $ecart_days = floor($ecart_secondes / (60*60*24)); $ecart_hour = floor($ecart_secondes / (60*60)); $ecart_minutes = floor($ecart_secondes / (60)); //Time to beginning $ecart_secondes_beginning = ($timestamp_end_flash_start_date - $today); $ecart_days_beginning = floor($ecart_secondes / (60*60*24)); $ecart_hour_beginning = floor($ecart_secondes / (60*60)); $ecart_minutes_beginning = floor($ecart_secondes / (60)); ?> <script type="text/javascript"> function decompteur(jour,mois,annee,heure,minute,seconde) { Resultat = ""; now = new Date(); goal = new Date(annee,mois-1,jour,heure,minute,seconde); ts = Math.abs((now.getTime()/1000)-(goal.getTime()/1000)); if((goal.getTime()/1000) < (now.getTime()/1000)){ location.reload(); } fjour = Math.floor(ts/(3600*24)); if(fjour<=1) { Resultat = fjour + " jour + "; } else { Resultat = fjour + " jours + "; } ts = ts - (fjour*24*3600); fheure = Math.floor((ts/3600)); if(fheure<10) { Resultat += " 0" + fheure + "h "; } else { Resultat += " " + fheure + "h "; } ts = ts - (fheure*3600); minutes = Math.floor((ts/60)); if(minutes<10) { Resultat += "0" + minutes + "mn "; } else { Resultat += minutes + "mn "; } ts = ts - (minutes*60); fseconde = Math.floor(ts); if(fseconde<10) { Resultat += "0" + fseconde + "s" } else { Resultat += fseconde + "s" } return Resultat } function startX() { document.getElementById("countdown").innerHTML=decompteur(<?php echo $jend_days.','.$jend_month.','.$jend_year.','.$jend_hour.','.$jend_minute.','.$jend_second; ?>); setTimeout("startX()",1000); } window.onload = startX; </script> <?php if (strlen(strip_tags($product['products_description'])) > 0 && PRODUCT_LIST_DESCRIPTION_LIST > 0) { if (strlen(strip_tags($product['products_description'])) > PRODUCT_LIST_DESCRIPTION_LIST) { $p_desc_list = '<div id="center">'.tep_image(DIR_WS_IMAGES . 'Horloge.gif', ''). ' <span id= "countdown" type="text" disabled="disabled" class="boldText" size="28"></span></div><div class="product-description description-list">'.mb_substr(strip_tags($product['products_description']), 0, PRODUCT_LIST_DESCRIPTION_LIST, 'UTF-8').'...'.'</div>'; } else { $p_desc_list = '<div class="product-description description-list">'.strip_tags($product['products_description']).'</div>'; } } else { $p_desc_list =''; } $products_price = $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])); $specials_price_flash_selling = '<span class="soloprix_normal">' . $currencies->display_price_dizaines($specials['specials_price_flash_selling'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</span>'; $specials_content .= tep_product_block_build( $productId = $specials['products_id'], $productImage = $specials['products_image'], $productName = $specials['products_name'], $productAdded = '', $productManufacturerId = $specials['manufacturers_id'], $productManufacturerName = '', $productPrice = $products_price, //$productPriceNew = $products_price_promos, $productPriceNew = $specials_price_flash_selling, $productWeight = '', $productQuantity = '', $productModel = '', $productDescription = $p_desc_list.$p_desc_grid, $productButtons = true, $pageComming = FILENAME_FLASH_SELLING, $elCount = $i ); } echo $specials_content; ?> </ul> <?php if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <div class="listing-panel bottom-panel"> <div class="row"> <div class="col-xs-6 displayText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></div> <div class="col-xs-6"><?php echo $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></div> </div> </div> <?php } ?> </div> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> ... et là ça marche très bien sauf qu'un seul produit s'affiche!! Je pense que la boucle while est mal écrite ou mal fermée non? -------------------- OsCommerce Bootstrap 2.3.4 visible ici >> Account_Balance_V4 >> Admin Notes with french v2.4_1 >> cronemul >> Extra Info to customer page in admin V1 >> extra_fields_v2_1 >> extra_images_v1-61 >> heardabout_1_25 >> mail-manager >> Menu deroulant date naissance Mini_Images_v2.0 >> Minimum_Order_Amount_1_4 >> Master Password 1_4 >> ordercheck >> Product Serial 1_0 >> PDF_Customer_Invoice_v1.0 >> points_rewardsV2.2beta >> RecoverCartSales 230 >> RMA_Returns_2-6 >> Suivi_colissimo >>
|
|
Version bas débit | Nous sommes le : 28th March 2024 - 22:02 |
Ce site est déclaré auprès de la commision Nationale de l'Informatique et des Libertés (déclaration n°: 1043896) |