Jump to content

Problem while saving custom field in onepage checkout..but working fine with five steps


Recommended Posts

Hi,

 

I have added two custom field in order-carrier tpl page, id_is,name_is. It is saving this field values in ps_cart,ps_orders tbl in five steps checkout..but when Order process type is "one page checkout" it is not saving...any solution?

1. add field to table ps_cart and ps_orders.

2. define field in cart and order classes.

3. edit parentordercontroller.php

put in _processCarrier()
$this->context->cart->id_is = (Tools::getValue('id_is'));
$this->context->cart->name_is = (int)(Tools::getValue('name_is'));

4. edit paymentmodule.php

put in validateOrder()

    $order->id_is = $this->context->cart->id_is;
    $order->name_is = $this->context->cart->name_is;

 

please reply.

Link to comment
Share on other sites

  • 5 months later...
  • 7 months later...

Hi,

 

I have added two custom field in order-carrier tpl page, id_is,name_is. It is saving this field values in ps_cart,ps_orders tbl in five steps checkout..but when Order process type is "one page checkout" it is not saving...any solution?

1. add field to table ps_cart and ps_orders.

2. define field in cart and order classes.

3. edit parentordercontroller.php

put in _processCarrier()

$this->context->cart->id_is = (Tools::getValue('id_is'));

$this->context->cart->name_is = (int)(Tools::getValue('name_is'));

4. edit paymentmodule.php

put in validateOrder()

    $order->id_is = $this->context->cart->id_is;

    $order->name_is = $this->context->cart->name_is;

 

please reply.

 

The same happens to me.
 
Please I need help!, I followed the tutorial http://nemops.com/new-customer-address-fields-prestashop/#.Vg6ILPl_Okr to add three fields. 
With five steps checkout everything works fine, but on one page checkout I get error saving the fields, field x required, 
like there were empty, like there were not in the model.
 
Also in ObjectModel address :: $ definition if I put the required data is saved, otherwise not, no matter what the type of checkout.
 
Anyone can help me?
Link to comment
Share on other sites

×
×
  • Create New...