Jump to content

Create order from cart with customer group tax ex.


Recommended Posts

Hi.

I am trying to create an order from a cart on a customer belonging to a VAT exempt group. However, when I call the validateOrder method of the Payment class, the VAT is also applied to me. Carrying out part of the code

Cart creation:

$cart = new Cart();
$cart->id_shop_group = 1;
$cart->id_address_delivery = (int)$id_address_delivery;
$cart->id_address_invoice = (int)$id_address_invoice;
$cart->id_carrier = (int)$id_carrier;
$cart->id_currency = $id_currency;
$cart->id_customer = (int)$id_customer;
$cart->id_lang = $id_lang;
$cart->id_shop = $id_shop;
$cart->delivery_option = $delivery_option;
$cart->add();

Order creation:

$payment_module = Module::getInstanceByName($this->params['module']);
$payment_module->validateOrder(...)

any suggestions?

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...