ArtcoInc Posted May 18, 2018 Share Posted May 18, 2018 (ok, maybe not a legal question ... ) Adding a Must Agree to Terms and Conditions checkbox to when a customer places an order. In your opinion ... Should the checkbox be at the beginning of the checkout process, or just before the final checkout/payment step? Malcolm Link to comment Share on other sites More sharing options...
puddlec Posted May 18, 2018 Share Posted May 18, 2018 Personally I got mine on checkout payment, however you can also put it on create account. So that your customers are also agreeing to it when they create an account as well. Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
♥clustersolutions Posted May 19, 2018 Share Posted May 19, 2018 I used to do it on checkout_confirmation, but I have a modified two page checkout. I also had stored a copy of the agreement as it changes over time and had it displaced on the order page. I later removed it though as I did it for chargeback reason and that MATC didn't do diddly squat for us when the customer was a real dick because the merchant processor was not on our side. I found it not worth while in my case for the potential lost conversions. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted May 19, 2018 Share Posted May 19, 2018 Like Tim I too have never found MATC much use when dealing with a customer who has an issue. Its just better as a buissnes to just come to an agreement with the customer. Remember even if you are right and the customer is wrong these days its just not good buissness practice trying to enforce MATC (almost imposiable if you export). Remember you might be right but is it worth a posiable bad review and loss of a customer? Also in many cases consumer law will overide any MATC you may have. Link to comment Share on other sites More sharing options...
burt Posted May 19, 2018 Share Posted May 19, 2018 12 hours ago, ArtcoInc said: (ok, maybe not a legal question ... ) Adding a Must Agree to Terms and Conditions checkbox to when a customer places an order. In your opinion ... Should the checkbox be at the beginning of the checkout process, or just before the final checkout/payment step? Malcolm I'd say in two places; create_account.php a. records the customer signed up on X date at X time and that he says he has read your Terms/Privacy policies b. It also appears that best practice is to store the exact terms/privacy that the client signed up to. checkout_confirmation.php a. records the customer giving her permission for you to possibly divulge some of her details to external companies - payment processor, mail delivery, perhaps other things ? For #2 I say checkout_confirmation as that is the last page in the checkout procedure prior to the order being placed - I think we all agree that consent must come before the order is placed. I place it on that page also because by the time this page is reached...buyer has already made the buying decision so 1 extra tickbox here is not a deal breaker.. Link to comment Share on other sites More sharing options...
ArtcoInc Posted May 20, 2018 Author Share Posted May 20, 2018 Ok, one more question ... With GDPR in mind, which is more important ... having the customer accept the shop's Terms and Conditions, or the shop's Privacy Policy? Malcolm Link to comment Share on other sites More sharing options...
inra311 Posted May 25, 2018 Share Posted May 25, 2018 On 21.5.2018 at 1:22 AM, ArtcoInc said: With GDPR in mind, which is more important ... having the customer accept the shop's Terms and Conditions, or the shop's Privacy Policy? I am not a lawyer so I cannot answer this question. Personally, I'd think when the customer creates an account he only has to accept the privacy policy. When he places an order he should accept the T&C as only then a contract is established, basing on the T&Cs. Link to comment Share on other sites More sharing options...
♥14steve14 Posted May 25, 2018 Share Posted May 25, 2018 1 hour ago, inra311 said: I am not a lawyer so I cannot answer this question. Personally, I'd think when the customer creates an account he only has to accept the privacy policy. When he places an order he should accept the T&C as only then a contract is established, basing on the T&Cs. Thats how I interpret it should be done. Dont keep asking the customer the same thing. Silly thing is very few actually read any of the store policies, but the law says you have to have them. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
ghprosvs Posted May 25, 2018 Share Posted May 25, 2018 Hi Guys, I do not know if this is the correct place to ask but, I have the Oscommerce responsive BS Edge version and I'm searching for a "must agree with terms" app or solution to add to the checkout page. I have tried MATC but that aint working. When I activate this in admin, the checkout page is not entirly showing, I'm unable to scroll down and there is no continue button :/ In other words: help, please Thank you in advance Kind regards Link to comment Share on other sites More sharing options...
puddlec Posted May 25, 2018 Share Posted May 25, 2018 16 minutes ago, ghprosvs said: Hi Guys, I do not know if this is the correct place to ask but, I have the Oscommerce responsive BS Edge version and I'm searching for a "must agree with terms" app or solution to add to the checkout page. I have tried MATC but that aint working. When I activate this in admin, the checkout page is not entirly showing, I'm unable to scroll down and there is no continue button :/ In other words: help, please Thank you in advance Kind regards Check your error log, to see what it says. it will tell you where the error is. i did get the MATC addon working on my BS Frozen site Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
ghprosvs Posted May 25, 2018 Share Posted May 25, 2018 hi, thanks for your reply, where can I find this error log? (I'm a total noob) Link to comment Share on other sites More sharing options...
puddlec Posted May 25, 2018 Share Posted May 25, 2018 i got a hunch on what it could be. in the includes/modules/matc.php file their are references to DIR_WS_CLASSE and DIR_WS_LANGUAGES those would need to be changed to 'includes/classes/' and 'includes/languages/' and in checkout_payment or wherever you installed it to change whatever you got to <?php //----- BEGINNING OF ADDITION: MATC -----// if($_GET['matcerror'] == 'true'){ ?> <div class="contentText"> <div class="alert alert-danger"> <div class="row"> <div class="col-xs-8"> <i class="fas fa-exclamation-circle"></i> <?php echo MATC_ERROR; ?> </div> </div> </div> </div> <?php } //----- END OF ADDITION: MATC -----// ?> <!-- BEGINNING OF ADDITION: MATC --> <?php if(MATC_AT_CHECKOUT != 'false'){ require('includes/modules/'. 'matc.php'); } ?> Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
ghprosvs Posted May 25, 2018 Share Posted May 25, 2018 Hi, this is pretty close to getting it to work. thanks! 2 next problems: there is loads of blank space in the checkout payment between the payment options, the terms, and the continue button. in checkout confirmation I now get a HTTP ERROR 500 "this page doesn't work" pls help Link to comment Share on other sites More sharing options...
puddlec Posted May 25, 2018 Share Posted May 25, 2018 problem 1 could possibly be that you left in all the table tags in checkout payment and in the matc file e.g. <table> <tr> <td> </td> </tr> </table> i took all those out, then just put some div tags with the relevant bootstrap class names i wanted 2 in checkout confirmation you will need to change the MATC code to //----- BEGINNING OF ADDITION: MATC -----// if (tep_db_prepare_input($_POST['TermsAgree']) != 'true' and MATC_AT_CHECKOUT != 'false') { tep_redirect(tep_href_link('checkout_payment.php', 'matcerror=true', 'SSL')); } //----- END OF ADDITION: MATC -----// Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
ghprosvs Posted May 25, 2018 Share Posted May 25, 2018 6 minutes ago, puddlec said: problem 1 could possibly be that you left in all the table tags in checkout payment and in the matc file e.g. <table> <tr> <td> </td> </tr> </table> i took all those out, then just put some div tags with the relevant bootstrap class names i wanted 2 in checkout confirmation you will need to change the MATC code to //----- BEGINNING OF ADDITION: MATC -----// if (tep_db_prepare_input($_POST['TermsAgree']) != 'true' and MATC_AT_CHECKOUT != 'false') { tep_redirect(tep_href_link('checkout_payment.php', 'matcerror=true', 'SSL')); } //----- END OF ADDITION: MATC -----// Item 1: I will check this right now item 2: This did the the trick! thank you so much for your help!! I was already strugling with this for one week! :) Ps: I also noticed that I had one } to many in this script, hence the HTTP 500 error I suppose Link to comment Share on other sites More sharing options...
ghprosvs Posted May 25, 2018 Share Posted May 25, 2018 I was just thinking, is it not more logical to have the "MATC" on the checkout confirmation page in stead of the checkout payment page? that being said, is it possible to do so? Kind regards Gerry Link to comment Share on other sites More sharing options...
ghprosvs Posted May 25, 2018 Share Posted May 25, 2018 hmm I do not seem to be able to resolve the problem of the blank spaces. Can you pls have look at this file? thanks a lot! <?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/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('login.php', '', '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('shopping_cart.php')); } // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping')) { tep_redirect(tep_href_link('checkout_shipping.php', '', 'SSL')); } // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($cart->cartID) && tep_session_is_registered('cartID')) { if ($cart->cartID != $cartID) { tep_redirect(tep_href_link('checkout_shipping.php', '', 'SSL')); } } // Stock Check if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) { $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) { tep_redirect(tep_href_link('shopping_cart.php')); break; } } } // if no billing destination address was selected, use the customers own address as default if (!tep_session_is_registered('billto')) { tep_session_register('billto'); $billto = $customer_default_address_id; } else { // verify the selected billing address if ( (is_array($billto) && empty($billto)) || is_numeric($billto) ) { $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)$billto . "'"); $check_address = tep_db_fetch_array($check_address_query); if ($check_address['total'] != '1') { $billto = $customer_default_address_id; if (tep_session_is_registered('payment')) tep_session_unregister('payment'); } } } require('includes/classes/order.php'); $order = new order; if (!tep_session_is_registered('comments')) tep_session_register('comments'); if (isset($_POST['comments']) && tep_not_null($_POST['comments'])) { $comments = tep_db_prepare_input($_POST['comments']); } $total_weight = $cart->show_weight(); $total_count = $cart->count_contents(); // load all enabled payment modules require('includes/classes/payment.php'); $payment_modules = new payment; require('includes/languages/' . $language . '/checkout_payment.php'); $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link('checkout_shipping.php', '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link('checkout_payment.php', '', 'SSL')); require('includes/template_top.php'); ?> <?php echo $payment_modules->javascript_validation(); ?> <div class="page-header"> <h1 class="h3"><?php echo HEADING_TITLE; ?></h1> </div> <?php echo tep_draw_form('checkout_payment', tep_href_link('checkout_confirmation.php', '', 'SSL'), 'post', 'class="form-horizontal" onsubmit="return check_form();"', true); ?> <div class="contentContainer"> <?php if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) { ?> <div class="contentText"> <?php echo '<strong>' . tep_output_string_protected($error['title']) . '</strong>'; ?> <p class="messageStackError"><?php echo tep_output_string_protected($error['error']); ?></p> </div> <?php } ?> <?php //----- BEGINNING OF ADDITION: MATC -----// if($_GET['matcerror'] == 'true'){ ?> <div class="contentText"> <div class="alert alert-danger"> <div class="row"> <div class="col-xs-8"> <i class="fas fa-exclamation-circle"></i> <?php echo MATC_ERROR; ?> </div> </div> </div> </div> <?php } //----- END OF ADDITION: MATC -----// ?> <h2 class="h3"><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></h2> <div class="contentText row"> <div class="col-sm-8"> <div class="alert alert-warning"> <?php echo TEXT_SELECTED_BILLING_DESTINATION; ?> <div class="clearfix"></div> <div class="pull-right"> <?php echo tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'fa fa-home', tep_href_link('checkout_payment_address.php', '', 'SSL')); ?> </div> <div class="clearfix"></div> </div> </div> <div class="col-sm-4"> <div class="panel panel-primary"> <div class="panel-heading"><?php echo TITLE_BILLING_ADDRESS; ?></div> <div class="panel-body"> <?php echo tep_address_label($customer_id, $billto, true, ' ', '<br />'); ?> </div> </div> </div> </div> <div class="clearfix"></div> <h2 class="h3"><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></h2> <?php $selection = $payment_modules->selection(); if (sizeof($selection) > 1) { ?> <div class="contentText"> <div class="alert alert-warning"> <div class="row"> <div class="col-xs-8"> <?php echo TEXT_SELECT_PAYMENT_METHOD; ?> </div> <div class="col-xs-4 text-right"> <?php echo '<strong>' . TITLE_PLEASE_SELECT . '</strong>'; ?> </div> </div> </div> </div> <?php } else { ?> <div class="contentText"> <div class="alert alert-info"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></div> </div> <?php } ?> <div class="contentText"> <table class="table table-striped table-condensed table-hover"> <tbody> <?php $radio_buttons = 0; for ($i=0, $n=sizeof($selection); $i<$n; $i++) { ?> <tr class="table-selection"> <td><strong><?php echo $selection[$i]['module']; ?></strong></td> <td align="right"> <?php if (sizeof($selection) > 1) { echo tep_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $payment), 'required aria-required="true"'); } else { echo tep_draw_hidden_field('payment', $selection[$i]['id']); } ?> </td> </tr> <?php if (isset($selection[$i]['error'])) { ?> // <tr> // <td colspan="2"><?php echo $selection[$i]['error']; ?></td> // </tr> <?php } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) { ?> // <tr> // <td colspan="2"><table border="0" cellspacing="0" cellpadding="2"> <?php for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) { ?> // <tr> // <td><?php echo $selection[$i]['fields'][$j]['title']; ?></td> // <td><?php echo $selection[$i]['fields'][$j]['field']; ?></td> // </tr> <?php } ?> // </table></td> // </tr> <?php } ?> <?php $radio_buttons++; } ?> </tbody> // </table> </div> <hr> <div class="contentText"> <div class="form-group"> <label for="inputComments" class="control-label col-sm-4"><?php echo TABLE_HEADING_COMMENTS; ?></label> <div class="col-sm-8"> <?php echo tep_draw_textarea_field('comments', 'soft', 60, 5, $comments, 'id="inputComments" placeholder="' . TABLE_HEADING_COMMENTS . '"'); ?> <!-- BEGINNING OF ADDITION: MATC --> <?php if(MATC_AT_CHECKOUT != 'false'){ require('includes/modules/' . 'matc.php'); } ?> <!-- END OF ADDITION: MATC --> </div> </div> </div> <div class="buttonSet"> <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', null, 'primary', null, 'btn-success'); ?></div> </div> <div class="clearfix"></div> <div class="contentText"> <div class="stepwizard"> <div class="stepwizard-row"> <div class="stepwizard-step"> <a href="<?php echo tep_href_link('checkout_shipping.php', '', 'SSL'); ?>"><button type="button" class="btn btn-default btn-circle">1</button></a> <p><a href="<?php echo tep_href_link('checkout_shipping.php', '', 'SSL'); ?>"><?php echo CHECKOUT_BAR_DELIVERY; ?></a></p> </div> <div class="stepwizard-step"> <button type="button" class="btn btn-primary btn-circle">2</button> <p><?php echo CHECKOUT_BAR_PAYMENT; ?></p> </div> <div class="stepwizard-step"> <button type="button" class="btn btn-default btn-circle" disabled="disabled">3</button> <p><?php echo CHECKOUT_BAR_CONFIRMATION; ?></p> </div> </div> </div> </div> </div> </form> <?php require('includes/template_bottom.php'); require('includes/application_bottom.php'); ?> Link to comment Share on other sites More sharing options...
puddlec Posted May 25, 2018 Share Posted May 25, 2018 remove the // you have added to the checkout_payment.php as where you added it is fine to have the tables it is just in the matc.php file where it seems to be causing the issue - below is what i am using <?php if(MATC_SHOW_TEXTAREA != 'false'){ //START "show the textarea if" if(MATC_TEXTAREA_FILENAME != ''){//There is a file we should require require('includes/languages/' . $language . '/' . MATC_TEXTAREA_FILENAME); } if(MATC_TEXTAREA_MODE == 'Returning code'){ eval('$textarea_contents_material ='.MATC_TEXTAREA_RETURNING_CODE.';'); }elseif(MATC_TEXTAREA_MODE == 'SQL'){ eval('$contents_query = tep_db_query('.MATC_TEXTAREA_SQL.');'); $contents_query_array = tep_db_fetch_array($contents_query); $textarea_contents_material = $contents_query_array['thetext']; }else{ die('No mode was catched! Search for "qwetyqouty34657+234" in matc.php fo find the place where the error occured.'); //Just for error checking. }; if(MATC_TEXTAREA_HTML_2_PLAIN_TEXT_CONVERT != 'false'){ //Use the conversion tool require_once('includes/classes/'.'html2text.php');// Include the class definition file. $h2t =& new html2text(html_entity_decode($textarea_contents_material,ENT_QUOTES,'ISO8859-1'));// Instantiate a new instance of the class. Passing the string variable automatically loads the HTML for you. $h2t->width=0; //Do not use word wrap $textarea_contents = $h2t->get_text();// Simply call the get_text() method for the class to convert the HTML to the plain text. Store it into the variable. }else{//Use the "raw material", that is we do not convert it to plain text $textarea_contents = $textarea_contents_material; }; ?> <b><?php echo MATC_HEADING_CONDITIONS; ?></b> <textarea name="conditions" class="small" rows="14" cols="60" readonly ><?php echo $textarea_contents; ?></textarea> <?php }//End "show the textarea if" ?> <?php if(MATC_SHOW_LINK != 'false'){ echo '<label class="container"> ' . sprintf(MATC_CONDITION_AGREEMENT, tep_href_link(MATC_FILENAME, MATC_PARAMETERS)); }else{ echo strip_tags(MATC_CONDITION_AGREEMENT); } echo tep_draw_checkbox_field('TermsAgree','true', false, 'id="TermsAgree"') . '<span class="checkmark"></span> </label>'; ?> Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
ghprosvs Posted May 25, 2018 Share Posted May 25, 2018 My dear Craig, you solved my problem and I ow you my gratitude for that. A million thanks for your time and effort to help me out! Verry, V E R Y MUCH APPRECIATED!! PS: just one more question, do you possibly have an idea how I put the MATC on the checkout_confirmation page in stead of the checkout_payment page? Have a nice evening! (it is 21:24 my time) Kind regards Gerry Link to comment Share on other sites More sharing options...
ghprosvs Posted May 26, 2018 Share Posted May 26, 2018 Hi, I found how I can put the MATC message on the checkout confirmation page. But: the customer can continue with the order regardless if he accepts or not, and when he continues he ends op in the (empty) shopping cart, in stead of ending on the checkout_success page. I keep on searching but some help is appreciated :) Kind regards Gerry Link to comment Share on other sites More sharing options...
mk_osc Posted May 31, 2018 Share Posted May 31, 2018 I have the same problem, that the customer can continue regardless if the check box is ticked or not. Even on checkout_payment.php page. So the add on is completely useless until someone is able to fix it. Also customer needs to agree to Privay Policy as well. Terms and Conditions only is not sufficient per EU law. Link to comment Share on other sites More sharing options...
mk_osc Posted May 31, 2018 Share Posted May 31, 2018 Gerry, you did not apply the installation rule for the button modification in your posted sample file Installation says: Find: <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"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td> <td class="main" align="right"><?php echo 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> Replace with : <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"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td> <?php //----- CHANGE IN ROW BELOW: MATC - Added id="TheSubmitButton" -----// ?> <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE,'id="TheSubmitButton"'); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> However, I've no clue how to apply this to my bootstrap v2.3.4.1, since the button code there is quite different. Anyone already able to 'translate' the code to the new version? Thanks. Link to comment Share on other sites More sharing options...
puddlec Posted May 31, 2018 Share Posted May 31, 2018 this is how i got it working on my bootstrap v2.3.4.1 in checkout_payment.php put just before the continue button <?php //----- BEGINNING OF ADDITION: MATC -----// if($_GET['matcerror'] == 'true'){ ?> <div class="contentText"> <div class="alert alert-danger"> <div class="row"> <div class="col-xs-8"> <i class="fas fa-exclamation-circle"></i> <?php echo MATC_ERROR; ?> </div> </div> </div> </div> <?php } //----- END OF ADDITION: MATC -----// ?> <!-- BEGINNING OF ADDITION: MATC --> <?php if(MATC_AT_CHECKOUT != 'false'){ require('includes/modules/'. 'matc.php'); } ?> in checkout confirmation put near the top //----- BEGINNING OF ADDITION: MATC -----// if (tep_db_prepare_input($_POST['TermsAgree']) != 'true' and MATC_AT_CHECKOUT != 'false') { tep_redirect(tep_href_link('checkout_payment.php', 'matcerror=true', 'SSL')); } //----- END OF ADDITION: MATC -----// replace the includes/modules/matc.php file with <?php if(MATC_SHOW_TEXTAREA != 'false'){ //START "show the textarea if" if(MATC_TEXTAREA_FILENAME != ''){//There is a file we should require require('includes/languages/' . $language . '/' . MATC_TEXTAREA_FILENAME); } if(MATC_TEXTAREA_MODE == 'Returning code'){ eval('$textarea_contents_material ='.MATC_TEXTAREA_RETURNING_CODE.';'); }elseif(MATC_TEXTAREA_MODE == 'SQL'){ eval('$contents_query = tep_db_query('.MATC_TEXTAREA_SQL.');'); $contents_query_array = tep_db_fetch_array($contents_query); $textarea_contents_material = $contents_query_array['thetext']; }else{ die('No mode was catched! Search for "qwetyqouty34657+234" in matc.php fo find the place where the error occured.'); //Just for error checking. }; if(MATC_TEXTAREA_HTML_2_PLAIN_TEXT_CONVERT != 'false'){ //Use the conversion tool require_once('includes/classes/'.'html2text.php');// Include the class definition file. $h2t =& new html2text(html_entity_decode($textarea_contents_material,ENT_QUOTES,'ISO8859-1'));// Instantiate a new instance of the class. Passing the string variable automatically loads the HTML for you. $h2t->width=0; //Do not use word wrap $textarea_contents = $h2t->get_text();// Simply call the get_text() method for the class to convert the HTML to the plain text. Store it into the variable. }else{//Use the "raw material", that is we do not convert it to plain text $textarea_contents = $textarea_contents_material; }; ?> <b><?php echo MATC_HEADING_CONDITIONS; ?></b> <textarea name="conditions" class="small" rows="14" cols="60" readonly ><?php echo $textarea_contents; ?></textarea> <?php }//End "show the textarea if" ?> <?php if(MATC_SHOW_LINK != 'false'){ echo '<label class="container"> ' . sprintf(MATC_CONDITION_AGREEMENT, tep_href_link(MATC_FILENAME, MATC_PARAMETERS)); }else{ echo strip_tags(MATC_CONDITION_AGREEMENT); } echo tep_draw_checkbox_field('TermsAgree','true', false, 'id="TermsAgree"') . '<span class="checkmark"></span> </label>'; ?> if you want MATC on the checkout confirmation page then just copy the code provided for checkout_payment.php and in checkout_process.php (near the top put //----- BEGINNING OF ADDITION: MATC -----// if (tep_db_prepare_input($_POST['TermsAgree']) != 'true' and MATC_AT_CHECKOUT != 'false') { tep_redirect(tep_href_link('checkout_confirmation.php', 'matcerror=true', 'SSL')); } //----- END OF ADDITION: MATC -----// whilst they can click on the button they get redirected back to the previous page anyway, and told they must agree to the terms and condiations in regards to what it says then just change the text in the language file. simples Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
puddlec Posted May 31, 2018 Share Posted May 31, 2018 in regards to disabling the button if the user has JavaScript enabled of course in MATC.php file you can always add <script> $(document).ready(function(){ $('.TheSubmitButton').prop('disabled',true); $('#TermsAgree').click(function(){ if($(this).is(':checked')) { $('.TheSubmitButton').prop('disabled',false); } else { $('.TheSubmitButton').prop('disabled',true); } }); }); </script> and just change the submit button to <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', null, 'primary', null, 'btn-success TheSubmitButton'); ?> i've only quickly tested this, and seemed to work. Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin Link to comment Share on other sites More sharing options...
mk_osc Posted May 31, 2018 Share Posted May 31, 2018 Wow Craig, thank you very much You have good coding knowledge to fix those issues. It works for me as suggested. Perfect. you made my day. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.