Problème de changement adresse sur commande depuis migration php 5.3 |
Bienvenue invité ( Connexion | Inscription )
Problème de changement adresse sur commande depuis migration php 5.3 |
20 Oct 2015, 18:44
Message
#1
|
|
Ceinture blanche+ OSC Groupe : Membres Messages : 35 Inscrit : 19-November 06 Lieu : ile de france Membre no 13349 |
Depuis la migration de php 5.2 en 5.3 "server ovh" avec oscommerce 2.2 plus possible de changer l'adresse
de livraison pendant le procesus de commande d'un client, certainement un problème avec une fonction obsolète pour le programme de gestion du changement d'adresse de livraison sur la page checkout_shipping_address.php Quoi qu'on face l'adresse reste celle du compte client d'origine, impossible de selectionner une adresse existante dans le carnet, impossible egalement de crée une nouvelle adresse de livraison. Pourtant après plusieurs lecture du code, je ne trouve rien d'anormal. Le code de mon fichier checkout_shipping_address.php. Code <?php
/* $Id: checkout_shipping_address.php,v 1.15 2003/06/09 23:03:53 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } // needs to be included earlier to set the success message in the messageStack require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING_ADDRESS); require(DIR_WS_CLASSES . 'order.php'); $order = new order; // if the order contains only virtual products, forward the customer to the billing page as // a shipping address is not needed if ($order->content_type == 'virtual') { if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); $shipping = false; if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); $sendto = false; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } $error = false; $process = false; if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'submit') && isset($HTTP_POST_VARS['formid']) && ($HTTP_POST_VARS['formid'] == $sessiontoken)) { // process a new shipping address if (tep_not_null($HTTP_POST_VARS['firstname']) && tep_not_null($HTTP_POST_VARS['lastname']) && tep_not_null($HTTP_POST_VARS['street_address'])) { $process = true; if (ACCOUNT_GENDER == 'true') $gender = tep_db_prepare_input($HTTP_POST_VARS['gender']); if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($HTTP_POST_VARS['company']); $firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']); $lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']); $street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']); if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($HTTP_POST_VARS['suburb']); $postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']); $city = tep_db_prepare_input($HTTP_POST_VARS['city']); $country = tep_db_prepare_input($HTTP_POST_VARS['country']); if (ACCOUNT_STATE == 'true') { if (isset($HTTP_POST_VARS['zone_id'])) { $zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']); } else { $zone_id = false; } $state = tep_db_prepare_input($HTTP_POST_VARS['state']); } if (ACCOUNT_GENDER == 'true') { if ( ($gender != 'm') && ($gender != 'f') ) { $error = true; $messageStack->add('checkout_address', ENTRY_GENDER_ERROR); } } if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) { $error = true; $messageStack->add('checkout_address', ENTRY_FIRST_NAME_ERROR); } if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) { $error = true; $messageStack->add('checkout_address', ENTRY_LAST_NAME_ERROR); } if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) { $error = true; $messageStack->add('checkout_address', ENTRY_STREET_ADDRESS_ERROR); } if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) { $error = true; $messageStack->add('checkout_address', ENTRY_POST_CODE_ERROR); } if (strlen($city) < ENTRY_CITY_MIN_LENGTH) { $error = true; $messageStack->add('checkout_address', ENTRY_CITY_ERROR); } if (ACCOUNT_STATE == 'true') { $zone_id = 0; $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'"); $check = tep_db_fetch_array($check_query); $entry_state_has_zones = ($check['total'] > 0); if ($entry_state_has_zones == true) { $zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name = '" . tep_db_input($state) . "' or zone_code = '" . tep_db_input($state) . "')"); if (tep_db_num_rows($zone_query) == 1) { $zone = tep_db_fetch_array($zone_query); $zone_id = $zone['zone_id']; } else { $error = true; $messageStack->add('checkout_address', ENTRY_STATE_ERROR_SELECT); } } else { if (strlen($state) < ENTRY_STATE_MIN_LENGTH) { $error = true; $messageStack->add('checkout_address', ENTRY_STATE_ERROR); } } } if ( (is_numeric($country) == false) || ($country < 1) ) { $error = true; $messageStack->add('checkout_address', ENTRY_COUNTRY_ERROR); } if ($error == false) { $sql_data_array = array('customers_id' => $customer_id, 'entry_firstname' => $firstname, 'entry_lastname' => $lastname, 'entry_street_address' => $street_address, 'entry_postcode' => $postcode, 'entry_city' => $city, 'entry_country_id' => $country); if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender; if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company; if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb; if (ACCOUNT_STATE == 'true') { if ($zone_id > 0) { $sql_data_array['entry_zone_id'] = $zone_id; $sql_data_array['entry_state'] = ''; } else { $sql_data_array['entry_zone_id'] = '0'; $sql_data_array['entry_state'] = $state; } } if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array); $sendto = tep_db_insert_id(); if (tep_session_is_registered('shipping')) tep_session_unregister('shipping'); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } // process the selected shipping destination } elseif (isset($HTTP_POST_VARS['address'])) { $reset_shipping = false; if (tep_session_is_registered('sendto')) { if ($sendto != $HTTP_POST_VARS['address']) { if (tep_session_is_registered('shipping')) { $reset_shipping = true; } } } else { tep_session_register('sendto'); } $sendto = $HTTP_POST_VARS['address']; $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'"); $check_address = tep_db_fetch_array($check_address_query); if ($check_address['total'] == '1') { if ($reset_shipping == true) tep_session_unregister('shipping'); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } else { tep_session_unregister('sendto'); } } else { if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); $sendto = $customer_default_address_id; tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } } // if no shipping destination address was selected, use their own address as default if (!tep_session_is_registered('sendto')) { $sendto = $customer_default_address_id; } $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')); $addresses_count = tep_count_customer_address_book_entries(); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- var selected; function selectRowEffect(object, buttonSelect) { if (!selected) { if (document.getElementById) { selected = document.getElementById('defaultSelected'); } else { selected = document.all['defaultSelected']; } } if (selected) selected.className = 'moduleRow'; object.className = 'moduleRowSelected'; selected = object; // one button is not an array if (document.checkout_address.address[0]) { document.checkout_address.address[buttonSelect].checked=true; } else { document.checkout_address.address.checked=true; } } function rowOverEffect(object) { if (object.className == 'moduleRow') object.className = 'moduleRowOver'; } function rowOutEffect(object) { if (object.className == 'moduleRowOver') object.className = 'moduleRow'; } function check_form_optional(form_name) { var form = form_name; var firstname = form.elements['firstname'].value; var lastname = form.elements['lastname'].value; var street_address = form.elements['street_address'].value; if (firstname == '' && lastname == '' && street_address == '') { return true; } else { return check_form(form_name); } } //--></script> <?php require(DIR_WS_INCLUDES . 'form_check.js.php'); ?> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'), 'post', 'onSubmit="return check_form_optional(checkout_address);"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_delivery.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('checkout_address') > 0) { ?> <tr> <td><?php echo $messageStack->output('checkout_address'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($process == false) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="50%" valign="top"><?php echo TEXT_SELECTED_SHIPPING_DESTINATION; ?></td> <td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($addresses_count > 1) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_ADDRESS_BOOK_ENTRIES; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_OTHER_SHIPPING_DESTINATION; ?></td> <td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php $radio_buttons = 0; $addresses_query = tep_db_query("select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "'"); while ($addresses = tep_db_fetch_array($addresses_query)) { $format_id = tep_get_address_format_id($addresses['country_id']); ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if ($addresses['address_book_id'] == $sendto) { echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } else { echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } ?> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" colspan="2"><b><?php echo tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']); ?></b></td> <td class="main" align="right"><?php echo tep_draw_radio_field('address', $addresses['address_book_id'], ($addresses['address_book_id'] == $sendto)); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td colspan="3"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo tep_address_format($format_id, $addresses, true, ' ', ', '); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php $radio_buttons++; } ?> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } } if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_NEW_SHIPPING_ADDRESS; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="100%" valign="top"><?php echo TEXT_CREATE_NEW_SHIPPING_ADDRESS; ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td><?php require(DIR_WS_MODULES . 'checkout_new_address.php'); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td> <td class="main" align="right"><?php echo tep_draw_hidden_field('action', 'submit') . tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php if ($process == true) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> </tr> </table></td> <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> </tr> </table></td> </tr> <tr> <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_DELIVERY; ?></td> <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_PAYMENT; ?></td> <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td> <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td> </tr> </table></td> </tr> </table></form></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'); ?> -------------------- Bertrand oscommerce 2.2-MS2 php5.3 migrat php 5.5 ovh mutua. sql privé.
|
|
3 Nov 2015, 12:00
Message
#2
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Bonjour,
Tu as résolu ton problème ? Si non, vérifie que $sendto contient bien quelque chose à la ligne Code $sendto = tep_db_insert_id();
-------------------- Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse) Config 2 en local avec UwAmp : Osc Phoenix |
|
3 Nov 2015, 14:47
Message
#3
|
|
Ceinture bleue OSC Groupe : Membres Messages : 912 Inscrit : 4-February 04 Membre no 1926 |
@ Bonbec
Bonjour Frédéric, Tu penses que c'est le même type de soucis que celui que rencontre nephelion http://www.oscommerce-fr.info/forum/index....showtopic=71490 @ Bertand Tu peux copier / coller ta fonction tep_db_perform ? -------------------- L'indispensable est en cours de traitement,
L'urgent sera traité demain, Le normal sera traité plus tard, Le reste on vera ... En conclusion : les journées sont trop courtes. Utilisateur de MS2.2 Max 1.5 - OSC-Affiliate 1.09 - Admin With Access Levels 2.1 - Meta Tag Controller/ Generator - Credit/Gift Voucher/Coupons 5.05 - Download Controller v5.3 - X-Sell MS2 - WYSIWYG HTML Editor for Admin 1.7 - Dynamic Mo Pics - Loginbox Best - Order logging before payment processing - User Tracking - Faster Page Loads, Less DB queries - Plus plein de modifs perso :-) |
|
3 Nov 2015, 15:03
Message
#4
|
|
Ceinture marron OSC Groupe : Modérateurs Messages : 1543 Inscrit : 30-May 06 Lieu : Vichy (03) Membre no 10583 |
Bonjour Havock,
Cela se pourrait. J'en profite pour coller ma fonction tep_db_insert_id() de admin/includes/database.php car elle a été modifiée : Code // function tep_db_insert_id() { // return mysql_insert_id(); // } function tep_db_insert_id( $link = 'db_link') { global $$link; return mysql_insert_id($$link); } idem pour catalog/includes/database.php -------------------- Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse) Config 2 en local avec UwAmp : Osc Phoenix |
|
5 Nov 2015, 12:33
Message
#5
|
|
Ceinture blanche+ OSC Groupe : Membres Messages : 35 Inscrit : 19-November 06 Lieu : ile de france Membre no 13349 |
Désolé pour le temps de réponse mais j'ai pas reçu les mails d'avis de réponse.
Merci pour vos pistes pour répondre à HAVOCK : ma fonction d'origine Code function tep_db_insert_id() { return mysql_insert_id(); } Fait un test avec modification 1 ligne: dans fichier \catalogue\database.php Code function tep_db_insert_id( $link = 'db_link') { global $$link; return mysql_insert_id($$link); } Ma fonction tep_db_perform Code function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') { reset($data); j'ai fait un test en modifiant comme ci dessus mais cette modification provoque l'imposibilité de sortir de la page checkout_shipping_address.php les cases à cochée sont active mais le bouton Continuer est inactif ... Et la variable $sendto est bien egal à mon numero de client 4219. Une autre modif à faire en même temps ... merci pour votre aide Ce message a été modifié par bertrand144 - 5 Nov 2015, 13:18. -------------------- Bertrand oscommerce 2.2-MS2 php5.3 migrat php 5.5 ovh mutua. sql privé.
|
|
5 Nov 2015, 12:57
Message
#6
|
|
Ceinture blanche+ OSC Groupe : Membres Messages : 35 Inscrit : 19-November 06 Lieu : ile de france Membre no 13349 |
Pour la question de bonbec
avec un echo de $sendto j'ai bien le retour d'un N° 4219 qui est bien le numero du client avec la valeur de $sendto est 4219 ; 4219 est le numero du client principal Adress_book_id et des client adresse secondaire customers_id Ce message a été modifié par bertrand144 - 5 Nov 2015, 13:46. -------------------- Bertrand oscommerce 2.2-MS2 php5.3 migrat php 5.5 ovh mutua. sql privé.
|
|
5 Nov 2015, 14:40
Message
#7
|
|
Ceinture bleue OSC Groupe : Membres Messages : 912 Inscrit : 4-February 04 Membre no 1926 |
Tu n'est pas très clair :
Pour la question de bonbec avec un echo de $sendto j'ai bien le retour d'un N° 4219 qui est bien le numero du client avec la valeur de $sendto est 4219 ; 4219 est le numero du client principal Adress_book_id et des client adresse secondaire customers_id Normalement c'est $customer_id qui correspond au numéro du client. $sendto correspond à une valeur du champs address_book_id de la table address_book. $customer_id et $sendto n'ont (sauf hasard) pas la même valeur. -------------------- L'indispensable est en cours de traitement,
L'urgent sera traité demain, Le normal sera traité plus tard, Le reste on vera ... En conclusion : les journées sont trop courtes. Utilisateur de MS2.2 Max 1.5 - OSC-Affiliate 1.09 - Admin With Access Levels 2.1 - Meta Tag Controller/ Generator - Credit/Gift Voucher/Coupons 5.05 - Download Controller v5.3 - X-Sell MS2 - WYSIWYG HTML Editor for Admin 1.7 - Dynamic Mo Pics - Loginbox Best - Order logging before payment processing - User Tracking - Faster Page Loads, Less DB queries - Plus plein de modifs perso :-) |
|
5 Nov 2015, 18:30
Message
#8
|
|
Ceinture blanche+ OSC Groupe : Membres Messages : 35 Inscrit : 19-November 06 Lieu : ile de france Membre no 13349 |
Dans ma table Table_address_book j'ai Address_book_id = 4219 Customers_id = 4219
et dans ma Table_address_book j'ai 4 Fiche pour Customers_id = 4219 avec les numéro suivant de Address_book_id / 4219 / 7738 / 9217 / 9218. Dans ma table Customers j'ai Customers_id = 4219 J'espere que c'est plus claire. Par contre dans mon exemple le selection n'était pas justement l'adresse du 4219 mais plus tot celle du 7738. C'est le hasard mais la elle ont la même valeur address_book_id de la table address_book= 4219. Il y a egalement un 2em probleme. (Toujours avec des tests en php 5.3) si le client entre par exemple en langue allemand et rajoute dans son panier des produits, à chaque page il retombe en langue allemand même si il demande son panier en francais il revient sur la langue allemand lors de l'affichage de sont panier idem ... le serveur ne garde pas la langue de la denière cession ou un truc comme ça ... Ce message a été modifié par bertrand144 - 5 Nov 2015, 19:09. -------------------- Bertrand oscommerce 2.2-MS2 php5.3 migrat php 5.5 ovh mutua. sql privé.
|
|
25 Jan 2016, 18:19
Message
#9
|
|
Ceinture jaune+ OSC Groupe : Membres Messages : 129 Inscrit : 25-April 06 Membre no 10120 |
Bonjour Bertrand, as-tu trouvé une solution à ton problème de changement d'adresse ? J'ai exactement le même problème depuis le changement de serveur d'OVH en septembre dernier.
J'ai appliqué les solutions du forum (y compris celle de fonction tep_db_insert_id) mais il y a toujours des problèmes de rafraichissement des variables dans le tunnel d'achat : impossible de changer d'adresse de livraison ou de facturation, si l'on revient en arrière pour changer le mode de livraison une fois sur checkout_confirmation, c'est toujours le 1er choix qui est pris en compte, etc. Même en se déconnectant du compte client et en se reconnectant, si l'on revient sur le choix de la livraison, la case à cocher de la 1ere fois est toujours cochée, idem si l'on a mis un commentaire, il réapparait et idem pour le choix du mode de paiement... Je pense que tout est lié... comme toi avec le changement de langue. Pour info j'ai remplacé comme préconisé le fichier includes/functions/sessions.php par celui de la version 2.3 Merci de vos retours -------------------- osCommerce MS2.2 & 2.3.3.4 + diverses contributions et adaptations
|
|
Version bas débit | Nous sommes le : 28th March 2024 - 14:17 |
Ce site est déclaré auprès de la commision Nationale de l'Informatique et des Libertés (déclaration n°: 1043896) |