Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


milerwan last won the day on January 15 2018

milerwan had the most liked content!

1 Follower

About milerwan

  • Rank
    Osc fan
  • Birthday 12/14/1976

Profile Information

Recent Profile Visitors

11,716 profile views
  1. Sorry it's because I haven't located the fix... Now I see it... You have modify this : $order_tax = 0; By this : $order_tax = $order->info['tax']; So yes, it is better than my fix.
  2. @raiwa I find a fix... To fix the @Omar_one issue when "$discount" amount is superior to "$order_subtotal", find this sentence : if ( tep_not_null($order_tax)) { $order->info['tax'] = $order_tax; } else { $order->info['total'] -= $discount; } or this one : if (!empty($order_tax)) { $order->info['tax'] = $order_tax; } else { $order->info['total'] -= $discount; } And add below this : // fix negative amount BOF if ($order->info['total'] < 0) { $order->info['total'] += $discount; } // fix negative amount EOF More simple method and works with or without tax added in total.
  3. So what was the fix you applied to solve the issue of @Omar_one ? By the way, I have taken a look on the "includes/modules/order_total/ot_shipping.php" file and find this sentence : $subtotal_correction += $order->products[$i]['final_price']; //use for tax calculation only products which have taxes But it seems the "$subtotal_correction" variable is alone on the script so it doesn't affect anything normally... A vestige of a past version that must be removed?
  4. Hi @raiwa Warning, I have tested your fix and I found a serious bug when the order is without VAT applied. In that case discount is not applied in total. Another way to solve the minor bug related is to apply a "Minimum Order Sub-Total" amount more than the amount of the discount and not equal. NB: Or not apply "Minimum Order Sub-Total".
  5. Yes it is screenshot but as I mentioned above the EU legislation requires that there is, on the one hand, an electronic signature and, on the other hand, at least a link to the "Terms & Conditions" at the time of the confirmation of order, so located in the "checkout_confirmation" page. I think we can keep legal agreements in the create_account page for "Privacy Policies" but for "T&C" it must be transferred to the checkout page in the form of an electronic signature.
  6. To create a signature insert with a modal link that displays the "T&C at checkout" for 2.3.4 BS, Edge and so on, here are the changes to make : 1. In "checkout_confirmation.php" file 1a. Find this sentence : require('includes/template_top.php'); ?> And replace by : require(DIR_WS_INCLUDES . 'template_top.php'); ?> <?php // Must agree to terms START ?> <script language="javascript"><!-- function check_agree(TheForm) { if (TheForm.agree.checked) { return true; } else { alert(unescape('<?php echo CONDITION_AGREEMENT_ERROR; ?>')); return false; } } //--></script> <?php // Must agree to terms END ?> 1b. Find this sentence : echo tep_draw_form('checkout_confirmation', $form_action_url, 'post'); ?> And replace by : // Must Agree to terms START // echo tep_draw_form('checkout_confirmation', $form_action_url, 'post'); echo tep_draw_form('checkout_confirmation', $form_action_url, 'post', 'onsubmit="return check_agree(this);"'); // Must Agree to terms END ?> 1c. Find this sentence : <div class="buttonSet"> <div class="text-right"> <?php And replace by : <?php // Must Agree to terms START ?> <br> <div class="pull-right"> <div class="panel panel-success"> <div class="panel-heading"><?php echo '<strong>' . HEADING_CONDITION_AGREEMENT . '</strong>'; ?><button type="button" style="margin-left:0px;" class="btn btn-info btn-xs pull-right" data-toggle="modal" data-target="#cgvModal"><i class="fa fa-eye"></i> <?php echo CONDITIONS; ?></button></div> <div class="panel-body"> <table width="100%"> <tr> <td class="small"><strong> <?php echo CONDITION_AGREEMENT; ?></strong> </td> <td align="right" width="26px" onclick="window.document.checkout_confirmation.agree.checked = !window.document.checkout_confirmation.agree.checked;"> <?php echo tep_draw_checkbox_field('agree','true', false, 'onclick="window.document.checkout_confirmation.agree.checked = !window.document.checkout_confirmation.agree.checked;"'); ?> <?php echo tep_draw_hidden_field('check_agreestatus', $value = 'true'); ?> </td> </tr> </table> </div> </div> </div> <!-- Modal Conditions--> <?php include(DIR_WS_MODULES . FILENAME_MODAL_CONDITIONS); ?> <!-- Modal Conditions--> <?php // Must Agree to terms END ?> <div class="clearfix"></div> <div class="buttonSet"> <div class="text-right"> <?php 2a. In "includes/languages/english/checkout_confirmation.php" file, add this at the end of the page : // Must Agree to terms define('HEADING_CONDITION_AGREEMENT', 'Electronic Signature'); define('CONDITIONS', 'T&C'); define('CONDITION_AGREEMENT', '"I have read the Terms and Conditions and I\'m agree to the terms."'); define('CONDITION_AGREEMENT_ERROR', "Please read our Terms and Conditions and declare accept them. If you do not do so, your order will not be processed."); // Must Agree to terms 2b. In "includes/languages/french/checkout_confirmation.php" file, add this at the end of the page : // Must Agree to terms define('HEADING_CONDITION_AGREEMENT', 'Signature &eacute;lectronique'); define('CONDITIONS', 'CGV'); define('CONDITION_AGREEMENT', '"Je d&eacute;clare avoir pris connaissance des conditions g&eacute;n&eacute;rales de vente et en accepter les termes."'); define('CONDITION_AGREEMENT_ERROR', "Vous devez lire nos conditions de vente et déclarer les accepter sans quoi votre commande ne pourra aboutir."); // Must Agree to terms 3. Create "includes/modules/modal_conditions.php" file with this : <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ require('includes/languages/' . $language . '/conditions.php'); ?> <!-- Modal --> <div class="modal fade" id="cgvModal" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title"><?php echo CONDITIONS; ?></h4> </div> <div class="modal-body"> <?php echo TEXT_INFORMATION; ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo TEXT_CLOSE_WINDOW; ?></button> </div> </div> </div> </div> It's finish ! I'll be happy to offer this code to @burt for Phoenix (need adaptation for BS4 of course) and so bring my contribution to the project.
  7. I recounted this fact because I read a decision of the Court of Justice of the EU which established that the electronic signature needed at the time of the order should be matched with the possibility for the customer to have access to the general conditions (a link is sufficient) to allow the customer to print and save them. So without signature and without access via a link to the general conditions of sale, the customer can cancel the purchase in any circumstance... Otherwise, it complies with the rules of the merchant. Here is the article (in French) : https://www.legavox.fr/blog/maitre-anthony-bem/validite-acceptation-clic-site-internet-18537.htm
  8. Hi, A priori, the acceptance of the general conditions of sale (via the electronic signature of the customer) must take place at the time of the order confirmation. This rule prevails in the EU. It may be well to adapt Phoenix to this regulation, don't you think? Here is an example of what it might look like. NB: Sorry for not being able to post this subject in the Phoenix club.
  9. milerwan

    Ezsocial for osC2.3.4BS v1.0a

    I have tested with Facebook and Google and it works. Maybe you need to update your account from Facebook's developers website : https://developers.facebook.com/
  10. @Mikepo, @Omar_one, @Heatherbell, @peterpil19, What I mean is too much work to take a new copy of Phoenix and add all my previous installed modules and modifications. In my case (and maybe for some of us), it is faster to adapt the new features of Phoenix (new files) to old sites responsive (2.3.4BS or CE). NB: It depends on the level of modification of the site of each member. At no time did I say that we should not migrate to Phoenix code... Sure Phoenix's code is the future and we are grateful to @burt for his immense work. Without him Oscommerce CMS would be of the past.
  11. Hi Steve, Like you I have a live shop based on 2.3.4BS which is heavily modified with altered modules, core and database modifications (Header Tags SEO, Qt Pro, Price Break per Qty, Newsdesk, Big Image, itemCondition, availability management, etc) and moving to Phoenix starting from scratch is too much work. Before I had started from scratch with new v2.3.4BS and I had imported all my previous osc v2.2 modules and core changes but with Phoenix it seems there is less work to upgrade my current script to fit with it. I made the transition to PHP 7.2 last week, the catalog part is done, I still have the admin part to do now. Transition to Bootstrap 4.x dosen't seem to me a priority knowing that I already modified Bootstrap 3 to integrate the (missing) MS grid size. If you need help to do the same, I can help you.
  12. Ok I have found, instead of this original code : if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest(); I have modified like this : if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) // cheapest or neutral START // $shipping = $shipping_modules->cheapest(); if (DEFAULT_SHIPPING == 'neutral') { $shipping = $shipping_modules->neutral(); } else { $shipping = $shipping_modules->cheapest(); } // cheapest or neutral END It seems the comments + the return to the line did not allow for taking into account the added lines that followed the condition... 😓 Writing like this, it works now : if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) { // cheapest or neutral START // $shipping = $shipping_modules->cheapest(); if (DEFAULT_SHIPPING == 'neutral') { $shipping = $shipping_modules->neutral(); } else { $shipping = $shipping_modules->cheapest(); } // cheapest or neutral END } Many thanks for your time and your help @BrockleyJohn !
  13. @BrockleyJohn I found the script causing the problem but it is not changed : // register a random ID in the session to check throughout the checkout procedure // against alterations in the shopping cart contents if (!tep_session_is_registered('cartID')) { tep_session_register('cartID'); } elseif (($cartID != $cart->cartID) && tep_session_is_registered('shipping')) { tep_session_unregister('shipping'); } In my case the "tep_session_unregistrerd('shipping')" function is activated (if I comment it, no more errors). So the problem seems to come from this condition : elseif (($cartID != $cart->cartID) && tep_session_is_registered('shipping')) Do you have an idea of what can be problematic?
  14. A priori it is a missing session creation and I fix it temporarily by adding this at the place of choice of delivery modes : if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); I will try to understand where and how the session could be "un_registered". Thank you for your help.
  15. @BrockleyJohn Actually I have a bunch of modified files... I did several tests and the errors appear when : - I add a product and click button to order + checkout shipping validation - I use the refresh button on "shopping_cart.php" and click button to order + checkout shipping validation When the errors appeared, If I don't re-do the same top actions, no more errors during checkout.