1

I have form:

<form action="" class="ui-form">
    <h3>Быстрый заказ</h3>
    <div class="form-row">
        <input type="text" id="fastname" required autocomplete="off"><label for="fastname">Ваше имя</label>
    </div>
    <div class="form-row">
        <input type="text" id="fastphone" required autocomplete="off"><label for="fastphone">Телефон</label>
    </div>
    <div class="form-row">
        <input type="text" id="fastaddr" required autocomplete="off"><label for="fastaddr">Адрес доставки</label>
    </div>
    <p><input type="button" value="Заказать" onclick="fastorder(<?php echo  $this->getProduct()->getId()?>, <?php echo  $this->getProduct()->getPrice()?>)"></p>
</form>

And I have JavaScript that is called after I click a button on the form:

function fastorder(pr_id, pr_price){
    var pr_name = document.getElementById("fastname").value;
    var pr_phone = document.getElementById("fastphone").value;
    var pr_addr = document.getElementById("fastaddr").value;
    alert('ProductID:'+pr_id+'  Price:'+pr_price+'  Name:'+pr_name+'  Phone:'+pr_phone+'  Adress:'+pr_addr);
}

In the alert I get all the necessary information to create an order.

How to create an order help please?

I'm using (Magento 1.9.2.4)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.