V
V
Vlad Bazarov2015-11-03 21:59:37
PHP
Vlad Bazarov, 2015-11-03 21:59:37

How to force to send an order from the specified address, Opencart?

Thanks for the help in advance,
Opencart 2.0
Such a problem: shortened the guest order, mail is not required now. However, now notifications have stopped coming (they used to come from the mail that the client indicated). I came up with the idea, if the mail is not specified, enter some example mail. Wrote the following expression:

<script type="text/javascript">
var no_mail = "[email protected]";
  function empty_mail() {
    if (document.getElementById('input-payment-email').value==''){		
    document.getElementById('input-payment-email').value=no_mail
    } 
  };
</script>

Interposed in guest.tpl - does not work. Must be inserted into guest.php.
What do you think, gentlemen programmers?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Exploits, 2015-11-04
@vlad1337

You need to do this not through js, but through php in the catalog/model/checkout/order.php file
and look in this block "// Admin Alert Mail"
or make a handler for the checkout button

<script>
 $('#checkout-button').click(function(){
   $('#input-payment-email').val('[email protected]');
 });
</script>

Is it necessary to insert fake mail into the correct input (#input-payment-email)?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question